]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tracing: Remove taking of trace_types_lock in pipe files
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 16 Dec 2014 03:31:07 +0000 (22:31 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 23 Dec 2014 04:37:46 +0000 (23:37 -0500)
commitd716ff71dd12bc6328f84a9ec1c3647daf01c827
tree28b94a30daa2270dc14f782f6bb93dcb0c2a1429
parentcf6ab6d9143b157786bf29bca5c32e55234bb07d
tracing: Remove taking of trace_types_lock in pipe files

Taking the global mutex "trace_types_lock" in the trace_pipe files
causes a bottle neck as most the pipe files can be read per cpu
and there's no reason to serialize them.

The current_trace variable was given a ref count and it can not
change when the ref count is not zero. Opening the trace_pipe
files will up the ref count (and decremented on close), so that
the lock no longer needs to be taken when accessing the
current_trace variable.

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