[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200114171131.04eff860@gandalf.local.home>
Date: Tue, 14 Jan 2020 17:11:31 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Tom Zanussi <zanussi@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [for-next][PATCH 26/26] tracing: trigger: Replace unneeded
RCU-list traversals
On Tue, 14 Jan 2020 16:03:42 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> From: Masami Hiramatsu <mhiramat@...nel.org>
>
> With CONFIG_PROVE_RCU_LIST, I had many suspicious RCU warnings
> when I ran ftracetest trigger testcases.
>
> -----
> # dmesg -c > /dev/null
> # ./ftracetest test.d/trigger
> ...
> # dmesg | grep "RCU-list traversed" | cut -f 2 -d ] | cut -f 2 -d " "
> kernel/trace/trace_events_hist.c:6070
> kernel/trace/trace_events_hist.c:1760
> kernel/trace/trace_events_hist.c:5911
> kernel/trace/trace_events_trigger.c:504
> kernel/trace/trace_events_hist.c:1810
> kernel/trace/trace_events_hist.c:3158
> kernel/trace/trace_events_hist.c:3105
> kernel/trace/trace_events_hist.c:5518
> kernel/trace/trace_events_hist.c:5998
> kernel/trace/trace_events_hist.c:6019
> kernel/trace/trace_events_hist.c:6044
> kernel/trace/trace_events_trigger.c:1500
> kernel/trace/trace_events_trigger.c:1540
> kernel/trace/trace_events_trigger.c:539
> kernel/trace/trace_events_trigger.c:584
> -----
>
> I investigated those warnings and found that the RCU-list
> traversals in event trigger and hist didn't need to use
> RCU version because those were called only under event_mutex.
>
> I also checked other RCU-list traversals related to event
> trigger list, and found that most of them were called from
> event_hist_trigger_func() or hist_unregister_trigger() or
> register/unregister functions except for a few cases.
>
> Replace these unneeded RCU-list traversals with normal list
> traversal macro and lockdep_assert_held() to check the
> event_mutex is held.
>
> Link: http://lkml.kernel.org/r/157680910305.11685.15110237954275915782.stgit@devnote2
>
> Reviewed-by: Tom Zanussi <zanussi@...nel.org>
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> ---
> kernel/trace/trace_events_hist.c | 41 +++++++++++++++++++++--------
> kernel/trace/trace_events_trigger.c | 20 ++++++++++----
> 2 files changed, 45 insertions(+), 16 deletions(-)
>
I think I may add this to my urgent branch and mark this for stable.
-- Steve
Powered by blists - more mailing lists