]> Git Repo - qemu.git/commit
block: Let bdrv_drain_all() to call aio_poll() for each AioContext
authorAlexander Yarygin <[email protected]>
Wed, 10 Jun 2015 11:38:17 +0000 (14:38 +0300)
committerStefan Hajnoczi <[email protected]>
Tue, 23 Jun 2015 14:06:16 +0000 (15:06 +0100)
commitf406c03c093f1451ac0ba7fde31eeb78e5e5e417
tree52b1a39551c0db3c413c42e49ec3e9f01f800dc6
parenta3206972a9eab65ec8e8f9ae320ad628ba4b58f1
block: Let bdrv_drain_all() to call aio_poll() for each AioContext

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 <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Signed-off-by: Alexander Yarygin <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Tested-by: Christian Borntraeger <[email protected]>
Message-id: 1433936297[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
block/io.c
This page took 0.023532 seconds and 4 git commands to generate.