From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2qF-0005Gu-So for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:57:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ya2q0-0001Oi-EA for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:56:31 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:36831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2q0-0001Nj-6G for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:56:16 -0400 Received: by wetk59 with SMTP id k59so138528956wet.3 for ; Mon, 23 Mar 2015 06:56:15 -0700 (PDT) Date: Mon, 23 Mar 2015 13:56:12 +0000 From: Stefan Hajnoczi Message-ID: <20150323135612.GI9268@stefanha-thinkpad.redhat.com> References: <1427088255-29885-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VkVuOCYP9O7H3CXI" Content-Disposition: inline In-Reply-To: <1427088255-29885-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: Switch to host monotonic clock for IO throttling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , pbonzini@redhat.com, berto@igalia.com, qemu-devel@nongnu.org, Stefan Hajnoczi --VkVuOCYP9O7H3CXI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 23, 2015 at 01:24:15PM +0800, Fam Zheng wrote: > Currently, throttle timers won't make any progress when VCPU is not > running, which would stall the request queue in utils, qtest, vm > suspending, and live migration without special handling. >=20 > For example in bdrv_drain_all, all requests are resumed immediately > without taking throttling limit into account. This means whenever it is > called, IO throttling goes ineffective (examples: system reset, > migration and many block job operations.). >=20 > This might be some loophole that guest could exploit. >=20 > If we use the host clock, we can later just trust the nested poll when > waiting for requests. >=20 > Note that for qemu-iotests case 093, which sets up qtest when running > QEMU, we still use vm clock so the script can control the clock stepping > in order to be deterministic. >=20 > Signed-off-by: Fam Zheng >=20 > --- > v2: Don't break qemu-iotests 093. > --- > block.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) Should we make an exception for live migration to reduce downtime? I'm concerned that now vm_stop() can take even longer since we'll wait for throttling. Stefan --VkVuOCYP9O7H3CXI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVEBt8AAoJEJykq7OBq3PIwpQH/0jHMjUF7bOePP9zDsk4vEqV 3Rtpdv113kJ83E7a5LIjvuwfuWfUT0puKL7sSJd5+RJtnBOdM5rtsTZuRWugltrA ODrkivQynsmTeWh/hxHIo5HokY7iB9qLct7yP2HnPJ2ezHfZlVPV0WimqAuJIX7f z92BSKerKIz2xDUt+VxztvSrD7hCX4VFp5kkMWQV7iPgpy4lnpGTcy4U7hCk98Q/ 1TVxfMrXsA3TlK+bSC27JrQH16TrWGYUQ57rvZzzOQMZeQg8kJUrvQwez7VTJKr0 A7TKVGoyKkUmmv1A9/Vp/7ANfiAk/ge5SbkBB35kn+vtSbq/ygWB0ZT+37KM0kw= =4pDx -----END PGP SIGNATURE----- --VkVuOCYP9O7H3CXI--