Linux Trace Kernel
 help / color / mirror / Atom feed
From: manjunath.b.patil@oracle.com
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing/events: Expand ring buffer for in-kernel event enables
Date: Tue, 2 Jun 2026 16:53:51 -0700	[thread overview]
Message-ID: <6375d169-6f5d-4b39-906d-e7f29fa90ba4@oracle.com> (raw)
In-Reply-To: <20260602090025.06ae761f@gandalf.local.home>


On 6/2/26 6:00 AM, Steven Rostedt wrote:
> On Mon,  1 Jun 2026 16:24:43 -0700
> Manjunath Patil <manjunath.b.patil@oracle.com> wrote:
> 
>> Ftrace keeps trace arrays at a boot-minimum ring-buffer size until
>> tracing is used. Tracefs event-enable paths already call
>> tracing_update_buffers() before enabling events, but the exported
>> in-kernel helpers trace_set_clr_event() and trace_array_set_clr_event()
>> directly enable events through __ftrace_set_clr_event().
>>
>> This can leave events enabled by in-kernel users recording into the tiny
>> boot-minimum buffer instead of the configured default-sized buffer. Any
>> caller that enables events through these exported helpers observes
>> different buffer-expansion behavior than a userspace tracefs event enable.
>>
>> Expand the relevant trace array before enabling events through the
>> exported in-kernel helpers, matching the tracefs event-enable behavior.
>> Disabling events remains unchanged.
> 
> The above explains everything correctly, but you left out what needs this?
> 
> Internal code should not be using the main ring buffer except for
> debugging, in which case you can use trace_printk(), which will cause the
> tracing buffers to be expanded by default.
> 
> Other areas of the kernel should create their own trace array which will be
> created expanded by default too.
> 
> -- Steve


Thanks Steve, that makes sense.

The concrete case I was trying to address is not an upstream in-tree 
user. It is a downstream UEK RDS compatibility path where the legacy 
  
             rds_rt_debug_bitmap module parameter is mapped to RDS 
tracepoints by calling trace_set_clr_event() against the global trace 
array during module init. That can leave the default RDS tracepoints 
recording into the boot-minimum buffer unless userspace expands tracing 
first.

Looking at mainline again, trace-array users are already created 
expanded by default, and the remaining global-buffer use is 
debugging-style. So I agree this generic tracing/events change does not 
have a good upstream justification.

Please drop this patch. We will handle the downstream RDS compatibility 
case downstream, or move it to an explicit userspace/trace-array setup.

Thanks,
Manjunath


      reply	other threads:[~2026-06-02 23:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 23:24 [PATCH] tracing/events: Expand ring buffer for in-kernel event enables Manjunath Patil
2026-06-02 13:00 ` Steven Rostedt
2026-06-02 23:53   ` manjunath.b.patil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6375d169-6f5d-4b39-906d-e7f29fa90ba4@oracle.com \
    --to=manjunath.b.patil@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox