Messages in this thread | | | Subject | Re: [patch 1/2] sched: check for prev_cpu == this_cpu in wake_affine() | From | Suresh Siddha <> | Date | Mon, 08 Mar 2010 11:09:51 -0800 |
| |
hi Mike,
On Fri, 2010-03-05 at 11:36 -0800, Mike Galbraith wrote: > Yeah, but with the 1 task + non-sync wakeup scenario, we miss the boat > because select_idle_sibling() uses wake_affine() success as it's > enabler.
But the wake_affine() decision is broken when this_cpu == prev_cpu. All we need to do is to fix that, to recover that ~9% improvement.
> I have a slightly different patch for that in my tree. There's no need > to even call wake_affine() since the result is meaningless.
I don't think your below fix is correct because:
> - if (affine_sd && wake_affine(affine_sd, p, sync)) > - return cpu; > + if (affine_sd) { > + if (cpu == prev_cpu) > + return cpu;
by this time, we have overwritten cpu using the select_idle_sibling() logic and cpu no longer points to this_cpu.
What we need is a comparison with this_cpu.
thanks, suresh
| |