1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Halt the cpus in the idle loop for SMP as well for several reasons:

1) Its critical for HTT.  There's less foot-shooting opportunity.
2) I've seen significant improvements in interactive response to commands
over ssh sessions.  I assume this is less lock contention.
3) As incentive to finish the idle cpu IPI wakeup stuff.
4) The machine on my desk was blowing hot air in my general direction
because somebody forgot to turn the hlt on, and it saves 50 watts per
cpu..

The machdep.cpu_idle_hlt sysctl is still available, but now the default
is the same as on UP kernels.
This commit is contained in:
Peter Wemm 2003-03-26 19:40:29 +00:00
parent 847b14bd3c
commit bb9cca1c2f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112686
2 changed files with 6 additions and 8 deletions

View File

@ -1008,12 +1008,11 @@ cpu_halt(void)
* XXX we need to have a cpu mask of idle cpus and generate an IPI or * 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. * otherwise generate some sort of interrupt to wake up cpus sitting in HLT.
* Then we can have our cake and eat it too. * Then we can have our cake and eat it too.
*
* XXX I'm turning it on for SMP as well by default for now. It seems to
* help lock contention somewhat, and this is critical for HTT. -Peter
*/ */
#ifdef SMP
static int cpu_idle_hlt = 0;
#else
static int cpu_idle_hlt = 1; static int cpu_idle_hlt = 1;
#endif
SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
&cpu_idle_hlt, 0, "Idle loop HLT enable"); &cpu_idle_hlt, 0, "Idle loop HLT enable");

View File

@ -1008,12 +1008,11 @@ cpu_halt(void)
* XXX we need to have a cpu mask of idle cpus and generate an IPI or * 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. * otherwise generate some sort of interrupt to wake up cpus sitting in HLT.
* Then we can have our cake and eat it too. * Then we can have our cake and eat it too.
*
* XXX I'm turning it on for SMP as well by default for now. It seems to
* help lock contention somewhat, and this is critical for HTT. -Peter
*/ */
#ifdef SMP
static int cpu_idle_hlt = 0;
#else
static int cpu_idle_hlt = 1; static int cpu_idle_hlt = 1;
#endif
SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
&cpu_idle_hlt, 0, "Idle loop HLT enable"); &cpu_idle_hlt, 0, "Idle loop HLT enable");