Re: sched: tweak select_idle_sibling to look for idle threads
From: Chris Mason
Date: Sun Apr 10 2016 - 08:36:59 EST
On Sun, Apr 10, 2016 at 12:04:21PM +0200, Mike Galbraith wrote:
> On Sat, 2016-04-09 at 15:05 -0400, Chris Mason wrote:
>
> > This does preserve the existing logic to prefer idle cores over idle
> > CPU threads, and includes some tests to try and avoid the idle scan when we're
> > actually better off sharing a non-idle CPU with someone else.
>
> My box says the "oh nevermind" checks aren't selective enough, tbench
> dropped 4% at clients=cores, and 2% at clients=threads.
I knew this part would need more experimentation, so I kept v1 as simple
as possible. On my box, tbench clients=cores is 5% faster,
clients=threads is 4% faster. bounce_to_target() is a small version of
task_hot(), I did get more accurate decisions by using the full
task_hot(), so I can try that again.
I'm testing on one of these:
Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz, which has two sockets and 10
cores per socket.
What are you testing with? If it's two sockets or less I may be able to
find one to reproduce with.
>
> > Benchmarks in production show overall capacity going up between 2-5%
> > depending on the metric.
>
> Latency rules all loads certainly exist, and clearly want some love,
> but the bigger the socket, and the more threads/core, the more that
> traverse is gonna hurt the others, so seems either we need a better
> filter, or a (yeah yeah, yet another damn) tweakable.
>
> Oh, and bounce_to_target() seems an odd way to say full_traverse.
Sure, I can rename it.
-chris