On Wed, Jun 10, 2015 at 02:38:17PM +0300, Alexander Yarygin wrote:
> After the commit 9b536adc ("block: acquire AioContext in
> bdrv_drain_all()") the aio_poll() function got called for every
> BlockDriverState, in assumption that every device may have its own
> AioContext. If we have thousands of disks attached, there are a lot of
> BlockDriverStates but only a few AioContexts, leading to tons of
> unnecessary aio_poll() calls.
> 
> This patch changes the bdrv_drain_all() function allowing it find shared
> AioContexts and to call aio_poll() only for unique ones.
> 
> Cc: Christian Borntraeger <borntrae...@de.ibm.com>
> Cc: Cornelia Huck <cornelia.h...@de.ibm.com>
> Cc: Kevin Wolf <kw...@redhat.com>
> Cc: Paolo Bonzini <pbonz...@redhat.com>
> Cc: Stefan Hajnoczi <stefa...@redhat.com>
> Signed-off-by: Alexander Yarygin <yary...@linux.vnet.ibm.com>
> ---
>  block/io.c | 42 ++++++++++++++++++++++++++----------------
>  1 file changed, 26 insertions(+), 16 deletions(-)

Thanks, applied this patch only to my block tree:
https://github.com/stefanha/qemu/commits/block

Patch 2 has a pending issue and Patch 1 is only needed by Patch 2.

Stefan

Attachment: pgp4kcKDUhVSh.pgp
Description: PGP signature

Reply via email to