summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Yarygin2015-06-10 13:38:17 +0200
committerStefan Hajnoczi2015-06-23 16:06:16 +0200
commitf406c03c093f1451ac0ba7fde31eeb78e5e5e417 (patch)
tree52b1a39551c0db3c413c42e49ec3e9f01f800dc6 /scripts
parentMerge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-06-22' in... (diff)
downloadqemu-f406c03c093f1451ac0ba7fde31eeb78e5e5e417.tar.gz
qemu-f406c03c093f1451ac0ba7fde31eeb78e5e5e417.tar.xz
qemu-f406c03c093f1451ac0ba7fde31eeb78e5e5e417.zip
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 <borntraeger@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1433936297-7098-4-git-send-email-yarygin@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions