Re: [PATCH v19 0/7] ring-buffer: Making persistent ring buffers robust

From: Google

Date: Mon May 11 2026 - 20:54:44 EST


On Mon, 11 May 2026 12:29:43 -0400
Steven Rostedt <rostedt@xxxxxxxxxx> wrote:

> On Thu, 7 May 2026 13:14:16 +0900
> Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
>
> > > I'll test this some more, and make a proper patch.
> >
> > Ah, indeed. Thanks for fixing!
> >
> > BTW, shouldn't we unify common logic of those functions?
>
> Hmm, there's not much common between the two. One is a consuming read and
> the other is a non-consuming read that needs to test for a bunch of race
> conditions.
>
> If you see something that can be shared, I'm all for it.

Maybe we can introduce a common inline function to calculate
max_loop, or at least replacing "3" with a common macro.

Thank you,


>
> -- Steve


--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>