Skip to content

Commit 3f79e4c

Browse files
amlutoIngo Molnar
authored andcommitted
x86/mm: Use new merged flush logic in arch_tlbbatch_flush()
Now there's only one copy of the local tlb flush logic for non-kernel pages on SMP kernels. The only functional change is that arch_tlbbatch_flush() will now leave_mm() on the local CPU if that CPU is in the batch and is in TLBSTATE_LAZY mode. Signed-off-by: Andy Lutomirski <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Nadav Amit <[email protected]> Cc: Nadav Amit <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 454bbad commit 3f79e4c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

arch/x86/mm/tlb.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,8 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)
382382

383383
int cpu = get_cpu();
384384

385-
if (cpumask_test_cpu(cpu, &batch->cpumask)) {
386-
count_vm_tlb_event(NR_TLB_LOCAL_FLUSH_ALL);
387-
local_flush_tlb();
388-
trace_tlb_flush(TLB_LOCAL_SHOOTDOWN, TLB_FLUSH_ALL);
389-
}
390-
385+
if (cpumask_test_cpu(cpu, &batch->cpumask))
386+
flush_tlb_func_local(&info, TLB_LOCAL_SHOOTDOWN);
391387
if (cpumask_any_but(&batch->cpumask, cpu) < nr_cpu_ids)
392388
flush_tlb_others(&batch->cpumask, &info);
393389
cpumask_clear(&batch->cpumask);

0 commit comments

Comments
 (0)