ev_io mode switching performance

Marc Lehmann schmorp at schmorp.de
Sun Jun 1 03:29:59 CEST 2014


On Wed, May 28, 2014 at 10:43:09AM +0400, Nick Zavaritsky <mejedi at gmail.com> wrote:
> I am most interested in the epoll backend. Does libev issue a epoll_ctl() for every
> io watcher that changed mode in the last iteration or the behavior is somewhat
> more sophisticated (i.e. no epoll_ctl() when the ‘initial’ and ‘final’
> modes were the same)?

It is more sophisticated in the current implementation - for example,
libev will usually only invoke epoll_ctl after it receives an unwanted
event, i.e. when you stop to wait for EV_READ events, then libev will only
call epoll_ctl when it receives a read readiness notification.

I will also never issue epoll_ctl when the event set doesn't change.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list