# Re: \[PATCH v5 07/10\] ring-buffer: Dynamically calculate max\_data\_size

- From: Vincent Donnefort \<vdonnefort@google.com\>
- Date: 2026-08-14 07:59:21 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/08/17411478
- Thread: https://ratatoskr.run/linux-trace-kernel/2026/08/17407683/t.md

```text
On Thu, Aug 13, 2026 at 09:34:07PM -0400, Steven Rostedt wrote:
> On Thu, 13 Aug 2026 14:11:49 +0100
> Vincent Donnefort [ref] wrote:
> 
> > The ring buffer order can be dynamically modified and temporarily
> > disables writing to do so. It is therefore safe to use the updated value
> > to calculate the maximum event size which can be written onto the ring
> > buffer.
> > 
> > However, notice it is hardly making any difference for trace_marker
> > because of the TRACE_MARKER_MAX_SIZE limit. For an 8KiB subbuf size,
> > trace_marker can take 4096 characters while it can 'only' take 4054
> > bytes for smaller subbufs.
> > 
> > Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page")
> 
> Why the fixes tag? What is it fixing?
> 
> -- Steve
> 
> > Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
> 

I wasn't too sure about that one. Let me drop it

-- 
Vincent
```
