diff options
author | Peter Zijlstra <[email protected]> | 2018-08-22 17:30:14 +0200 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-08-23 11:55:58 -0700 |
commit | a6f572084fbee8b30f91465f4a085d7a90901c57 (patch) | |
tree | edfe14d7b24d0c54599e90ee493542be8a0411e9 | |
parent | db7ddef301128dad394f1c0f77027f86ee9a4edb (diff) |
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
call_rcu_sched().
Fixes: 267239116987 ("mm, powerpc: move the RCU page-table freeing into generic code")
Reported-by: Will Deacon <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Acked-by: Will Deacon <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: David Miller <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/memory.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/mm/memory.c b/mm/memory.c index 9b135a35f99c..1893751cf6c0 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -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) { - __tlb_remove_table(table); - return; - } - if (*batch == NULL) { *batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN); if (*batch == NULL) { |