From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X44Pg-0000jE-QK for qemu-devel@nongnu.org; Mon, 07 Jul 2014 04:36:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X44PY-0006CN-TO for qemu-devel@nongnu.org; Mon, 07 Jul 2014 04:36:40 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:33552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X44PY-0006CH-LP for qemu-devel@nongnu.org; Mon, 07 Jul 2014 04:36:32 -0400 Received: by mail-we0-f181.google.com with SMTP id q59so4049529wes.12 for ; Mon, 07 Jul 2014 01:36:31 -0700 (PDT) Date: Mon, 7 Jul 2014 10:36:28 +0200 From: Stefan Hajnoczi Message-ID: <20140707083628.GG7963@stefanha-thinkpad.redhat.com> References: <1404468275-15144-1-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IuhbYIxU28t+Kd57" Content-Disposition: inline In-Reply-To: <1404468275-15144-1-git-send-email-ming.lei@canonical.com> Subject: Re: [Qemu-devel] [PATCH v6 0/3] linux-aio: introduce submit I/O as a batch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini --IuhbYIxU28t+Kd57 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 04, 2014 at 06:04:32PM +0800, Ming Lei wrote: > Hi, >=20 > The commit 580b6b2aa2(dataplane: use the QEMU block layer for I/O) > introduces ~40% throughput regression on virtio-blk dataplane, and > one of causes is that submitting I/O as a batch is removed. >=20 > This patchset trys to introduce this mechanism on block, at least, > linux-aio can benefit from that. >=20 > With these patches, it is observed that thoughout on virtio-blk > dataplane can be improved a lot, see data in commit log of patch > 3/3. >=20 > It should be possible to apply the batch mechanism to other devices > (such as virtio-scsi) too. >=20 > TODO: > - support queuing I/O to multi files for scsi devies, which > need some changes to linux-aio >=20 > V6: > - fix requests leak if part of them arn't submitted successfully, > pointed by Stefan > - linux-aio.c coding style fix >=20 > V5: > - rebase on v2.1.0-rc0 of qemu.git/master > - block/linux-aio.c code style fix > - don't flush io queue before flush, pointed by Paolo >=20 > V4: > - support other non-raw formats with under-optimized performance > - use reference counter for plug & unplug > - flush io queue before sending flush command >=20 > V3: > - only support submitting I/O as a batch for raw format, pointed by > Kevin >=20 > V2: > - define return value of bdrv_io_unplug as void, suggested by Paolo > - avoid busy-wait for handling io_submit > V1: > - move queuing io stuff into linux-aio.c as suggested by Paolo Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block In Patch 2 we should complete requests with -EIO if io_submit() returned 0 <=3D ret < len. I fixed this up when applying because the patch was completing with a bogus ret value. Stefan --IuhbYIxU28t+Kd57 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTulwMAAoJEJykq7OBq3PI3HIH/0ULkAM5InylDZsE3MEWNSHn mMIpU8yBSzejqbX9JaOWbyJLaqRmXjAus09WkyEBQIDx0xH36ssQGa8RiarNNC+b HakFzKVQQ32D7uBHIMpzMtOoH3uEhSQHNAT8O8zqV4s2BydolTU1kOjo0S+onhF4 afZjtkWt1HdUep0EyTnF9/jADmDPtHgVnMJa0UWHrDvsVNZ2nqRng5cWF3bQ4iw6 qo+TWc1DHv/T3pB6Fddq33wHzZb00IfQ5kN5R69hX3XCuiZKGBL438P6xodWtfd5 0x25AutjT7OMWLTAVgVpm2MGxlBZlItW71D4umdPnHlIr0hPhZgGyV7aIC5oPtw= =Rb8i -----END PGP SIGNATURE----- --IuhbYIxU28t+Kd57--