libev-4.31 has just been released
Marc Lehmann
schmorp at schmorp.de
Sat Dec 21 17:26:29 CET 2019
I am pleased to announce libev 4.31!
Distribution: http://dist.schmorp.de/libev/libev-4.31.tar.gz
Documentation: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod?pathrev=rel-4_31
Changes: http://cvs.schmorp.de/libev/Changes?pathrev=rel-4_31
This release adds a new backend, "iouring", which uses the new event
polling mechanism introduced with Linux 4.18 (but libev itself requires
at least 4.19 - but while the backend should be working, the kernel
implementation is very buggy still).
Version 4.31 can also take advantage of linux's timerfds to detect time
jumps of the realtime clock in a more timely fashion.
The release also fixes a bug introduced in 4.28 where already-expired
timers would not keep the event loop from sleeping for a short time.
As for some further explanatrions: some folks surely remember me being
quite excited about the linuxaio backend and the iouring backend.
This has been dampened quite a bit - while the iouring API is the best
*API* linux has come up with so far (the first really reasonable one,
other than select or poll, really), the implementation leaves much to
be desired: For example, both linux aio and iouring kernel backends can
silently ignore parts of the requested events on an undocumented subset of
file description types. Or in other words, if you register a read and/or
write watcher on the wrong type of fd, it might only deliver write events,
or it will simply not work. Fascinatingly enough, these bugs are shared
between linux aio and iouring, known for quite some time, and the reaction
of linus torvalds can be paraphrased as "uh, maybe people will only use it
for sockets anyway?".
But the biggest problem with the new iouring implementation is that it
only rivals select in speed. Or rather, slowness. In fact, in some real
world workloads it can even be slower than a plain select, making it of
little actual use until this is resolved. The linuxaio backend is even
worse in this respect.
Therefore, while the API is sane and the implementation can be improved,
there is little point using it at the moment (I had quite a number of
kernel oopses as well), and therefore, both linuxaio and iouring will stay
off by default for the forseeable future.
The complete Changes since 4.27 are:
4.31 Fri Dec 20 21:58:29 CET 2019
- handle backends with minimum wait time a bit better by not
waiting in the presence of already-expired timers
(behaviour reported by Felipe Gasper).
- new feature: use timerfd to detect timejumps quickly,
can be disabled with the new EVFLAG_NOTIMERFD loop flag.
- document EV_USE_SIGNALFD feature macro.
4.30 (EV only)
- change non-autoconf test for __kernel_rwf_t by testing
LINUX_VERSION_CODE, the most direct test I could find.
- fix a bug in the io_uring backend that polled the wrong
backend fd, causing it to not work in many cases.
4.29 (EV only)
- add io uring autoconf and non-autoconf detection.
- disable io_uring when some header files are too old.
4.28 (EV only)
- linuxaio backend resulted in random memory corruption
when loop is forked.
- linuxaio backend might have tried to cancel an iocb
multiple times (was unable to trigger this).
- linuxaio backend now employs a generation counter to
avoid handling spurious events from cancelled requests.
- io_cancel can return EINTR, deal with it. also, assume
io_submit also returns EINTR.
- fix some other minor bugs in linuxaio backend.
- ev_tstamp type can now be overriden by defining EV_TSTAMP_T.
- cleanup: replace expect_true/false and noinline by their
libecb counterparts.
- move syscall infrastructure from ev_linuxaio.c to ev.c.
- prepare io_uring integration.
- tweak ev_floor.
- epoll, poll, win32 Sleep and other places that use millisecond
reslution now all try to round up times.
- solaris port backend didn't compile.
- abstract time constants into their macros, for more flexibility.
--
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