Re:Zed Shaw: "poll, epoll, science, and superpoll" with R
by kqueue on Tuesday August 03, 2010 @08:26PM
(#1573250)
Sorry, I meant level-triggered. :)
I think edge-triggered does add an extra overhead as you stated.
Re:Zed Shaw: "poll, epoll, science, and superpoll" with R
by pphaneuf on Wednesday August 04, 2010 @10:35PM
(#1576968)
Why would there be extra overhead when using edge triggered? There's definitely extra complexity on the client side, but it's close to what you're trying to do with super-poll (the extra complexity is basically to find out when an fd isn't busy anymore).
I think it might even be faster, kernel-side. From what I remember of the implementation, both modes have to walk the same list of ready fds, but that list is shorter in edge triggered mode, because they get removed from the list as it goes.
Edge triggered might have more overhead if many fds change between ready/not-ready quickly, but that's quite the wacky situation (and if it has an even distribution, would ensure your ATR is about 0.5, so probably still winning).
Also, your assumption of EPOLLET is potentially wrong. I think (unproven) that the extra overhead and complexity of using edge trigger right makes EPOLLET pointless.