On 2/2/2018 3:04 PM, Peter Zijlstra wrote: > On Fri, Feb 02, 2018 at 01:34:58PM -0500, Steven Sistare wrote: >> Actually, I take back my take back. I suspect the primary benefit >> of random selection is that it breaks up resonance states where >> CPUs that are busy tend to stay busy, and CPUs that are idle tend >> to stay idle, which is reinforced by starting the search at target = >> last cpu ran. > > Which, according to there here patches: > > https://lkml.kernel.org/r/20180130104555.4125-1-mgor...@techsingularity.net > > is a good thing, because of power management.
Yes, but it's a bad thing if ready to run tasks pile on busy CPUs and idle CPUs go unused. Stating the obvious, when the search for idle fails, the thread goes on a busy CPU. The existing logic that checks and uses the initial target if it is idle reduces unnecessary spreading and is power friendly (indeed, added in the patch you reference). Subhra's patch does not change that. - Steve