On Wed, 13 Mar 2024 00:38:42 +0900
Masami Hiramatsu (Google) <mhira...@kernel.org> wrote:

> On Tue, 12 Mar 2024 09:19:21 -0400
> Steven Rostedt <rost...@goodmis.org> wrote:
> 
> > From: "Steven Rostedt (Google)" <rost...@goodmis.org>
> > 
> > The check for knowing if the poll should wait or not is basically the
> > exact same logic as rb_watermark_hit(). The only difference is that
> > rb_watermark_hit() also handles the !full case. But for the full case, the
> > logic is the same. Just call that instead of duplicating the code in
> > ring_buffer_poll_wait().
> >   
> 
> This changes a bit (e.g. adding pagebusy check) but basically that should
> be there. And new version appears to be consistent between ring_buffer_wait()
> and ring_buffer_poll_wait(). So looks good to me.

The pagebusy check is an optimization. As if it is true, it means the
writer is still on the reader_page and there's no sub-buffers available. It
just prevents having to do the calculation of the buffer-percentage filled
(what's done by the full_hit() logic).

> 
> Reviewed-by: Masami Hiramatsu (Google) <mhira...@kernel.org>
>

Thanks!

-- Steve

Reply via email to