Re: [BISECTED] Lots of "rescheduling IPIs" in powertop

From: Ingo Molnar
Date: Wed May 14 2008 - 02:57:08 EST



* Vegard Nossum <vegard.nossum@xxxxxxxxx> wrote:

> Hi,
>
> Recap: powertop shows between 200-400 wakeups/second with the
> description "<kernel IPI>: Rescheduling interrupts" when all
> processors have load (e.g. I need to run two busy-loops on my 2-CPU
> system for this to show up).

ok, could you try the fix below? It was a mistake to make mwait use
dependent on power considerations - on a desktop CPU it is unlikely to
use more power than a simple HLT - and the IPIs are extra scheduling
latency and extra power used.

Ingo

-------------->
Subject: x86: remove mwait C-state capability
From: Ingo Molnar <mingo@xxxxxxx>
Date: Wed May 14 08:47:40 CEST 2008

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/kernel/process.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)

Index: linux/arch/x86/kernel/process.c
===================================================================
--- linux.orig/arch/x86/kernel/process.c
+++ linux/arch/x86/kernel/process.c
@@ -99,15 +99,6 @@ static void mwait_idle(void)
local_irq_enable();
}

-
-static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
-{
- if (force_mwait)
- return 1;
- /* Any C1 states supported? */
- return c->cpuid_level >= 5 && ((cpuid_edx(5) >> 4) & 0xf) > 0;
-}
-
/*
* On SMP it's slightly faster (but much more power-consuming!)
* to poll the ->work.need_resched flag instead of waiting for the
@@ -131,7 +122,7 @@ void __cpuinit select_idle_routine(const
" performance may degrade.\n");
}
#endif
- if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) {
+ if (cpu_has(c, X86_FEATURE_MWAIT)) {
/*
* Skip, if setup has overridden idle.
* One CPU supports mwait => All CPUs supports mwait
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/