Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: opportunistically check all rings for data
Waking up user space from the kernel is expensive and so the perf reader allows adjusting the rate at which wakeups happen. This saves CPU at the cost of latency: some data will remain in the buffer for longer. The reader is an abstraction over multiple ring buffers. It only reads from a ring buffer if it has received a wakeup from the kernel. This is wasteful because wakeups are expensive (due to context switching and so on) but checking a ring for contents is cheap (just an atomic load). Change the behaviour so that we read data from any ready ring buffer regardless of why we were woken up. Signed-off-by: Lorenz Bauer <[email protected]>
- Loading branch information