On Thu, 2014-10-02 at 13:15 -0400, Rik van Riel wrote:
This patch is ugly. I have not bothered cleaning it up, because it causes a regression with hackbench. Apparently for hackbench (and potentially other sync wakeups), locality is more important than idleness.
We may need to add a third clause before the search, something along the lines of, to ensure target gets selected if neither target or i are idle and the wakeup is synchronous...
if (sync_wakeup && cpu_of(target)->nr_running == 1)
return target;
I recommend you forget that trusting sync hint ever sprang to mind, it is often a big fat lie.
-Mike