From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Yang Shi <yang.shi@windriver.com>
Subject: [PATCH RT 16/20] trace: Use rcuidle version for preemptoff_hist trace point
Date: Wed, 02 Mar 2016 10:37:14 -0500 [thread overview]
Message-ID: <20160302153717.187187823@goodmis.org> (raw)
In-Reply-To: 20160302153658.995489487@goodmis.org
[-- Attachment #1: 0016-trace-Use-rcuidle-version-for-preemptoff_hist-trace-.patch --]
[-- Type: text/plain, Size: 3975 bytes --]
3.18.27-rt27-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Yang Shi <yang.shi@windriver.com>
When running -rt kernel with both PREEMPT_OFF_HIST and LOCKDEP enabled,
the below error is reported:
[ INFO: suspicious RCU usage. ]
4.4.1-rt6 #1 Not tainted
include/trace/events/hist.h:31 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
no locks held by swapper/0/0.
stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.1-rt6-WR8.0.0.0_standard #1
Stack : 0000000000000006 0000000000000000 ffffffff81ca8c38 ffffffff81c8fc80
ffffffff811bdd68 ffffffff81cb0000 0000000000000000 ffffffff81cb0000
0000000000000000 0000000000000000 0000000000000004 0000000000000000
0000000000000004 ffffffff811bdf50 0000000000000000 ffffffff82b60000
0000000000000000 ffffffff812897ac ffffffff819f0000 000000000000000b
ffffffff811be460 ffffffff81b7c588 ffffffff81c8fc80 0000000000000000
0000000000000000 ffffffff81ec7f88 ffffffff81d70000 ffffffff81b70000
ffffffff81c90000 ffffffff81c3fb00 ffffffff81c3fc28 ffffffff815e6f98
0000000000000000 ffffffff81c8fa87 ffffffff81b70958 ffffffff811bf2c4
0707fe32e8d60ca5 ffffffff81126d60 0000000000000000 0000000000000000
...
Call Trace:
[<ffffffff81126d60>] show_stack+0xe8/0x108
[<ffffffff815e6f98>] dump_stack+0x88/0xb0
[<ffffffff8124b88c>] time_hardirqs_off+0x204/0x300
[<ffffffff811aa5dc>] trace_hardirqs_off_caller+0x24/0xe8
[<ffffffff811a4ec4>] cpu_startup_entry+0x39c/0x508
[<ffffffff81d7dc68>] start_kernel+0x584/0x5a0
Replace regular trace_preemptoff_hist to rcuidle version to avoid the error.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Cc: bigeasy@linutronix.de
Cc: rostedt@goodmis.org
Cc: linux-rt-users@vger.kernel.org
Link: http://lkml.kernel.org/r/1456262603-10075-1-git-send-email-yang.shi@windriver.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/trace/events/hist.h | 1 +
kernel/trace/trace_irqsoff.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h
index 6122e4286177..f7710de1b1f3 100644
--- a/include/trace/events/hist.h
+++ b/include/trace/events/hist.h
@@ -9,6 +9,7 @@
#if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
#define trace_preemptirqsoff_hist(a, b)
+#define trace_preemptirqsoff_hist_rcuidle(a, b)
#else
TRACE_EVENT(preemptirqsoff_hist,
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
index de4f1a812c41..d1940b095d85 100644
--- a/kernel/trace/trace_irqsoff.c
+++ b/kernel/trace/trace_irqsoff.c
@@ -436,13 +436,13 @@ void start_critical_timings(void)
{
if (preempt_trace() || irq_trace())
start_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
- trace_preemptirqsoff_hist(TRACE_START, 1);
+ trace_preemptirqsoff_hist_rcuidle(TRACE_START, 1);
}
EXPORT_SYMBOL_GPL(start_critical_timings);
void stop_critical_timings(void)
{
- trace_preemptirqsoff_hist(TRACE_STOP, 0);
+ trace_preemptirqsoff_hist_rcuidle(TRACE_STOP, 0);
if (preempt_trace() || irq_trace())
stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
}
@@ -487,7 +487,7 @@ inline void print_irqtrace_events(struct task_struct *curr)
*/
void trace_hardirqs_on(void)
{
- trace_preemptirqsoff_hist(IRQS_ON, 0);
+ trace_preemptirqsoff_hist_rcuidle(IRQS_ON, 0);
if (!preempt_trace() && irq_trace())
stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
}
@@ -497,7 +497,7 @@ void trace_hardirqs_off(void)
{
if (!preempt_trace() && irq_trace())
start_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
- trace_preemptirqsoff_hist(IRQS_OFF, 1);
+ trace_preemptirqsoff_hist_rcuidle(IRQS_OFF, 1);
}
EXPORT_SYMBOL(trace_hardirqs_off);
--
2.7.0
next prev parent reply other threads:[~2016-03-02 15:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 15:36 [PATCH RT 00/20] Linux 3.18.27-rt27-rc1 Steven Rostedt
2016-03-02 15:36 ` [PATCH RT 01/20] sched: reset tasks lockless wake-queues on fork() Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 02/20] ptrace: dont open IRQs in ptrace_freeze_traced() too early Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 03/20] net: move xmit_recursion to per-task variable on -RT Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 04/20] preempt-lazy: Add the lazy-preemption check to preempt_schedule() Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 05/20] softirq: split timer softirqs out of ksoftirqd Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 06/20] net: provide a way to delegate processing a softirq to ksoftirqd Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 07/20] latencyhist: disable jump-labels Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 08/20] arm64: replace read_lock to rcu lock in call_step_hook Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 09/20] kernel: migrate_disable() do fastpath in atomic & irqs-off Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 10/20] kernel: softirq: unlock with irqs on Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 11/20] kernel/stop_machine: partly revert "stop_machine: Use raw spinlocks" Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 12/20] tick/broadcast: Make broadcast hrtimer irqsafe Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 13/20] sched,rt: __always_inline preemptible_lazy() Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 14/20] drm,radeon,i915: Use preempt_disable/enable_rt() where recommended Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 15/20] drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end() Steven Rostedt
2016-03-02 15:37 ` Steven Rostedt [this message]
2016-03-02 15:37 ` [PATCH RT 17/20] f2fs: Mutex cant be used by down_write_nest_lock() Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 18/20] rcu/torture: Comment out rcu_bh ops on PREEMPT_RT_FULL Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 19/20] kernel: sched: Fix preempt_disable_ip recodring for preempt_disable() Steven Rostedt
2016-03-02 15:37 ` [PATCH RT 20/20] Linux 3.18.27-rt27-rc1 Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160302153717.187187823@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=tglx@linutronix.de \
--cc=yang.shi@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).