From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YanHj-0002Pj-64 for qemu-devel@nongnu.org; Wed, 25 Mar 2015 11:32:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YanHf-00055P-I2 for qemu-devel@nongnu.org; Wed, 25 Mar 2015 11:31:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YanHf-000552-8t for qemu-devel@nongnu.org; Wed, 25 Mar 2015 11:31:55 -0400 Date: Wed, 25 Mar 2015 15:31:10 +0000 From: Stefan Hajnoczi Message-ID: <20150325153110.GA11124@stefanha-thinkpad.redhat.com> References: <1427268446-6426-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <1427268446-6426-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4] 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 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 25, 2015 at 03:27:26PM +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 > Block jobs are confusingly inconsistent between with and without > throttling: if user sets a bps limit, stops the vm, then start a block > job, the block job will not make any progress; in contrary, if user > unsets the bps limit, or if it's not set, the block job will run > normally. >=20 > After this patch, with the host clock, even if the VCPUs are stopped, > the throttle queues will be processed. >=20 > This patch also enables potential to add throttle to bdrv_drain_all. > Currently all requests are drained immediately. In other words whenever > it is called, IO throttling goes ineffective (examples: system reset, > migration and many block job operations.). This is a loophole that guest > could exploit. If we use the host clock, we can later just trust the > nested poll. This could be done on top. >=20 > Note that for qemu-iotests case 093, which uses qtest, we still keep vm > clock so the script can control the clock stepping in order to be > deterministic. >=20 > Reviewed-by: Paolo Bonzini > Reviewed-by: Alberto Garcia > Signed-off-by: Fam Zheng >=20 > --- > v4: Fix the description. [Alberto] > v3: More justification in commit message. [Stefan] > Add Paolo's and Alberto's rev-bys. > v2: Don't break qemu-iotests 093. > --- > block.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) Queued for QEMU 2.4. Please let me know if you think it's worth risking adding it in QEMU 2.3. Thanks, applied to my block-next tree: https://github.com/stefanha/qemu/commits/block-next Stefan --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVEtS+AAoJEJykq7OBq3PICpAH/2xvpFxS1USE8alo9CQhxQW2 vFEYWi2hfb4/6JEaVV069/g7dNIisbDD5iVNZX98up7rmdrINNCFiqGv+FQD8Wa+ ao0q3ndtfAPSOo7IvK0a7suoKKtUhQqyAcXXwrO3W65JdinU+0izrmhOQEbpk48+ MYWCbK4HaDpPOS+fI2McFmsoHAGN61n0Avc4ksT/x7SG1VqUZ5RovN7zjF7ux2cJ JGJ1QH83RB8KUzLEySRoae6xqfTLpczXg+656ZXD896o2xtiBbMBxZdDJiHfjtGX 9t/jE7lkOVYLoz9jVlleeHZr6kyxFSbXQ64i8V/myuLB6ix8qCvPAyONOdZTM00= =Wkju -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--