lkml.org 
[lkml]   [2010]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 1/2] sched: check for prev_cpu == this_cpu in wake_affine()
From
Date
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



\
 
 \ /
  Last update: 2010-03-08 20:13    [W:0.105 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site