diff options
author | Vitaly Kuznetsov <[email protected]> | 2017-08-28 10:22:51 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-08-31 11:07:07 +0200 |
commit | 9e52fc2b50de3a1c08b44f94c610fbe998c0031a (patch) | |
tree | f10ceefa5a27f2bd559e0d93c31600b19ed9dc3f /drivers/clocksource/timer-stm32.c | |
parent | 39e48d9b128abbd2ea9b8403bb1e2693323db2f4 (diff) |
x86/mm: Enable RCU based page table freeing (CONFIG_HAVE_RCU_TABLE_FREE=y)
There's a subtle bug in how some of the paravirt guest code handles
page table freeing on x86:
On x86 software page table walkers depend on the fact that remote TLB flush
does an IPI: walk is performed lockless but with interrupts disabled and in
case the page table is freed the freeing CPU will get blocked as remote TLB
flush is required. On other architectures which don't require an IPI to do
remote TLB flush we have an RCU-based mechanism (see
include/asm-generic/tlb.h for more details).
In virtualized environments we may want to override the ->flush_tlb_others
callback in pv_mmu_ops and use a hypercall asking the hypervisor to do a
remote TLB flush for us. This breaks the assumption about IPIs. Xen PV has
been doing this for years and the upcoming remote TLB flush for Hyper-V will
do it too.
This is not safe, as software page table walkers may step on an already
freed page.
Fix the bug by enabling the RCU-based page table freeing mechanism,
CONFIG_HAVE_RCU_TABLE_FREE=y.
Testing with kernbench and mmap/munmap microbenchmarks, and neither showed
any noticeable performance impact.
Suggested-by: Peter Zijlstra <[email protected]>
Signed-off-by: Vitaly Kuznetsov <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Acked-by: Juergen Gross <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Jork Loeser <[email protected]>
Cc: KY Srinivasan <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
[ Rewrote/fixed/clarified the changelog. ]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/clocksource/timer-stm32.c')
0 files changed, 0 insertions, 0 deletions