Qualify comment on machdep.cpu_idle_hlt. Turning this on on a SMP

machine will result in approximately a 4.2% loss of performance (buildworld)
and approximately a 5% reduction in power consumption (when idle).  Add XXX
note on how to really make hlt work (send an IPI to wakeup HLTed cpus on
a thread-schedule event?  Generate an interrupt somehow?).
This commit is contained in:
Matthew Dillon 2002-07-17 05:41:43 +00:00
parent b946901ca7
commit d4616eacb1
2 changed files with 20 additions and 6 deletions

View File

@ -775,9 +775,16 @@ cpu_halt(void)
}
/*
* Hook to idle the CPU when possible. This currently only works in
* the !SMP case, as there is no clean way to ensure that a CPU will be
* woken when there is work available for it.
* Hook to idle the CPU when possible. In the SMP case we default to
* off because a halted cpu will not currently pick up a new thread in the
* run queue until the next timer tick. If turned on this will result in
* approximately a 4.2% loss in real time performance in buildworld tests
* (but improves user and sys times oddly enough), and saves approximately
* 5% in power consumption on an idle machine (tests w/2xCPU 1.1GHz P3).
*
* XXX we need to have a cpu mask of idle cpus and generate an IPI or
* otherwise generate some sort of interrupt to wake up cpus sitting in HLT.
* Then we can have our cake and eat it too.
*/
#ifdef SMP
static int cpu_idle_hlt = 0;

View File

@ -775,9 +775,16 @@ cpu_halt(void)
}
/*
* Hook to idle the CPU when possible. This currently only works in
* the !SMP case, as there is no clean way to ensure that a CPU will be
* woken when there is work available for it.
* Hook to idle the CPU when possible. In the SMP case we default to
* off because a halted cpu will not currently pick up a new thread in the
* run queue until the next timer tick. If turned on this will result in
* approximately a 4.2% loss in real time performance in buildworld tests
* (but improves user and sys times oddly enough), and saves approximately
* 5% in power consumption on an idle machine (tests w/2xCPU 1.1GHz P3).
*
* XXX we need to have a cpu mask of idle cpus and generate an IPI or
* otherwise generate some sort of interrupt to wake up cpus sitting in HLT.
* Then we can have our cake and eat it too.
*/
#ifdef SMP
static int cpu_idle_hlt = 0;