diff options
author | Nadav Amit <namit@vmware.com> | 2021-02-20 15:17:08 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-03-06 12:59:10 +0100 |
commit | 2f4305b19fe6a2a261d76c21856c5598f7d878fe (patch) | |
tree | 061ebf3ef8372e4da41a4c113127381207bc1d0c /arch/x86/mm/init.c | |
parent | 4ce94eabac16b1d2c95762b40f49e5654ab288d7 (diff) | |
download | lwn-2f4305b19fe6a2a261d76c21856c5598f7d878fe.tar.gz lwn-2f4305b19fe6a2a261d76c21856c5598f7d878fe.zip |
x86/mm/tlb: Privatize cpu_tlbstate
cpu_tlbstate is mostly private and only the variable is_lazy is shared.
This causes some false-sharing when TLB flushes are performed.
Break cpu_tlbstate intro cpu_tlbstate and cpu_tlbstate_shared, and mark
each one accordingly.
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20210220231712.2475218-6-namit@vmware.com
Diffstat (limited to 'arch/x86/mm/init.c')
-rw-r--r-- | arch/x86/mm/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index dd694fb93916..ed2e36748758 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -1017,7 +1017,7 @@ void __init zone_sizes_init(void) free_area_init(max_zone_pfns); } -__visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = { +__visible DEFINE_PER_CPU_ALIGNED(struct tlb_state, cpu_tlbstate) = { .loaded_mm = &init_mm, .next_asid = 1, .cr4 = ~0UL, /* fail hard if we screw up cr4 shadow initialization */ |