Re: suspicious RCU usage (perf)

From: Steven Rostedt
Date: Mon Aug 26 2013 - 13:30:49 EST


On Mon, 26 Aug 2013 09:29:28 -0700
"Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> wrote:

> On Mon, Aug 26, 2013 at 10:58:38AM -0400, Dave Jones wrote:
> > Another day, another rcu backtrace..
> > This says rc6, but it's pretty darn close to rc7, I think it was running
> > a build from Friday.
>
> Could you please send your .config? Also, were you running ftrace,
> perf, RCU event tracing, or what?
>
> Looks like you are running ftrace, but I though Steven had set that
> up so that it could be called from an extended quiescent state.
>

I know exactly what the issue is. Yes ftrace is safe to call even from
these extended quiescent states, the problem is that ftrace is also the
infrastructure of other users, where some of those users are not safe.
Namely, perf.

Right now perf is not safe to trace all functions, as some of those
functions have this issue. I was going to add something like:

FTRACE_NON_SAFE(rcu_eqs_enter);

where it will record locations that are not safe for all users, such
that unless a function registers to ftrace with a flag of
"FTRACE_FL_NON_SAFE_OK", anything that is on the non safe list (from
the macro) will not be traced.

Now, how urgent is this fix? perf can only trace functions as root, and
there's no reason for perf to be tracing all functions at the moment.
But yes, a root user could run that and get this warning. Because I was
going to implement this for 3.12 and not for this release.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/