Andrew Theurer wrote on Tuesday, November 02, 2004 12:17 PMThe patch (wake_idle()) should still make a difference with nonHT systems. It is true that in the mainline code, only HT systems benefited from wake_idle(). In fact, wake_idle() probably did nothing at all for Itanium, but with this patch it will, since we scan for an idle cpu up the domains that have flag SD_WAKE_IDLE (and we addedd that flag to SD_CPU_INIT and SD_NODE_INIT).
This patch allows more aggressive idle balances, reducing idle time in
scenarios where should not be any, where nr_running > nr_cpus. We have seen
this in a couple of online transaction workloads. Three areas are targeted:
1) In try_to_wake_up(), wake_idle() is called to move the task to a sibling if
the task->cpu is busy and the sibling is idle. This has been expanded to any
idle cpu, but the closest idle cpu is picked first by starting with cpu->sd,
then going up the domains as necessary.
It occurs to me that half of the patch only applicable to HT, like the change
in wake_idle(). And also, do you really want to put that functionality in
wake_idle()? Seems defeating the original intention of that function, which
only tries to wake up sibling cpu as far as how I understand the code.