Skip to content

Commit 4b2df88

Browse files
rostedtJonathan Corbet
authored andcommitted
ring-buffer/Documentation: Add documentation on buffer_percent file
When the buffer_percent file was added to the kernel, the documentation should have been updated to document what that file does. Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Fixes: 03329f9 ("tracing: Add tracefs file buffer_percentage") Signed-off-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20231229122402.537eb252@gandalf.local.home
1 parent d78bcf6 commit 4b2df88

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Documentation/trace/ftrace.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ of ftrace. Here is a list of some of the key files:
180180
Only active when the file contains a number greater than 0.
181181
(in microseconds)
182182

183+
buffer_percent:
184+
185+
This is the watermark for how much the ring buffer needs to be filled
186+
before a waiter is woken up. That is, if an application calls a
187+
blocking read syscall on one of the per_cpu trace_pipe_raw files, it
188+
will block until the given amount of data specified by buffer_percent
189+
is in the ring buffer before it wakes the reader up. This also
190+
controls how the splice system calls are blocked on this file::
191+
192+
0 - means to wake up as soon as there is any data in the ring buffer.
193+
50 - means to wake up when roughly half of the ring buffer sub-buffers
194+
are full.
195+
100 - means to block until the ring buffer is totally full and is
196+
about to start overwriting the older data.
197+
183198
buffer_size_kb:
184199

185200
This sets or displays the number of kilobytes each CPU

0 commit comments

Comments
 (0)