Hi! I am pleased to announce that the current CVS version of libev has an experimental linux aio backend that can take advantage of the new functionality added to linux 4.18 (https://lwn.net/Articles/743714/).
It is exciting because it can batch both requests and events (and mightr be much faster than epoll in common use cases), and does not have most of the downsides and design issues of epoll. Of course, this wouldn't be linux if it would be usable out of the box: as of 4.19, only very few file types are supported, namely, from my testing, pipes, sockets, files (surprise! beats epoll!) and a few devices (/dev/null), but not e.g. ttys (dangit!), so it is not yet working as a generic epoll replacement (basically, it's like a worse kqueue). And it's not embeddable either of course, so you can't even combine it with another more generic mechanism. D'oh. Currently, the code is not very optimized and probably buggy, but ready for experimentation (being a few hours old by now :). Feedback would be very much appreciated, even if you don't want to use it, as the backend should currently just be silently compiled in by default without being used, so even reports about compilation errors would be helpful. If you want to try it out, you need a CVS checkout of libev: cvs -z3 -d :pserver:[email protected]/schmorpforge co libev If you use the libev.m4 autoconf macros then support for EVBACKEND_LINUXAIO aio should be automatically enabled when your headers allow it (e.g. SYS_io_setup and so on are defined and linux/aio_abi.h is available). If not, you try to force compilation by specifying -DEV_USE_LINUXAIO when compiling, e.g. for the EV perl module: EV_EXTRA_DEFS=-DEV_USE_LINUXAIO perl Makefile.PL; make; make install It is also currently always disabled at runtime by default, so if it compiles, nothing should change until you explicitgly request it, e.g. using the LIBEV_FLAGS environment variable: LIBEV_FLAGS=64 ./my_libev_program again, feedback at this stage is very appreciated, although I wouldn't expect it to work flawlessly or conduct serious performance tests. Thanks in advamce and have fun! -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / [email protected] -=====/_/_//_/\_,_/ /_/\_\ _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/libev
