Skip to content

Commit 2815a56

Browse files
rikvanrielIngo Molnar
authored andcommitted
x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU
Add a tracepoint when we send a TLB flush IPI to a CPU that used to be in the mm_cpumask, but isn't any more. Suggested-by: Dave Hansen <[email protected]> Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 209954c commit 2815a56

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

arch/x86/mm/tlb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ static void flush_tlb_func(void *info)
760760
/* Can only happen on remote CPUs */
761761
if (f->mm && f->mm != loaded_mm) {
762762
cpumask_clear_cpu(raw_smp_processor_id(), mm_cpumask(f->mm));
763+
trace_tlb_flush(TLB_REMOTE_WRONG_CPU, 0);
763764
return;
764765
}
765766
}

include/linux/mm_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,7 @@ enum tlb_flush_reason {
13351335
TLB_LOCAL_SHOOTDOWN,
13361336
TLB_LOCAL_MM_SHOOTDOWN,
13371337
TLB_REMOTE_SEND_IPI,
1338+
TLB_REMOTE_WRONG_CPU,
13381339
NR_TLB_FLUSH_REASONS,
13391340
};
13401341

0 commit comments

Comments
 (0)