[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130831195550.GR3871@linux.vnet.ibm.com>
Date: Sat, 31 Aug 2013 12:55:50 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Olsa <jolsa@...hat.com>
Subject: Re: [RFC][PATCH 12/18 v2] ftrace: Disable RCU unsafe checker when
function graph is enabled
On Sat, Aug 31, 2013 at 01:11:29AM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
>
> Having the RCU unsafe checker running when function graph is enabled
> can cause a live lock. That's because the RCU unsafe checker enables
> full lockdep debugging on RCU which does a lot of interal calls that
> may be traced by the function graph tacer. This adds quite a bit of
s/tacer/tracer/ (Yeah, yeah, picky, picky!)
> overhead and can possibly live lock the system.
>
> Just do not do the RCU unsafe checks when function graph tracer is
> enabled.
>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
One question: How does the user/tester/developer know that RCU-unsafe
checks have been disabled by function-graph tracing? Would it make
sense to print something to dmesg calling this out? Or do the transitions
happen too often?
Thanx, Paul
> ---
> kernel/trace/ftrace.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 69b7f62..310b727 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -5118,6 +5118,12 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,
> goto out;
> }
>
> + /*
> + * The Unsafe RCU checker can live lock function graph tracing.
> + * It's best to just disable it while doing the fgraph tracing.
> + */
> + ftrace_unsafe_rcu_checker_disable();
> +
> ftrace_graph_return = retfunc;
> ftrace_graph_entry = entryfunc;
>
> @@ -5141,6 +5147,7 @@ void unregister_ftrace_graph(void)
> ftrace_shutdown(&global_ops, FTRACE_STOP_FUNC_RET);
> unregister_pm_notifier(&ftrace_suspend_notifier);
> unregister_trace_sched_switch(ftrace_graph_probe_sched_switch, NULL);
> + ftrace_unsafe_rcu_checker_enable();
>
> out:
> mutex_unlock(&ftrace_lock);
> --
> 1.7.10.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists