From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758332AbYFSVgG (ORCPT ); Thu, 19 Jun 2008 17:36:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752638AbYFSVck (ORCPT ); Thu, 19 Jun 2008 17:32:40 -0400 Received: from ns2.suse.de ([195.135.220.15]:42784 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755553AbYFSVcj (ORCPT ); Thu, 19 Jun 2008 17:32:39 -0400 Date: Thu, 19 Jun 2008 14:30:12 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Greg KH , Ingo Molnar , Thomas Gleixner , x86@kernel.org, Vegard Nossum Subject: [patch 14/15] x86: remove mwait capability C-state check Message-ID: <20080619213012.GO20267@suse.de> References: <20080619211313.834170620@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="x86-remove-mwait-capability-c-state-check.patch" In-Reply-To: <20080619212621.GA20267@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.25-stable review patch. If anyone has any objections, please let us know. ------------------ From: Ingo Molnar back-ported from upstream commit a738d897b7b03b83488ae74a9bc03d26a2875dc6 by Vegard Nossum Vegard Nossum reports: | powertop shows between 200-400 wakeups/second with the description | ": 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). | | The bisect resulted in this commit: | | commit 0c07ee38c9d4eb081758f5ad14bbffa7197e1aec | Date: Wed Jan 30 13:33:16 2008 +0100 | | x86: use the correct cpuid method to detect MWAIT support for C states remove the functional effects of this patch and make mwait unconditional. A future patch will turn off mwait on specific CPUs where that causes power to be wasted. Bisected-by: Vegard Nossum Tested-by: Vegard Nossum Signed-off-by: Ingo Molnar Signed-off-by: Vegard Nossum Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/process_32.c | 10 +--------- arch/x86/kernel/process_64.c | 11 +---------- 2 files changed, 2 insertions(+), 19 deletions(-) --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -259,14 +259,6 @@ static void mwait_idle(void) mwait_idle_with_hints(0, 0); } -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; -} - void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) { static int selected; @@ -279,7 +271,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 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -254,15 +254,6 @@ static void mwait_idle(void) } } - -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; -} - void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) { static int selected; @@ -275,7 +266,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 --