mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@vger.kernel.org, Dave Hansen <dave.hansen@linux.intel.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: Re: [for-linus][PATCH 5/5] tracing: Make tracepoint lockdep check actually test something
Date: Tue, 14 Mar 2023 17:49:48 -0400	[thread overview]
Message-ID: <20230314174948.17a01cd4@gandalf.local.home> (raw)
In-Reply-To: <f4f52692-9f6c-467a-8988-113aced754eb@paulmck-laptop>

On Tue, 14 Mar 2023 14:08:28 -0700
"Paul E. McKenney" <paulmck@kernel.org> wrote:

> On Tue, Mar 14, 2023 at 03:02:41PM -0400, Steven Rostedt wrote:
> > From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> > 
> > A while ago where the trace events had the following:
> > 
> >    rcu_read_lock_sched_notrace();
> >    rcu_dereference_sched(...);
> >    rcu_read_unlock_sched_notrace();
> > 
> > If the tracepoint is enabled, it could trigger RCU issues if called in
> > the wrong place. And this warning was only triggered if lockdep was
> > enabled. If the tracepoint was never enabled with lockdep, the bug would
> > not be caught. To handle this, the above sequence was done when lockdep
> > was enabled regardless if the tracepoint was enabled or not (although the
> > always enabled code really didn't do anything, it would still trigger a
> > warning).
> > 
> > But a lot has changed since that lockdep code was added. One is, that
> > sequence no longer triggers any warning. Another is, the tracepoint when
> > enabled doesn't even do that sequence anymore.
> > 
> > The main check we care about today is whether RCU is "watching" or not.
> > So if lockdep is enabled, always check if rcu_is_watching() which will
> > trigger a warning if it is not (tracepoints require RCU to be watching).
> > 
> > Note, that old sequence did add a bit of overhead when lockdep was enabled,
> > and with the latest kernel updates, would cause the system to slow down
> > enough to trigger kernel "stalled" warnings.
> > 
> > Link: http://lore.kernel.org/lkml/20140806181801.GA4605@redhat.com
> > Link: http://lore.kernel.org/lkml/20140807175204.C257CAC5@viggo.jf.intel.com
> > Link: https://lore.kernel.org/lkml/20230307184645.521db5c9@gandalf.local.home/
> > Link: https://lore.kernel.org/linux-trace-kernel/20230310172856.77406446@gandalf.local.home
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: Dave Hansen <dave.hansen@linux.intel.com>
> > Cc: "Paul E. McKenney" <paulmck@kernel.org>
> > Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Cc: Joel Fernandes <joel@joelfernandes.org>
> > Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Fixes: e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU")
> > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>  
> 
> Acked-by: Paul E. McKenney <paulmck@kernel.org>
> 

Thanks Paul!

-- Steve

  reply	other threads:[~2023-03-14 21:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 19:02 [for-linus][PATCH 0/5] tracing: Fixes for v6.3 Steven Rostedt
2023-03-14 19:02 ` [for-linus][PATCH 1/5] tracing: Do not let histogram values have some modifiers Steven Rostedt
2023-03-14 19:02 ` [for-linus][PATCH 2/5] tracing: Check field value in hist_field_name() Steven Rostedt
2023-03-14 19:02 ` [for-linus][PATCH 3/5] ftrace: Fix invalid address access in lookup_rec() when index is 0 Steven Rostedt
2023-03-14 19:02 ` [for-linus][PATCH 4/5] ftrace,kcfi: Define ftrace_stub_graph conditionally Steven Rostedt
2023-03-14 19:02 ` [for-linus][PATCH 5/5] tracing: Make tracepoint lockdep check actually test something Steven Rostedt
2023-03-14 21:08   ` Paul E. McKenney
2023-03-14 21:49     ` Steven Rostedt [this message]
2023-03-14 23:03   ` Joel Fernandes
2023-03-14 23:07     ` Joel Fernandes

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=20230314174948.17a01cd4@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®