Commit 7691ec86 authored by Alex Williamson's avatar Alex Williamson Committed by David Mosberger

[PATCH] ia64: Use PAL_HALT_LIGHT in cpu_idle

Here's patches for 2.4 & 2.5 to use PAL_HALT_LIGHT in cpu_idle.
This helps to reduce CPU temp a little on boxes with firmware that
takes advantage of this lower power state.  I've tried this on a
rx2600 (2x900MHz McKinley) and an i2000 (fw 117) and it shows some
benefit.  On McKinley systems, only the very latest PAL from Intel
actually reduces power consumption in the halt_light state.  For HP
rx2600/zx6000/zx2000, this means you need to be running firmware 1.82.

  Rohit Seth, at Intel, has run some benchmarks with this kind of
modification and found the effects of enabling halt_light to fall
within the noise of mosts tests.  I replaced pal_halt(1) in safe_halt
with pal_halt_light() since halt_light is required to be implemented,
but pal_halt(1) is an optional halt state.  I'd be interested to hear
of any measurements anyone does using this, where it works/fails, and
if any benchmarks/applications are impacted.
parent 29cd6d23
......@@ -405,6 +405,15 @@ config HUGETLB_PAGE_SIZE_256KB
endchoice
config IA64_PAL_IDLE
bool "Use PAL_HALT_LIGHT in idle loop"
---help---
Say Y here to enable use of PAL_HALT_LIGHT in the cpu_idle loop.
This allows the CPU to enter a low power state when idle. You
can enable CONFIG_IA64_PALINFO and check /proc/pal/cpu0/power_info
to see the power consumption and latency for this state. If you're
unsure your firmware supports it, answer N.
config SMP
bool "SMP support"
---help---
......
......@@ -169,7 +169,10 @@ do_notify_resume_user (sigset_t *oldset, struct sigscratch *scr, long in_syscall
void
default_idle (void)
{
/* may want to do PAL_LIGHT_HALT here... */
#ifdef CONFIG_IA64_PAL_IDLE
if (!need_resched())
safe_halt();
#endif
}
void __attribute__((noreturn))
......@@ -177,6 +180,10 @@ cpu_idle (void *unused)
{
/* endless idle loop with no priority at all */
while (1) {
void (*idle)(void) = pm_idle;
if (!idle)
idle = default_idle;
#ifdef CONFIG_SMP
if (!need_resched())
min_xtp();
......@@ -186,10 +193,7 @@ cpu_idle (void *unused)
#ifdef CONFIG_IA64_SGI_SN
snidle();
#endif
if (pm_idle)
(*pm_idle)();
else
default_idle();
(*idle)();
}
#ifdef CONFIG_IA64_SGI_SN
......
......@@ -108,7 +108,7 @@ ia64_insn_group_barrier (void)
#define set_mb(var, value) do { (var) = (value); mb(); } while (0)
#define set_wmb(var, value) do { (var) = (value); mb(); } while (0)
#define safe_halt() ia64_pal_halt(1) /* PAL_HALT */
#define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */
/*
* The group barrier in front of the rsm & ssm are necessary to ensure
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment