[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] QEMU event loop optimizations
|
From: |
Stefan Hajnoczi |
|
Subject: |
Re: [Qemu-devel] QEMU event loop optimizations |
|
Date: |
Wed, 27 Mar 2019 16:34:19 +0000 |
|
User-agent: |
Mutt/1.11.3 (2019-02-01) |
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