x86_64 remote tlb invalidation
Subsystems (2)
Reading through arch/x86/kernel/tlb_64.c, I've been wondering why the code for native_flush_tlb_others() can't be simplified as follows:
arch/x86/kernel/tlb_64.c +1 -1
@@ -180,7 +180,7 @@ f->flush_mm = mm; f->flush_va = va; -cpus_or (f->flush_cpumask, cpumask, f->flush_cpumask); + f->flush_cpumask = cpumask;/* * Make the above memory operations globally visible before
My reasoning:
* The previous invocation of native_flush_tlb_others() waited for f->flush_cpumask to be cleared before it unlocked f->tlbstate_lock;
* sets bits in the flush_cpumask field of union smp_flush_state without holding the correwsponding tlbstate_lock;
* Therefore, f->flush_cpumask must still be cleared when the next invocation of native_flush_tlb_others() reacquires f->tlbstate_lock.
I don't think I missed anything, did I ?
Thanks,
Signature · 8 lines
Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>