From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQIcW-00007K-Ej for qemu-devel@nongnu.org; Tue, 24 Feb 2015 11:46:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQIcR-0006PR-Ul for qemu-devel@nongnu.org; Tue, 24 Feb 2015 11:46:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQIcR-0006PN-NJ for qemu-devel@nongnu.org; Tue, 24 Feb 2015 11:45:59 -0500 Message-ID: <54ECAA9C.5080500@redhat.com> Date: Tue, 24 Feb 2015 09:45:16 -0700 From: Eric Blake MIME-Version: 1.0 References: <142929b6b5adbf371309043d23864c22b0afdec4.1423842044.git.berto@igalia.com> In-Reply-To: <142929b6b5adbf371309043d23864c22b0afdec4.1423842044.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Lp9kFlqWwdQIVGmVrai81giEnF0cRTb7J" Subject: Re: [Qemu-devel] [PATCH 7/9] throttle: Add throttle group support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Lp9kFlqWwdQIVGmVrai81giEnF0cRTb7J Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/13/2015 09:06 AM, Alberto Garcia wrote: > The throttle group support use a cooperative round robin scheduling alg= orithm. >=20 > The principles of the algorithm are simple: > - Each BDS of the group is used as a token in a circular way. > - The active BDS compute if a wait must be done and arm the right timer= =2E > - If a wait must be done the token timer will be armed so the token wil= l become > the next active BDS. >=20 > Signed-off-by: Alberto Garcia > --- > block.c | 212 ++++++++++++++++++++++++++++++++++++++= +------- > block/qapi.c | 7 +- > block/throttle-groups.c | 2 +- > blockdev.c | 19 ++++- > hmp.c | 4 +- > include/block/block.h | 3 +- > include/block/block_int.h | 9 +- > qapi/block-core.json | 5 +- > qemu-options.hx | 1 + > qmp-commands.hx | 3 +- Just a qapi review for now... > +++ b/qapi/block-core.json > @@ -989,6 +989,9 @@ > # > # @iops_size: #optional an I/O size in bytes (Since 1.7) > # > +# Why the extra blank line? > +# @group: #optional throttle group name (Since 2.3) > +# > # Returns: Nothing on success > # If @device is not a valid block device, DeviceNotFound > # > @@ -1000,7 +1003,7 @@ > '*bps_max': 'int', '*bps_rd_max': 'int', > '*bps_wr_max': 'int', '*iops_max': 'int', > '*iops_rd_max': 'int', '*iops_wr_max': 'int', > - '*iops_size': 'int' } } > + '*iops_size': 'int', '*group': 'str' } } What is the default if no 'group' is specified, unthrottled? I hate write-only interfaces. What is the corresponding 'query-*' command that I can invoke to learn which group, if any, a node is associated with? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Lp9kFlqWwdQIVGmVrai81giEnF0cRTb7J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU7KqcAAoJEKeha0olJ0NqSZgIAJyQRww5dqcw1haUcYLGIuqq AOPhWm/K6eg6V+SfyRw+TY2tr8PfTXfGMJj28pAQCvRDeBIK/3m6A837LwoWJBNA 0w4XttCK62clSct/r477qOaPOOWDCc2KljDtHtQMGdkeCCARM6ugHIT+D8izaEv5 P5FsNjQQcCK2MzcUsbmKRPe9AnS96hP4G7GHsG0/v5300hGJFKIG4NUviBqTehAY xFTqwy2Z04tCM0aHtMyceNkrkBNHB958qKhbO8uROr+1Fqfl/QRibltSHr+89whO PvPzeCeYWTLzKqhDLbHv+P7EEc4D3oD4TSjUjqcY+8GlDNF5JBYgF27us3pZ1eE= =ABKE -----END PGP SIGNATURE----- --Lp9kFlqWwdQIVGmVrai81giEnF0cRTb7J--