[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231221091013.9af9f0a5ff926069babe4989@kernel.org>
Date: Thu, 21 Dec 2023 09:10:13 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Mark
Rutland <mark.rutland@....com>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
Vincent Donnefort <vdonnefort@...gle.com>, Kent Overstreet
<kent.overstreet@...il.com>
Subject: Re: [PATCH v5 03/15] ring-buffer: Add interface for configuring
trace sub buffer size
On Wed, 20 Dec 2023 09:40:30 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Wed, 20 Dec 2023 23:26:19 +0900
> Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
>
> > On Tue, 19 Dec 2023 13:54:17 -0500
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> >
> > > +/**
> > > + * ring_buffer_subbuf_order_set - set the size of ring buffer sub page.
> > > + * @buffer: The ring_buffer to set the new page size.
> > > + * @order: Order of the system pages in one sub buffer page
> > > + *
> > > + * By default, one ring buffer pages equals to one system page. This API can be
> > > + * used to set new size of the ring buffer page. The size must be order of
> > > + * system page size, that's why the input parameter @order is the order of
> > > + * system pages that are allocated for one ring buffer page:
> > > + * 0 - 1 system page
> > > + * 1 - 2 system pages
> > > + * 3 - 4 system pages
> > > + * ...
> >
> > Don't we have the max order of the pages?
>
> Actually there is. I think it's 7?
>
> Honestly, anything over 5 is probably too much. But hey.
Ah, I see. It is checked in subbuf_order_write() method (and it is embedded
directly). I think that 7 should be replaced with a macro, something like
RB_SUBBUF_ORDER_MAX and check it in this exposed function instead of write
method.
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists