linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda
@ 2008-12-31 21:44 Ravikiran G Thirumalai
  2008-12-31 22:18 ` Mike Travis
  2009-01-02 16:09 ` Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: Ravikiran G Thirumalai @ 2008-12-31 21:44 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, travis

The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209)
to remove static boot cpu pdas introduced a bug.  _boot_cpu_pda is the
actual pda used by the boot cpu and is definitely not "__read_mostly" and
ended up polluting the read mostly section with writes.  This bug caused
regression of about 8-10% on certain syscall intensive workloads.

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

Index: linux-2.6/arch/x86/kernel/head64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/head64.c	2008-12-30 15:28:08.000000000 -0800
+++ linux-2.6/arch/x86/kernel/head64.c	2008-12-31 10:36:21.000000000 -0800
@@ -27,7 +27,7 @@
 #include <asm/trampoline.h>
 
 /* boot cpu pda */
-static struct x8664_pda _boot_cpu_pda __read_mostly;
+static struct x8664_pda _boot_cpu_pda;
 
 #ifdef CONFIG_SMP
 /*

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda
  2008-12-31 21:44 [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda Ravikiran G Thirumalai
@ 2008-12-31 22:18 ` Mike Travis
  2009-01-02 16:09 ` Ingo Molnar
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Travis @ 2008-12-31 22:18 UTC (permalink / raw)
  To: Ravikiran G Thirumalai; +Cc: Ingo Molnar, linux-kernel

Ravikiran G Thirumalai wrote:
> The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209)
> to remove static boot cpu pdas introduced a bug.  _boot_cpu_pda is the
> actual pda used by the boot cpu and is definitely not "__read_mostly" and
> ended up polluting the read mostly section with writes.  This bug caused
> regression of about 8-10% on certain syscall intensive workloads.
> 
> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
> 
> Index: linux-2.6/arch/x86/kernel/head64.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/head64.c	2008-12-30 15:28:08.000000000 -0800
> +++ linux-2.6/arch/x86/kernel/head64.c	2008-12-31 10:36:21.000000000 -0800
> @@ -27,7 +27,7 @@
>  #include <asm/trampoline.h>
>  
>  /* boot cpu pda */
> -static struct x8664_pda _boot_cpu_pda __read_mostly;
> +static struct x8664_pda _boot_cpu_pda;
>  
>  #ifdef CONFIG_SMP
>  /*

Thanks for catching that!

Mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda
  2008-12-31 21:44 [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda Ravikiran G Thirumalai
  2008-12-31 22:18 ` Mike Travis
@ 2009-01-02 16:09 ` Ingo Molnar
  2009-01-02 18:55   ` Ravikiran G Thirumalai
  1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2009-01-02 16:09 UTC (permalink / raw)
  To: Ravikiran G Thirumalai; +Cc: linux-kernel, travis


* Ravikiran G Thirumalai <kiran@scalex86.org> wrote:

> The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209)
> to remove static boot cpu pdas introduced a bug.  _boot_cpu_pda is the
> actual pda used by the boot cpu and is definitely not "__read_mostly" and
> ended up polluting the read mostly section with writes.  This bug caused
> regression of about 8-10% on certain syscall intensive workloads.
> 
> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

applied to tip/x86/urgent, with a Cc: stable tag. Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda
  2009-01-02 16:09 ` Ingo Molnar
@ 2009-01-02 18:55   ` Ravikiran G Thirumalai
  2009-01-02 19:20     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Ravikiran G Thirumalai @ 2009-01-02 18:55 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, travis, stable, shai

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

On Fri, Jan 02, 2009 at 05:09:51PM +0100, Ingo Molnar wrote:
>
>* Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
>
>> The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209)
>> to remove static boot cpu pdas introduced a bug.  _boot_cpu_pda is the
>> actual pda used by the boot cpu and is definitely not "__read_mostly" and
>> ended up polluting the read mostly section with writes.  This bug caused
>> regression of about 8-10% on certain syscall intensive workloads.
>> 
>> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
>
>applied to tip/x86/urgent, with a Cc: stable tag. Thanks,
>

Thanks!

Stable maintainers, please consider this for 2.6.27 stable as well
(in addition to 28).  (Attaching the tip/x86/urgent commit as reference to
the patch)

Thanks,
Kiran

[-- Attachment #2: fix_incorrect_readmostly --]
[-- Type: text/plain, Size: 1118 bytes --]

commit 26799a63110dcbe81291ea53178f6b4810d07424
Author: Ravikiran G Thirumalai <kiran@scalex86.org>
Date:   Wed Dec 31 13:44:46 2008 -0800

    x86: fix incorrect __read_mostly on _boot_cpu_pda
    
    The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209)
    to remove static boot cpu pdas introduced a performance bug.
    
    _boot_cpu_pda is the actual pda used by the boot cpu and is definitely
    not "__read_mostly" and ended up polluting the read mostly section with
    writes.  This bug caused regression of about 8-10% on certain syscall
    intensive workloads.
    
    Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
    Acked-by: Mike Travis <travis@sgi.com>
    Cc: <stable@kernel.org>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 388e05a..b9a4d8c 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -27,7 +27,7 @@
 #include <asm/trampoline.h>
 
 /* boot cpu pda */
-static struct x8664_pda _boot_cpu_pda __read_mostly;
+static struct x8664_pda _boot_cpu_pda;
 
 #ifdef CONFIG_SMP
 /*

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda
  2009-01-02 18:55   ` Ravikiran G Thirumalai
@ 2009-01-02 19:20     ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2009-01-02 19:20 UTC (permalink / raw)
  To: Ravikiran G Thirumalai; +Cc: linux-kernel, travis, stable, shai


* Ravikiran G Thirumalai <kiran@scalex86.org> wrote:

> On Fri, Jan 02, 2009 at 05:09:51PM +0100, Ingo Molnar wrote:
> >
> >* Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
> >
> >> The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209)
> >> to remove static boot cpu pdas introduced a bug.  _boot_cpu_pda is the
> >> actual pda used by the boot cpu and is definitely not "__read_mostly" and
> >> ended up polluting the read mostly section with writes.  This bug caused
> >> regression of about 8-10% on certain syscall intensive workloads.
> >> 
> >> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
> >
> >applied to tip/x86/urgent, with a Cc: stable tag. Thanks,
> >
> 
> Thanks!
> 
> Stable maintainers, please consider this for 2.6.27 stable as well (in 
> addition to 28).  (Attaching the tip/x86/urgent commit as reference to 
> the patch)

i have added a -stable tag to the commit - please only put it into -stable 
once it hits Linus's tree. (in the next couple of days)

> 
	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-02 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-31 21:44 [patch] x86: Fix incorrect __read_mostly on _boot_cpu_pda Ravikiran G Thirumalai
2008-12-31 22:18 ` Mike Travis
2009-01-02 16:09 ` Ingo Molnar
2009-01-02 18:55   ` Ravikiran G Thirumalai
2009-01-02 19:20     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).