Re: [RESEND RFC PATCH V3] sched: Improve scalability of select_idle_sibling using SMT balance
From: Peter Zijlstra
Date: Tue Feb 06 2018 - 04:12:54 EST
On Mon, Feb 05, 2018 at 02:09:11PM -0800, Subhra Mazumdar wrote:
> The pseudo random is also used for choosing a random core to compare with,
> how will transposing achieve that?
Not entirely sure what your point is. Current code doesn't compare to
just _one_ other core, and I don't think we'd ever want to do that.
So currently select_idle_core() will, if there is an idle core, iterate
the whole thing trying to find it. If it fails, it clears the
'have_idle_core' state.
select_idle_cpu, which we'll fall back to, will limit the scanning based
on the average idle time.
The crucial point however, is that concurrent wakeups will not, on
average, do the same iteration because of the target offset.