]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 7 Apr 2017 16:40:49 +0000 (12:40 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 10 Apr 2017 19:22:17 +0000 (15:22 -0400)
commit3b5031b9d9c0a2938baef6126b4cd687d983fc2e
tree26ee9aadd39cb4f25fbd7f41e1adab23a51ccd35
parentab1ec34bef2ce01feca3768a73e6d8a2c43b6f47
tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events

Stack tracing discovered that there's a small location inside the RCU
infrastructure where calling rcu_irq_enter() does not work. As trace events
use rcu_irq_enter() it must make sure that it is functionable. A check
against rcu_irq_enter_disabled() is added with a WARN_ON_ONCE() as no trace
event should ever be used in that part of RCU. If the warning is triggered,
then the trace event is ignored.

Restructure the __DO_TRACE() a bit to get rid of the prercu and postrcu,
and just have an rcucheck that does the work from within the _DO_TRACE()
macro. gcc optimization will compile out the rcucheck=0 case.

Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/tracepoint.h