Re: [PATCH v5 2/4] tracing: Make the backup instance non-reusable

From: Steven Rostedt

Date: Fri Jan 30 2026 - 10:21:35 EST


On Fri, 30 Jan 2026 18:20:58 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> > > - trace_create_file("free_buffer", 0200, d_tracer,
> > > - tr, &tracing_free_buffer_fops);
> > > + if (!readonly) {
> > > + trace_create_file("free_buffer", 0200, d_tracer,
> > > + tr, &tracing_free_buffer_fops);
> >
> > Hmm, why remove the free_buffer. It just shrinks the buffer down to a
> > minimum. Perhaps its useless, but I it doesn't write to the buffer. Sure it
> > removes data but so does trace_pipe.
>
> I can keep it but free_buffer and free instance is a bit different on
> the persistent ring buffer and its backup. For both cases, since the
> scratch area needs to be kept, it does not free the reserved memory.
> (but the minimum ring buffer is dynamically allocated.)
> IMHO, the buffer resize interfaces are not useful for persistent ring
> buffer.

Ah yeah. OK, lets not add free_buffer to read only instances.

-- Steve