Commit a6f57208 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds

mm/tlb: Remove tlb_remove_table() non-concurrent condition

Will noted that only checking mm_users is incorrect; we should also
check mm_count in order to cover CPUs that have a lazy reference to
this mm (and could do speculative TLB operations).

If removing this turns out to be a performance issue, we can
re-instate a more complete check, but in tlb_table_flush() eliding the

Fixes: 26723911 ("mm, powerpc: move the RCU page-table freeing into generic code")
Reported-by: default avatarWill Deacon <>
Signed-off-by: default avatarPeter Zijlstra (Intel) <>
Acked-by: default avatarRik van Riel <>
Acked-by: default avatarWill Deacon <>
Cc: Nicholas Piggin <>
Cc: David Miller <>
Cc: Martin Schwidefsky <>
Cc: Michael Ellerman <>
Signed-off-by: default avatarLinus Torvalds <>
parent db7ddef3
......@@ -375,15 +375,6 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
struct mmu_table_batch **batch = &tlb->batch;
* When there's less then two users of this mm there cannot be a
* concurrent page-table walk.
if (atomic_read(&tlb->mm->mm_users) < 2) {
if (*batch == NULL) {
*batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
if (*batch == NULL) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment