RE: [PATCH] tracing: report buffer memory in /proc/meminfo

gao xu <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-trace-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
> On Mon, 10 Aug 2026 12:22:43 +0100
> "Lorenzo Stoakes (ARM)" <[email protected]> wrote:
> 
> > On Mon, Aug 10, 2026 at 12:52:38PM +0200, David Hildenbrand (Arm) wrote:
> > > On 8/10/26 11:40, Xiang Gao wrote:
> > > > Report the data capacity of all ftrace ring buffers through a new
> > > > Ftrace field in /proc/meminfo. Include the main and snapshot
> > > > buffers of the global trace array and all tracing instances, while
> > > > leaving ring-buffer metadata accounted for by Slab.
> > >
> > > why? :)
> > >
> > > To report a handful of KiB as in your example below? Doesn't sound
> > > super helpful TBH.
> >
> > Yeah I think we need to stop with all the proposed additions to
> > /proc/meminfo :)
> >
> > Also something like this where you are making a change in output that
> > it is just your opinion that it is useful should be an RFC to see what
> > the community thinks first.
> 
> Agreed. This doesn't belong in the meminfo. If you want memory statistics for
> tracing, I may be OK if you add a "total_memory_kb" file in the
> /sys/kernel/tracing/trace_stats/ directory.
Would it be possible to include this info in show_mem()?
This would be helpful for analyzing low-memory and OOM issues.
> 
> And break it up for memory used. Ring buffers, events, etc.
> 
> Perhaps even add one per CPU as well.
> 
> I'm always conscience about how much memory tracing is taking up in the
> system.
> 
> -- Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.