diff options
author | Thomas Gleixner <[email protected]> | 2022-09-15 13:11:01 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2022-10-17 16:41:03 +0200 |
commit | e57ef2ed97c1d078973298658a8096644a1e9e09 (patch) | |
tree | 79cb9a8835ab832a8e8c302abf1ffe0c0ad96c5f /arch/x86/kernel/process_32.c | |
parent | fdc9ee7e97aa2c1dfa7ebb092fffec40ffa59108 (diff) |
x86: Put hot per CPU variables into a struct
The layout of per-cpu variables is at the mercy of the compiler. This
can lead to random performance fluctuations from build to build.
Create a structure to hold some of the hottest per-cpu variables,
starting with current_task.
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 2f314b170c9f..807da45d84c7 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -207,7 +207,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) if (prev->gs | next->gs) loadsegment(gs, next->gs); - this_cpu_write(current_task, next_p); + raw_cpu_write(pcpu_hot.current_task, next_p); switch_fpu_finish(); |