You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, and epoll_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.
Perf event arrays are not yet supported in ebpf-for-windows, but the work is in progress.
The initial perf event array support will work similar to the ebpf-for-windows ring buffer, but with synchronous callbacks supported and used by default, but without support for direct memory mapped consumers.
Proposed solution
Supporting direct memory-mapped consumers will require changes to the ring buffer data structures and memory mapping.
Keep producer and consumer pages in ring buffer structure (instead of just offsets).
Create memory mapping with producer+consumer page inserted before the double-mapped buffer.
Document the acquire/release semantics for consumer to directly access producer and consumer offsets.
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:
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: