• Steven Rostedt's avatar
    rcu: Do not trace rcu_is_watching() functions · 9418fb20
    Steven Rostedt authored
    As perf uses the rcu_read_lock() primitives for recording into its
    ring buffer, perf tracing can not be called when RCU in inactive.
    With the perf function tracing, there are functions that can be
    traced when RCU is not active, and perf must not have its function
    callback called when this is the case.
    
    Luckily, Paul McKenney has created a way to detect when RCU is
    active or not with the rcu_is_watching() function. Unfortunately,
    this function can also be traced, and if that happens it can cause
    a bit of overhead for the perf function calls that do the check.
    Recursion protection prevents anything bad from happening, but
    there is a bit of added overhead for every function being traced that
    must detect that the rcu_is_watching() is also being traced.
    
    As rcu_is_watching() is a helper routine and not part of the
    critical logic in RCU, it does not need to be traced in order to
    debug RCU itself. Add the "notrace" annotation to all the rcu_is_watching()
    calls such that we never trace it.
    
    Link: http://lkml.kernel.org/r/20131104202736.72dd8e45@gandalf.local.homeAcked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    9418fb20
rcutree.c 103 KB