From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiU2H-0000P9-2k for qemu-devel@nongnu.org; Tue, 22 Mar 2016 17:40:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiU2F-0005sB-Pi for qemu-devel@nongnu.org; Tue, 22 Mar 2016 17:40:21 -0400 References: <1458660792-3035-1-git-send-email-kwolf@redhat.com> <1458660792-3035-2-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <56F1BBB9.8060908@redhat.com> Date: Tue, 22 Mar 2016 15:40:09 -0600 MIME-Version: 1.0 In-Reply-To: <1458660792-3035-2-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hV7PWupo5SudGthoM71LcRmQsapstnisu" Subject: Re: [Qemu-devel] [PATCH 01/12] block: Don't disable I/O throttling on sync requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hV7PWupo5SudGthoM71LcRmQsapstnisu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/22/2016 09:33 AM, Kevin Wolf wrote: > We had to disable I/O throttling with synchronous requests because we > didn't use to run timers in nested event loops when the code was > introduced. This isn't true any more, and throttling works just fine > even when using the synchronous API. >=20 > The removed code is in fact dead code since commit a8823a3b ('block: Us= e > blk_co_pwritev() for blk_write()') because I/O throttling can only be > set on the top layer, but BlockBackend always uses the coroutine > interface now instead of using the sync API emulation in block.c. >=20 > Signed-off-by: Kevin Wolf > --- > block/io.c | 11 ----------- > 1 file changed, 11 deletions(-) >=20 > diff --git a/block/io.c b/block/io.c > index cce508a..e4438da 100644 > --- a/block/io.c > +++ b/block/io.c > @@ -561,17 +561,6 @@ static int bdrv_prwv_co(BlockDriverState *bs, int6= 4_t offset, > .flags =3D flags, > }; > =20 > - /** > - * In sync call context, when the vcpu is blocked, this throttling= timer > - * will not fire; so the I/O throttling function has to be disable= d here > - * if it has been enabled. > - */ > - if (bs->io_limits_enabled) { > - fprintf(stderr, "Disabling I/O throttling on '%s' due " > - "to synchronous I/O.\n", bdrv_get_device_name(= bs)); And we get rid of an fprintf(). Nice bonus. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hV7PWupo5SudGthoM71LcRmQsapstnisu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW8bu5AAoJEKeha0olJ0NqCVkIAKoxQELQsC5hUCsVb4pxO9bB e/ZkzFitbeiHdOdfq80rRPkaRlmln2V4zwLlzOk8BunRKWtZpB5FAAMMjw/W56p2 KV/Dll28jKP465IQEWdLiZa8hkxrNmdWZxr/CcsJP0clNN0PIwWYNE/qro7eSkTf qBB5PvU++9u8Jla2yS8rEyny5f0E8Ef9n4+YpBwnlL/1jwANrbTJ9xoFBdk6zkTK QrRMA1mzz0TrGrE7xW25BLq8nVdCL/F9gZDATa2A5DY+dWAHM33zXlQd+rmvefgc eJk0gZN+zFO+11nnZFuM0PC+kGoo0Eag69t/O7Qghr6NDpRAzKwQQwuZD9Yh7jA= =RdLI -----END PGP SIGNATURE----- --hV7PWupo5SudGthoM71LcRmQsapstnisu--