Skip to contentSkip to conversation

x86: Fix incorrect __read_mostly on _boot_cpu_pda

PATCH Applied Ravikiran G Thirumalai 3 participants 5 messages Dec 31, 2008 – Jan 2, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Fix incorrect __read_mostly on _boot_cpu_pda

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.

arch/x86/kernel/head64.c +1 -1
Index: linux-2.6/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
 /*
#1 lore raw
Quoted 13 lines · Ravikiran G Thirumalai

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.

Index: linux-2.6/arch/x86/kernel/head64.c
===================================================================

arch/x86/kernel/head64.c line 33

Quoted 8 lines
arch/x86/kernel/head64.c +1 -1
@@ -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

Applied
#2 lore raw
In reply to Ravikiran G Thirumalai
Quoted 7 lines · Ravikiran G Thirumalai

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.

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

Ingo

author Acked-by Mike Travis
#3 lore raw
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Ravikiran G Thirumalai

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.

Quoted 4 lines
Quoted 1 line

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

commit 26799a63110dcbe81291ea53178f6b4810d07424

Author: Ravikiran G Thirumalai <[email protected]>
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.

arch/x86/kernel/head64.c +1 -1
index 388e05a..b9a4d8c 100644
@@ -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
 /*
#4 lore raw
Quoted 12 lines · Ravikiran G Thirumalai
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Ravikiran G Thirumalai

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.

Quoted 8 lines
Quoted 2 lines

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)

Quoted 1 line

Ingo