summaryrefslogtreecommitdiffstats
path: root/Documentation/Changes
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2023-12-19 13:54:25 -0500
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-12-21 11:02:01 -0500
commit353cc219372935805218e05a7754a059ab104641 (patch)
tree37845d8906b29e9fd81e251b1bf8c6946d5de457 /Documentation/Changes
parentfa4b54af5ba17a59ce082e9d710eb638bdce7637 (diff)
downloadlinux-stable-353cc219372935805218e05a7754a059ab104641.tar.gz
linux-stable-353cc219372935805218e05a7754a059ab104641.tar.bz2
linux-stable-353cc219372935805218e05a7754a059ab104641.zip
ring-buffer: Keep the same size when updating the order
The function ring_buffer_subbuf_order_set() just updated the sub-buffers to the new size, but this also changes the size of the buffer in doing so. As the size is determined by nr_pages * subbuf_size. If the subbuf_size is increased without decreasing the nr_pages, this causes the total size of the buffer to increase. This broke the latency tracers as the snapshot needs to be the same size as the main buffer. The size of the snapshot buffer is only expanded when needed, and because the order is still the same, the size becomes out of sync with the main buffer, as the main buffer increased in size without the tracing system knowing. Calculate the nr_pages to allocate with the new subbuf_size to be buffer_size / new_subbuf_size. Link: https://lore.kernel.org/linux-trace-kernel/20231219185630.649397785@goodmis.org Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Tzvetomir Stoyanov <tz.stoyanov@gmail.com> Cc: Vincent Donnefort <vdonnefort@google.com> Cc: Kent Overstreet <kent.overstreet@gmail.com> Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'Documentation/Changes')
0 files changed, 0 insertions, 0 deletions