[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110503233503.GH2678@nowhere>
Date: Wed, 4 May 2011 01:35:06 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Michael Rubin <mrubin@...gle.com>,
David Sharp <dhsharp@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] tracing: Don't call wakeup() when committing the
event
On Tue, May 03, 2011 at 04:27:22PM -0700, Vaibhav Nagarnaik wrote:
> On Tue, May 3, 2011 at 4:08 PM, Frederic Weisbecker <fweisbec@...il.com> wrote:
> > On Tue, May 03, 2011 at 06:47:32PM -0400, Steven Rostedt wrote:
> >> On Wed, 2011-05-04 at 00:09 +0200, Frederic Weisbecker wrote:
> >>
> >> > I wonder if we should have a lite version of wake_up() that checks
> >> > if the list of waiters is empty before locking the queue.
> >> > After all we don't care much about tight races for tracing.
> >>
> >> Since tracing is a special case here, we probably could get away to just
> >> do it ourselves. That is, have our own flag that determines if we should
> >> wakeup or not.
> >
> > Yep, agreed.
> >
> How about this? Check if the waitqueue is active and if true, operate on the
> trace_wait queue.
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 06f4458..e03ee24 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -353,7 +353,7 @@ void trace_wake_up(void)
> {
> int cpu;
>
> - if (trace_flags & TRACE_ITER_BLOCK)
> + if (trace_flags & TRACE_ITER_BLOCK || !waitqueue_active(&trace_wait))
> return;
> /*
> * The runqueue_is_locked() can fail, but this is the best we
>
Hehe, seems it should work :)
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists