diff options
| author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2002-07-17 12:43:52 +0000 |
|---|---|---|
| committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2002-07-17 12:43:52 +0000 |
| commit | f4189d4022928f70cc5b5431e3694371dc237999 (patch) | |
| tree | 9eda8ccc1b3152314617eecb2bb0277611f23a9d /sys | |
| parent | b57fa59aa80844ed13d75e3a9244edfa592e5674 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/pc98/i386/machdep.c | 13 | ||||
| -rw-r--r-- | sys/pc98/pc98/machdep.c | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 256a2ae843d8..00848191b154 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -795,9 +795,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; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 256a2ae843d8..00848191b154 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -795,9 +795,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; |
