From: Frank A. Cancio Bello Date: Wed, 25 Dec 2019 00:06:05 +0000 (-0500) Subject: docs: ftrace: Clarify the RAM impact of buffer_size_kb X-Git-Tag: v5.6-rc1~126^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a65d634e63644d05a22f32e5f2e56dde4f7ee77b;p=thirdparty%2Flinux.git 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) Suggested-by: Joel Fernandes (Google) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/6f33be5f3d60e5ffc061d8d2b329d3d3ccf22a8c.1577231751.git.frank@generalsoftwareinc.com Signed-off-by: Jonathan Corbet --- diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst index 46df39300d22a..8575aed7b74bb 100644 --- a/Documentation/trace/ftrace.rst +++ b/Documentation/trace/ftrace.rst @@ -187,7 +187,8 @@ of ftrace. Here is a list of some of the key files: CPU buffer and not total size of all buffers. The trace buffers are allocated in pages (blocks of memory that the kernel uses for allocation, usually 4 KB in size). - If the last page allocated has room for more bytes + A few extra pages may be allocated to accommodate buffer management + meta-data. If the last page allocated has room for more bytes than requested, the rest of the page will be used, making the actual allocation bigger than requested or shown. ( Note, the size may not be a multiple of the page size