[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230310194005.374c5367@gandalf.local.home>
Date: Fri, 10 Mar 2023 19:40:05 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH v2] tracing: Make tracepoint lockdep check actually test
something
On Sat, 11 Mar 2023 00:56:53 +0100
Peter Zijlstra <peterz@...radead.org> wrote:
> On Fri, Mar 10, 2023 at 05:28:56PM -0500, Steven Rostedt wrote:
>
> > @@ -249,9 +248,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
> > TP_ARGS(args), \
> > TP_CONDITION(cond), 0); \
> > if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
> > - rcu_read_lock_sched_notrace(); \
> > - rcu_dereference_sched(__tracepoint_##name.funcs);\
> > - rcu_read_unlock_sched_notrace(); \
> > + WARN_ON_ONCE(!rcu_is_watching()); \
> > } \
> > } \
> > __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
>
> Yep, that makes heaps more sense. If you so care you can save one more
> line and make the {} go away too.
I thought about that, but I kinda prefer the brackets still.
>
> In any case,
>
> Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Thanks!
-- Steve
Powered by blists - more mailing lists