qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 0/8] virtio-blk: multiqueue support


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 0/8] virtio-blk: multiqueue support
Date: Mon, 6 Jun 2016 17:16:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0


On 04/06/2016 00:26, Stefan Hajnoczi wrote:
> It turns out that Patch 1 slows down dataplane even though the code
> looks equivalent.  After a lot of poking it turned out to be a subtle
> issue:
> 
> The order of BHs in the AioContext->first_bh list affects performance.
> Linux AIO (block/linux-aio.c) invokes completion callbacks from a BH.
> Performance is much better if virtio-blk.c's batch BH is after the
> completion BH.
> 
> The "fast" ordering notifies the guest in ~300 nanoseconds after the
> last request completion.
> 
> The "slow" ordering sometimes takes 100 microseconds after the last
> request completion before the guest is notified.  It probably depends on
> whether the event loop is kicked by another source.
> 
> I'm thinking of scrapping the batch BH and instead using a notify
> plug/unplug callback to suppress notification until the last request has
> been processed.
> 
> I also checked that batch notification does indeed improve performance
> compared to no batching.  It offers a nice boost so we do want to port
> the feature from dataplane to non-dataplane.
> 
> For the time being: consider this patch series broken due to the
> performance regression.

Thanks for the nice analysis!

Paolo



reply via email to

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