Re: sched: tweak select_idle_sibling to look for idle threads

From: Chris Mason
Date: Wed Apr 13 2016 - 10:37:17 EST


On Wed, Apr 13, 2016 at 04:22:58PM +0200, Mike Galbraith wrote:
> On Wed, 2016-04-13 at 09:44 -0400, Chris Mason wrote:
>
> > So you're interested in numbers where we pass the wake_wide decision
> > into select_idle_sibling(), and then use that instead of (or in addition
> > to?) my should_scan_idle() function?
>
> Yeah, I was thinking instead of, and hoping that would be enough.

I'm definitely up for experimenting with different tests to decide when
to scan idle. I'll have to wait until after lsf/vault, but I can layout
a bunch of tests.

>
> > I agree we may need to tweak wake_wide, since most of our wakeups now
> > are failed affine wakeups.
>
> What exactly do you mean by failed affine wakeups? Failed because
> wake_wide() said we don't want one, or because wake_affine() said we
> can't have one? If the later, my thought bubble may have just burst,
> but it still "feels" right.

I mean this number:

schedstat_inc(p, se.statistics.nr_wakeups_affine_attempts);

Is much much much higher than this number:

schedstat_inc(p, se.statistics.nr_wakeups_affine);

So, wake_affine said we can't have one. I made a script to sum it up
across all the threads of the webserver workload.

-chris