* [PATCH] [BUGFIX] x86: mm: fix rcu splat from new TLB tracepoints
@ 2014-08-07 17:58 Dave Hansen
2014-08-07 18:11 ` Paul E. McKenney
2014-08-08 9:19 ` [tip:x86/urgent] x86/mm: Fix RCU " tip-bot for Dave Hansen
0 siblings, 2 replies; 3+ messages in thread
From: Dave Hansen @ 2014-08-07 17:58 UTC (permalink / raw)
To: linux-kernel; +Cc: Dave Hansen, dave.hansen, davej, paulmck, hpa, x86
From: Dave Hansen <dave.hansen@linux.intel.com>
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/20140806181801.GA4605@redhat.com
According to Paul McKenney, the right way to fix this is adding
an _rcuidle suffix to the tracepoint.
http://lkml.kernel.org/r/20140807065055.GA5821@linux.vnet.ibm.com
This patch does just that.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reported-by: Dave Jones <davej@redhat.com>,
Cc: paulmck@linux.vnet.ibm.com
---
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-tracepoints arch/x86/mm/tlb.c
--- a/arch/x86/mm/tlb.c~mm-fix-rcu-splat-from-tlb-tracepoints 2014-08-07 10:55:43.312283542 -0700
+++ b/arch/x86/mm/tlb.c 2014-08-07 10:56:49.763352575 -0700
@@ -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);
_
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] [BUGFIX] x86: mm: fix rcu splat from new TLB tracepoints
2014-08-07 17:58 [PATCH] [BUGFIX] x86: mm: fix rcu splat from new TLB tracepoints Dave Hansen
@ 2014-08-07 18:11 ` Paul E. McKenney
2014-08-08 9:19 ` [tip:x86/urgent] x86/mm: Fix RCU " tip-bot for Dave Hansen
1 sibling, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2014-08-07 18:11 UTC (permalink / raw)
To: Dave Hansen; +Cc: linux-kernel, dave.hansen, davej, hpa, x86
On Thu, Aug 07, 2014 at 10:58:41AM -0700, Dave Hansen wrote:
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> 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/20140806181801.GA4605@redhat.com
>
> According to Paul McKenney, the right way to fix this is adding
> an _rcuidle suffix to the tracepoint.
>
> http://lkml.kernel.org/r/20140807065055.GA5821@linux.vnet.ibm.com
>
> This patch does just that.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Reported-by: Dave Jones <davej@redhat.com>,
> Cc: paulmck@linux.vnet.ibm.com
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---
>
> 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-tracepoints arch/x86/mm/tlb.c
> --- a/arch/x86/mm/tlb.c~mm-fix-rcu-splat-from-tlb-tracepoints 2014-08-07 10:55:43.312283542 -0700
> +++ b/arch/x86/mm/tlb.c 2014-08-07 10:56:49.763352575 -0700
> @@ -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);
> _
>
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:x86/urgent] x86/mm: Fix RCU splat from new TLB tracepoints
2014-08-07 17:58 [PATCH] [BUGFIX] x86: mm: fix rcu splat from new TLB tracepoints Dave Hansen
2014-08-07 18:11 ` Paul E. McKenney
@ 2014-08-08 9:19 ` tip-bot for Dave Hansen
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Dave Hansen @ 2014-08-08 9:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, torvalds, dave, paulmck, tglx,
dave.hansen
Commit-ID: 7c7f1547b627092737493f0781780af85cc9b1a4
Gitweb: http://git.kernel.org/tip/7c7f1547b627092737493f0781780af85cc9b1a4
Author: Dave Hansen <dave.hansen@linux.intel.com>
AuthorDate: Thu, 7 Aug 2014 10:58:41 -0700
Committer: Ingo Molnar <mingo@kernel.org>
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/20140806181801.GA4605@redhat.com
According to Paul McKenney, the right way to fix this is adding
an _rcuidle suffix to the tracepoint.
http://lkml.kernel.org/r/20140807065055.GA5821@linux.vnet.ibm.com
This patch does just that.
Reported-by: Dave Jones <davej@redhat.com>,
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20140807175841.5C92D878@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/mm/tlb.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 1fe3398..98b7976 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-08 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-07 17:58 [PATCH] [BUGFIX] x86: mm: fix rcu splat from new TLB tracepoints Dave Hansen
2014-08-07 18:11 ` Paul E. McKenney
2014-08-08 9:19 ` [tip:x86/urgent] x86/mm: Fix RCU " tip-bot for Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox