[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Dec 2013 20:49:41 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Mike Galbraith <bitbucket@...ine.de>
CC: Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Len Brown <lenb@...nel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jeremy Eder <jeder@...hat.com>, x86@...nel.org
Subject: Re: 50 Watt idle power regression bisected to Linux-3.10
On 12/11/2013 08:25 PM, Mike Galbraith wrote:
> arch/x86/include/asm/mwait.h | 4 ++--
> arch/x86/kernel/cpu/common.c | 7 ++++---
> arch/x86/kernel/setup_percpu.c | 1 +
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> Index: linux-2.6/arch/x86/kernel/cpu/common.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/cpu/common.c
> +++ linux-2.6/arch/x86/kernel/cpu/common.c
> @@ -65,13 +65,14 @@ void __init setup_cpu_local_masks(void)
> }
>
> /* allocate percpu area for mwait doorbell */
> -char __percpu *mwait_doorbell;
> +DEFINE_PER_CPU(char *, mwait_doorbell);
> +EXPORT_PER_CPU_SYMBOL(mwait_doorbell);
>
Sorry, this is wrong. This is NOT a percpu variable, it is a pointer to
a percpu allocation, but the variable itself is not a percpu variable.
This explains your boom.
> void __init setup_mwait_doorbell(void)
> {
> if (boot_cpu_has(X86_FEATURE_MWAIT)) {
> - mwait_doorbell = __alloc_percpu(boot_cpu_data.clflush_size,
> - boot_cpu_data.clflush_size);
> + mwait_doorbell = __alloc_percpu(boot_cpu_data.x86_clflush_size,
> + boot_cpu_data.x86_clflush_size);
>
> if (!mwait_doorbell) {
> /* This should never happen... */
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists