Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: ftrace: Clarify the RAM impact of buffer_size_kb

The current text could mislead the user into believing that the number
of pages allocated by each CPU ring buffer is calculated by the round
up of the division: buffer_size_kb / PAGE_SIZE.

Clarifies that a few extra pages may be allocated to accommodate buffer
management meta-data.

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Suggested-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
Link: https://lore.kernel.org/r/6f33be5f3d60e5ffc061d8d2b329d3d3ccf22a8c.1577231751.git.frank@generalsoftwareinc.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Frank A. Cancio Bello and committed by
Jonathan Corbet
a65d634e 6f7f8ef7

+2 -1
+2 -1
Documentation/trace/ftrace.rst
··· 187 187 CPU buffer and not total size of all buffers. The 188 188 trace buffers are allocated in pages (blocks of memory 189 189 that the kernel uses for allocation, usually 4 KB in size). 190 - If the last page allocated has room for more bytes 190 + A few extra pages may be allocated to accommodate buffer management 191 + meta-data. If the last page allocated has room for more bytes 191 192 than requested, the rest of the page will be used, 192 193 making the actual allocation bigger than requested or shown. 193 194 ( Note, the size may not be a multiple of the page size