Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 21 Dec 2023 09:19:47 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH v5 02/15] ring-buffer: Page size per ring buffer |
| |
On Thu, 21 Dec 2023 09:17:55 +0000 David Laight <David.Laight@ACULAB.COM> wrote:
> > Unfortunately, it has to be PAGE_SIZE (and for now it's a power of 2 to > > make masking easy). It's used for splice and will also be used for memory > > mapping with user space. > > Perhaps then the sysctl to set the size should be powers of 4k
It's not a sysctl but a file in tracefs
> with a minimum size of PAGE_SIZE. > Then you don't have to know the page size when setting things up.
The user shouldn't need to know either. But the size of the sub-buffer limits the biggest size of an event, so the user only needs to make sure the sub-buffer is bigger than their biggest event.
> > I'm also guessing that no Linux kernels have a PAGE_SIZE of 2k? > IIRC some old mmu (maybe 68020 era) used 2k pages.
I think 1kb units is perfectly fine (patch 15 changes to kb units). The interface says its to define the minimal size of the sub-buffer, not the actual size.
-- Steve
| ![\](/images/icornerr.gif) |