]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/core: use appropriate waiting on trace_pipe
authorFrederic Weisbecker <fweisbec@gmail.com>
Wed, 11 Feb 2009 01:25:00 +0000 (02:25 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 18 Feb 2009 00:40:20 +0000 (01:40 +0100)
commitcb6d63f67c538c2914a6126b81dc475fa764a356
treec8f3c130004199bbbc8d141bbfb0f216539c0724
parentf8c3b91e280b700a580fb74e4dcc8e66a0892c22
tracing/core: use appropriate waiting on trace_pipe

Impact: api and pipe waiting change

Currently, the waiting used in tracing_read_pipe() is done through a
100 msecs schedule_timeout() loop which periodically check if there
are traces on the buffer.

This can cause small latencies for programs which are reading the incoming
events.

This patch makes the reader waiting for the trace_wait waitqueue except
for few tracers such as the sched and functions tracers which might be
already hold the runqueue lock while waking up the reader.

This is performed through a new callback wait_pipe() on struct tracer.
If none is implemented on a specific tracer, the default waiting for
trace_wait queue is attached.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_functions.c
kernel/trace/trace_functions_graph.c
kernel/trace/trace_sched_switch.c
kernel/trace/trace_sched_wakeup.c