Kernel events without kernel calls
Posted Mar 22, 2007 22:56 UTC (Thu) by hno
In reply to: Kernel events without kernel calls
Parent article: Kernel events without kevents
There is significant difference between epoll and ring buffer batching.
with epoll you have an syscall each and every time you want to process events, even if there is a single event to process.
With a ring buffer you only need to notify the kernel when there is a risk the kernel may run out of space in the buffer. For example once per rinbuffersize/2 number of events processed.
But it's true that when you get heavily CPU bound and not able to keep up with the rate of events the two converges to about the same. But as long as processing is able to keep up with the rate of events the ring buffer always wins, i.e. in all situations except complete overload.
So in worst case the ring buffer performs equal to explicit call, on average significantly better than explicit call.
to post comments)