Support direct mapped memory consumers for ring buffer and perf event array maps #4163
Labels
enhancement
New feature or request
optimization
Affects perf but not correctness or applicability
P2
triaged
Discussed in a triage meeting
Milestone
Describe the feature you'd like supported
The current ringbuffer uses a pure callback-based approach to reading the ringbuffer.
Linux also supports direct memory-mapped polling consumers, which can't be directly supported in the current model. the direct mapped memory consumers on linux use
mmap()
to map the ring into user space, andepoll_wait()
to wait for data notifications.The perf event array map has a similar API, but with per-cpu rings, and can also support direct memory mapped consumers on Linux.
Proposed solution
Supporting direct memory-mapped consumers will require changes to the ring buffer data structures and memory mapping.
The internal ring data structure mapped into user space is shared between the perf event array and the ring buffer map, so the changes to support direct memory mapped consumers for both are tightly coupled.
There is already a PR out to document and plan these changes for the ring buffer: #3848
Additional context
No response
The text was updated successfully, but these errors were encountered: