On Tue, Mar 26, 2019 at 02:37:35PM +0100, Paolo Bonzini wrote: > On 26/03/19 14:18, Stefan Hajnoczi wrote: > > Hi Sergio, > > Here are the forgotten event loop optimizations I mentioned: > > > > https://github.com/stefanha/qemu/commits/event-loop-optimizations > > > > The goal was to eliminate or reorder syscalls so that useful work (like > > executing BHs) occurs as soon as possible after an event is detected. > > > > I remember that these optimizations only shave off a handful of > > microseconds, so they aren't a huge win. They do become attractive on > > fast SSDs with <10us read/write latency. > > > > These optimizations are aggressive and there is a possibility of > > introducing regressions. > > > > If you have time to pick up this work, try benchmarking each commit > > individually so performance changes are attributed individually. > > There's no need to send them together in a single patch series, the > > changes are quite independent. > > Another thing to consider is IOCB_CMD_POLL, and replacing poll() with > io_getevents(min_nr=1, nr=1). If more than one event is ready, it can > be read directly from the ring buffer.
Hey, cool. io_uring has an equivalent operation too. We'll add it as a stretch goal to the GSoC/Outreachy project. > Maybe we can even remove the little-tested epoll() path in favor of this > one. That would be nice if the performance results are favorable. Stefan
signature.asc
Description: PGP signature