x86: mm: fix rcu splat from new TLB tracepoints
PATCH 1/1 x86: mm: fix rcu splat from new TLB tracepoints
From: Dave Hansen <[email protected]>
This is a bug fix that needs to be pushed to mainline before the 3.17 release.
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.
---
b/arch/x86/mm/tlb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/x86/mm/tlb.c renamed from arch/x86/mm/tlb.c~mm-fix-rcu-splat-from-tlb-tracepoints +7 -1
@@ -49,7 +49,13 @@ void leave_mm(int cpu)if (cpumask_test_cpu (cpu,mm_cpumask (active_mm))) {cpumask_clear_cpu (cpu,mm_cpumask (active_mm));load_cr3 (swapper_pg_dir); -trace_tlb_flush (TLB_FLUSH_ON_TASK_SWITCH ,TLB_FLUSH_ALL ); +/* +* This gets called in the idle path where RCU +* functions differently. Tracing normally +* uses RCU, so we have to call the tracepoint +* specially here. +*/ +trace_tlb_flush_rcuidle (TLB_FLUSH_ON_TASK_SWITCH ,TLB_FLUSH_ALL ); } }EXPORT_SYMBOL_GPL (leave_mm);
_
Quoted 13 lines · Dave Hansen
From: Dave Hansen <[email protected]>
This is a bug fix that needs to be pushed to mainline before the 3.17 release.
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
_rcuidlesuffix to the tracepoint.
Quoted 7 lines
http://lkml.kernel.org/r/[email protected]This patch does just that.
Signed-off-by Dave Hansen <[email protected]>Reported-by Dave Jones <[email protected]>,
Quoted 25 lines
---
b/arch/x86/mm/tlb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)diff -puN
arch/x86/mm/tlb.c~mm-fix-rcu-splat-from-tlb-tracepointsarch/x86/mm/tlb.carch/x86/mm/tlb.c renamed from arch/x86/mm/tlb.c~mm-fix-rcu-splat-from-tlb-tracepoints +7
-1@@ -49,7 +49,13 @@ void leave_mm(int cpu)if (cpumask_test_cpu (cpu,mm_cpumask (active_mm))) {cpumask_clear_cpu (cpu,mm_cpumask (active_mm));load_cr3 (swapper_pg_dir); -trace_tlb_flush (TLB_FLUSH_ON_TASK_SWITCH ,TLB_FLUSH_ALL ); +/* +* This gets called in the idle path where RCU +* functions differently. Tracing normally +* uses RCU, so we have to call the tracepoint +* specially here. +*/ +trace_tlb_flush_rcuidle (TLB_FLUSH_ON_TASK_SWITCH ,TLB_FLUSH_ALL ); } }EXPORT_SYMBOL_GPL (leave_mm);_
tip-bot for Dave Hansen
merge bot[tip:x86/urgent] x86/mm: Fix RCU splat from new TLB tracepoints
In reply to Dave Hansenx86/mm: Fix RCU splat from new TLB tracepoints
Commit-ID: 7c7f1547b627092737493f0781780af85cc9b1a4 Gitweb: http://git.kernel.org/tip/7c7f1547b627092737493f0781780af85cc9b1a4 Author: Dave Hansen <[email protected]> AuthorDate: Thu, 7 Aug 2014 10:58:41 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 8 Aug 2014 10:35:00 +0200
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.
--- arch/x86/mm/tlb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/x86/mm/tlb.c +7 -1
@@ -49,7 +49,13 @@ void leave_mm(int cpu)if (cpumask_test_cpu (cpu,mm_cpumask (active_mm))) {cpumask_clear_cpu (cpu,mm_cpumask (active_mm));load_cr3 (swapper_pg_dir); -trace_tlb_flush (TLB_FLUSH_ON_TASK_SWITCH ,TLB_FLUSH_ALL ); +/* +* This gets called in the idle path where RCU +* functions differently. Tracing normally +* uses RCU, so we have to call the tracepoint +* specially here. +*/ +trace_tlb_flush_rcuidle (TLB_FLUSH_ON_TASK_SWITCH ,TLB_FLUSH_ALL ); } }EXPORT_SYMBOL_GPL (leave_mm);