3 ms·
I have not looked at kqueue, but there is no reason to believe that it would be affected by the introduction of a new event filter more than epoll is affected b
by adrian_b 2y ago
I have not looked at kqueue, but there is no reason to believe that it would be affected by the introduction of a new event filter more than epoll is affected by the introduction of a new system call that creates a new kind of pseudo-file handles that can be passed to epoll.
The event filters must have a standard interface, so adding one more kind should not matter for kqueue more than the existence of a new kind of "file" handle matters for epoll.
The epoll API makes opaque for the user the differences between the kinds of kernel handles, but at some point inside the kernel the handles must be disambiguated and appropriate actions for each kind of handle must be performed, exactly like in kqueue various kinds of event filters must be invoked.
- nobodyandproud 2y agoRight. I’ve never worked in the kernel space, but I wanted to understand the author. As you mentioned, event handlers still only care for certain messages and ignore others, so the disambiguation must happen. Rereading it; what’s also not clear to me is whether epoll is a single queue, or one queue for each subsystem and handle type. From a handler’s perspective, it seems like an implementation detail? Again, I don’t know about this stuff; just hoping someone knowledgeable can help clear it up.