From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5c8T-0000pP-9u for qemu-devel@nongnu.org; Thu, 18 Jun 2015 11:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5c8S-0000ig-5S for qemu-devel@nongnu.org; Thu, 18 Jun 2015 11:53:49 -0400 Date: Thu, 18 Jun 2015 16:53:41 +0100 From: Stefan Hajnoczi Message-ID: <20150618155341.GE822@stefanha-thinkpad.redhat.com> References: <1434537440-28236-1-git-send-email-yarygin@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mR8QP4gmHujQHb1c" Content-Disposition: inline In-Reply-To: <1434537440-28236-1-git-send-email-yarygin@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v3 0/2] Fix slow startup with many disks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Yarygin Cc: Kevin Wolf , qemu-block@nongnu.org, Ekaterina Tumanova , qemu-devel@nongnu.org, Christian Borntraeger , Cornelia Huck , Paolo Bonzini --mR8QP4gmHujQHb1c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 17, 2015 at 01:37:18PM +0300, Alexander Yarygin wrote: > Changes in v3: > - Added aio_context_acquire/aio_context_release around blk_drain() in > "virtio-blk: Use blk_drain() to drain IO requests" + updated commit > description >=20 > Please update Cc: qemu-stable@ if it necessarily. >=20 > Changes in v2: > - Patch "block-backend: Introduce blk_drain() and replace blk_drain_a= ll()" > splitted to two. > - blk_drain() moved to above virtio_blk_data_plane_stop(). >=20 > Previous thread: > http://lists.gnu.org/archive/html/qemu-devel/2015-06/msg02786.html >=20 > During reset the aio_poll() function is called at least amount_of_disks^2= times: >=20 > for_each disk > virtio_blk_reset() > bdrv_drain_all() > for_each disk > aio_poll() >=20 > For example, startup with 1000 disks takes over 13 minutes. >=20 > Patches 1 and 2 removes inner loop by using bdrv_drain() instead > of bdrv_drain_all(). bdrv_drain() works on one disk at time. >=20 > Since bdrv_drain_all() is still called in other places, patch 3 optimizes > it for cases, where there are more disks than iothreads. >=20 > Thanks. >=20 > Alexander Yarygin (2): > block-backend: Introduce blk_drain() > virtio-blk: Use blk_drain() to drain IO requests >=20 > block/block-backend.c | 5 +++++ > hw/block/virtio-blk.c | 15 ++++++++++----- > include/sysemu/block-backend.h | 1 + > 3 files changed, 16 insertions(+), 5 deletions(-) >=20 > --=20 > 1.9.1 >=20 Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --mR8QP4gmHujQHb1c Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVgumFAAoJEJykq7OBq3PI9gYH+wV3Zh37QAoQnWdDgTtWsfNV 92tZ06F8JN4aeXPt6cW8jLAjl1U6QdrrK5+L0WHp090XFGuMXaXlGK6mHoCq/OwN F5JE58Ejr6TvruJ76dncPre8YrrTMOdZ3AsXdUEcfuYsMMiqkbJHNoIJRoPKyT7M Gh/yMpN/SIgblUp/sru/PMCnrBORQkOsExahQtFNH2NYfITf+SOE4FyGKVILO/RN S62BOkIZDw3wBzh4nx6OzAwnD3vVQ+2R+qnSVwegsVMilaW7dJvaITq+QB9gAbaR qDGEaLcVpbho8l21OecTvp7O3SOeF9gempLZHTPRs4qg72eYc3JjINCFpi9nSdw= =d1GZ -----END PGP SIGNATURE----- --mR8QP4gmHujQHb1c--