Skip to content

Commit 7cf82f3

Browse files
Peter Zijlstragregkh
authored andcommitted
mm/tlb: Remove tlb_remove_table() non-concurrent condition
commit a6f5720 upstream. 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: 2672391 ("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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ddcb927 commit 7cf82f3

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

mm/memory.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -392,15 +392,6 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
392392
{
393393
struct mmu_table_batch **batch = &tlb->batch;
394394

395-
/*
396-
* When there's less then two users of this mm there cannot be a
397-
* concurrent page-table walk.
398-
*/
399-
if (atomic_read(&tlb->mm->mm_users) < 2) {
400-
__tlb_remove_table(table);
401-
return;
402-
}
403-
404395
if (*batch == NULL) {
405396
*batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
406397
if (*batch == NULL) {

0 commit comments

Comments
 (0)