From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgDMG-0004aO-2j for qemu-devel@nongnu.org; Thu, 09 Apr 2015 10:23:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgDMC-0000EY-Op for qemu-devel@nongnu.org; Thu, 09 Apr 2015 10:23:04 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:36860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgDMC-0000ED-F6 for qemu-devel@nongnu.org; Thu, 09 Apr 2015 10:23:00 -0400 Received: by wizk4 with SMTP id k4so94356061wiz.1 for ; Thu, 09 Apr 2015 07:22:59 -0700 (PDT) Date: Thu, 9 Apr 2015 15:22:57 +0100 From: Stefan Hajnoczi Message-ID: <20150409142257.GE2783@stefanha-thinkpad.redhat.com> References: <3060954d506be499c26d07ba4624dd33cd7b002d.1427732020.git.berto@igalia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SWTRyWv/ijrBap1m" Content-Disposition: inline In-Reply-To: <3060954d506be499c26d07ba4624dd33cd7b002d.1427732020.git.berto@igalia.com> Subject: Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi --SWTRyWv/ijrBap1m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 30, 2015 at 07:19:42PM +0300, Alberto Garcia wrote: > @@ -1941,9 +1951,11 @@ void qmp_block_set_io_throttle(const char *device,= int64_t bps, int64_t bps_rd, > aio_context_acquire(aio_context); > =20 > if (!bs->io_limits_enabled && throttle_enabled(&cfg)) { > - bdrv_io_limits_enable(bs); > + bdrv_io_limits_enable(bs, has_group ? group : device); > } else if (bs->io_limits_enabled && !throttle_enabled(&cfg)) { > bdrv_io_limits_disable(bs); > + } else if (bs->io_limits_enabled && throttle_enabled(&cfg)) { > + bdrv_io_limits_update_group(bs, has_group ? group : device); > } > =20 > if (bs->io_limits_enabled) { The semantics are inconsistent: 1. Create drive0 with throttle group "mygroup". 2. Issue block-set-io-throttle device=3D"drive0" The result is that a new throttle group called "drive0" is created. I expected to modify the throttling configuration for drive0 (i.e. "mygroup"). Now let's disable the throttle group: 3. Issue block-set-io-throttle with 0 values for device=3D"drive0" The result is that "mygroup" is changed to all 0s. Enable should behave like disable and operate on the device's throttle group. Stefan --SWTRyWv/ijrBap1m Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVJotBAAoJEJykq7OBq3PIlC8H/iD7HkV8ZVpEta/L9v/LJxEm 4fxgJHqZ94ptqyxho7mcNPcP36haH/kdxQfvAlwo53jSQ0yoZFzzb7jcaW+ifwGC +i6oByMUiHnPkoxrqKBhHeI9ZrVOdhidu9SeK4tgGkKEpF9RRyI1j8RTXsEDxDSY hFkAUtKU64muKbLAHk5hY6st5Ha5ZI576PZ3o6KnlBFjt0Yd+Vvk0Qs/RBW08RlL WPYwpRfP0jblCL7yKUX8VkQcA1ccfrF2cauJDD5gfnN/BhxZtFSkweifrbldiV1a XuaQiPq8w1Z9pPUJXnbm7plt5z6hXPOlGfIJxlUczCAiB6pAMgryBLv+umL6rZU= =SaH6 -----END PGP SIGNATURE----- --SWTRyWv/ijrBap1m--