Skip to content

Commit 7c7f154

Browse files
hansendcIngo Molnar
authored andcommitted
x86/mm: Fix RCU splat from new TLB tracepoints
Dave Jones reported seeing a bug from one of my TLB tracepoints: http://lkml.kernel.org/r/[email protected] According to Paul McKenney, the right way to fix this is adding an _rcuidle suffix to the tracepoint. http://lkml.kernel.org/r/[email protected] This patch does just that. Reported-by: Dave Jones <[email protected]>, Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Paul E. McKenney <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 98a96f2 commit 7c7f154

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

arch/x86/mm/tlb.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ void leave_mm(int cpu)
4949
if (cpumask_test_cpu(cpu, mm_cpumask(active_mm))) {
5050
cpumask_clear_cpu(cpu, mm_cpumask(active_mm));
5151
load_cr3(swapper_pg_dir);
52-
trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
52+
/*
53+
* This gets called in the idle path where RCU
54+
* functions differently. Tracing normally
55+
* uses RCU, so we have to call the tracepoint
56+
* specially here.
57+
*/
58+
trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
5359
}
5460
}
5561
EXPORT_SYMBOL_GPL(leave_mm);

0 commit comments

Comments
 (0)