mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: "Andi Kleen" <ak@suse.de>, "Thomas Gleixner" <tglx@linutronix.de>,
	"Andreas Herrmann" <andreas.herrmann3@amd.com>,
	"S.Çağlar Onur" <caglar@pardus.org.tr>,
	Valdis.Kletnieks@vt.edu, "Matt Mackall" <mpm@selenic.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [BISECTED] Lots of "rescheduling IPIs" in powertop
Date: Wed, 14 May 2008 08:56:05 +0200	[thread overview]
Message-ID: <20080514065605.GB21369@elte.hu> (raw)
In-Reply-To: <20080513204206.GA17781@damson.getinternet.no>


* Vegard Nossum <vegard.nossum@gmail.com> 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@elte.hu>
Date: Wed May 14 08:47:40 CEST 2008

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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

  parent reply	other threads:[~2008-05-14  6:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 20:42 Vegard Nossum
2008-05-13 20:54 ` Andi Kleen
2008-05-13 21:09   ` Vegard Nossum
2008-05-13 21:19     ` Andi Kleen
2008-05-14  4:02       ` Arjan van de Ven
2008-05-14  6:58         ` Andi Kleen
2008-05-14 13:55           ` Arjan van de Ven
2008-05-14 15:21             ` Andi Kleen
2008-05-14  6:00       ` Vegard Nossum
2008-05-14  6:56 ` Ingo Molnar [this message]
2008-05-14  7:11   ` Vegard Nossum
2008-05-14  9:09   ` Andreas Herrmann
2008-05-14 11:42     ` Andi Kleen
2008-05-15 16:10       ` Andreas Herrmann
2008-05-16  8:40     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080514065605.GB21369@elte.hu \
    --to=mingo@elte.hu \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=ak@suse.de \
    --cc=andreas.herrmann3@amd.com \
    --cc=caglar@pardus.org.tr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=tglx@linutronix.de \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®