qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU event loop optimizations


From: Paolo Bonzini
Subject: Re: [Qemu-devel] QEMU event loop optimizations
Date: Tue, 26 Mar 2019 14:37:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

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.

Maybe we can even remove the little-tested epoll() path in favor of this
one.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]