ring-buffer: User context bit recursion checking
authorSteven Rostedt <srostedt@redhat.com>
Fri, 2 Nov 2012 22:33:05 +0000 (18:33 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 23 Jan 2013 04:38:03 +0000 (23:38 -0500)
commit567cd4da54ff45513d2ca1f0e3cb9ba45b66d6cf
tree1a9e719a31643138fa76ecf556401fee1f536813
parent897f68a48b1f8fb6cb7493e1ee37e3ed7f879937
ring-buffer: User context bit recursion checking

Using context bit recursion checking, we can help increase the
performance of the ring buffer.

Before this patch:

 # echo function > /debug/tracing/current_tracer
 # for i in `seq 10`; do ./hackbench 50; done
Time: 10.285
Time: 10.407
Time: 10.243
Time: 10.372
Time: 10.380
Time: 10.198
Time: 10.272
Time: 10.354
Time: 10.248
Time: 10.253

(average: 10.3012)

Now we have:

 # echo function > /debug/tracing/current_tracer
 # for i in `seq 10`; do ./hackbench 50; done
Time: 9.712
Time: 9.824
Time: 9.861
Time: 9.827
Time: 9.962
Time: 9.905
Time: 9.886
Time: 10.088
Time: 9.861
Time: 9.834

(average: 9.876)

 a 4% savings!

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c
kernel/trace/trace.h