Re: [PATCH 1/2 v2] tracing/core: use appropriate waiting ontrace_pipe

From: Ingo Molnar
Date: Tue Feb 17 2009 - 19:41:20 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> On Wed, Feb 11, 2009 at 02:25:00AM +0100, Frederic Weisbecker wrote:
> > 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@xxxxxxxxx>
> > ---
> > kernel/trace/trace.c | 62 ++++++++++++++++++++++-----------
> > kernel/trace/trace.h | 25 ++++++++++++--
> > kernel/trace/trace_functions.c | 1 +
> > kernel/trace/trace_functions_graph.c | 1 +
> > kernel/trace/trace_sched_switch.c | 1 +
> > kernel/trace/trace_sched_wakeup.c | 1 +
> > 6 files changed, 67 insertions(+), 24 deletions(-)
>
>
> Steven, Ingo, do you agree this one?
>
> Thanks.

yeah - this version is much cleaner. I've applied it to
tip:tracing/ftrace, thanks Frederic!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/