lkml.org 
[lkml]   [2013]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: timer: lockup in run_timer_softirq()
From
Date
On Wed, 2013-07-10 at 14:42 +0200, Peter Zijlstra wrote:

> but but but preempt_disable_notrace() isn't an rcu_read_lock().. You can only
> do that for rcu_sched.

Right. And not even rcu_sched is safe, as function tracing can trace
functions out of rcu scope. That's why I had to add that code to do a
schedule_on_each_cpu() in ftrace.

>
> Anyway, I don't see a nice way out of this mess :/ the entire perf core uses
> regular RCU and converting all that is going to me a nasty big patch.

There is an easier way. We can add a way to have perf not trace specific
functions. Now there's already infrastructure there to pick and choose
what to trace and what not to for individual function tracing users like
perf. The trick will be how to annotate them.

If there's a way to mark a function without moving it to a section, this
would be possible. Perhaps similar to EXPORT_SYMBOL(). We could add a
PERF_NOTRACE().

static void __local_bh_enable()
{
[...]
}
PERF_NOTRACE(__local_bh_enable);

And add these to a black list of functions that perf should not trace.

How's that sound?

-- Steve




\
 
 \ /
  Last update: 2013-07-10 23:57    [W:0.064 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site