Re: [PATCH 2/3] tracing: block-able ring_buffer consumer

From: Frederic Weisbecker
Date: Tue Sep 01 2009 - 19:12:13 EST


On Wed, Sep 02, 2009 at 01:05:10AM +0200, Frederic Weisbecker wrote:
> void poll_wait_pipe(struct trace_iterator *iter)
> {
> set_current_state(TASK_INTERRUPTIBLE);
> /* sleep for 100 msecs, and try again. */
> schedule_timeout(HZ / 10);
> }
>
> On the worst case the reader will wait for 1/100 secs
> (the comment is wrong).


No the comment is not wrong. It's just that I really suck in math :-)


>
> You can probably use the same thing for ring buffer splice
> and poll waiters.
>
> Frederic.
>

--
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/