Re:Ways of Implementing a System Call
by cesarb on Friday January 17, 2020 @12:44PM
(#22077064)
The current trend seems to be to use ring buffers between the kernel and userspace (see: perf, io_uring, this proposal https://lwn.net/Articles/789603/), which reduce this overhead.
[ Parent
| on HN ]
At the lowest level this is how it works, so using ring buffers as the abstraction makes tremendous sense. Plus it can be done safely without requiring a context switch on the fast path, with a little care.
Its also easy to naturally batch things. When the load is low the batch size is 1, and then it naturally grows as more work gets queued during processing of the prior work.
I love ring buffers and queues.