From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2nca-0006et-G5 for qemu-devel@nongnu.org; Fri, 26 Jul 2013 15:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2ncZ-0004jZ-CB for qemu-devel@nongnu.org; Fri, 26 Jul 2013 15:24:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2ncZ-0004jN-4h for qemu-devel@nongnu.org; Fri, 26 Jul 2013 15:24:11 -0400 Message-ID: <51F2CCD6.2020107@redhat.com> Date: Fri, 26 Jul 2013 13:24:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <1374596968-20181-1-git-send-email-benoit@irqsave.net> <1374596968-20181-4-git-send-email-benoit@irqsave.net> In-Reply-To: <1374596968-20181-4-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ePWDmDX1XneOasxpdmoIt4pw6HTX7uLW3" Subject: Re: [Qemu-devel] [PATCH V3 for-1.6 3/5] block: Add support for throttling burst threshold in QMP and the command line. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ePWDmDX1XneOasxpdmoIt4pw6HTX7uLW3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/23/2013 10:29 AM, Beno=C3=AEt Canet wrote: > The thresholds of the leaky bucket algorithm can be used to allow some > burstiness. >=20 > Signed-off-by: Benoit Canet > --- > block/qapi.c | 24 +++++++++++++ > blockdev.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++= +------- > hmp.c | 32 +++++++++++++++-- > qapi-schema.json | 34 ++++++++++++++++-- > qemu-options.hx | 2 +- > qmp-commands.hx | 30 ++++++++++++++-- > 6 files changed, 205 insertions(+), 22 deletions(-) >=20 > @@ -1916,6 +1971,18 @@ QemuOptsList qemu_common_drive_opts =3D { > .type =3D QEMU_OPT_NUMBER, > .help =3D "limit write operations per second", > },{ > + .name =3D "iops_threshold", > + .type =3D QEMU_OPT_NUMBER, > + .help =3D "total I/O operations threshold", > + },{ Kevin's series renamed these to have a dash in the name, and also moved all the throttling parameters into a sub-struct. Does it make more sense to have just '*throttling' with that sub-struct containing 12 parameters, 6 for limits and 6 for thresholds, or would it be better to have '*throttling' with 6 members for limits, as well as '*throttling-threshold' with the other 6 members? Naming-wise, throttling.bps-total and throttling-threshold.bps-total convey as much information as throttling.bps-total and throttling.bps-total-threshold. > +++ b/qapi-schema.json > @@ -769,6 +769,18 @@ > # > # @image: the info of image used (since: 1.6) > # > +# @bps_threshold: #optional total threshold in bytes (Since 1.6) As others have stated, it would be worth explaining at the high level the difference between limit and threshold (ie. why I need two different parameters), as well as what the threshold defaults to if omitted (which WILL be the case when driven by older management tools). > +++ b/qemu-options.hx > @@ -409,7 +409,7 @@ DEF("drive", HAS_ARG, QEMU_OPTION_drive, > " [,cache=3Dwritethrough|writeback|none|directsync|unsafe][,= format=3Df]\n" > " [,serial=3Ds][,addr=3DA][,id=3Dname][,aio=3Dthreads|native= ]\n" > " [,readonly=3Don|off][,copy-on-read=3Don|off]\n" > - " [[,bps=3Db]|[[,bps_rd=3Dr][,bps_wr=3Dw]]][[,iops=3Di]|[[,i= ops_rd=3Dr][,iops_wr=3Dw]]\n" > + " [[,bps=3Db]|[[,bps_rd=3Dr][,bps_wr=3Dw]]][[,iops=3Di]|[[,i= ops_rd=3Dr][,iops_wr=3Dw][,bps_threshold=3Dbt]|[[,bps_rd_threshold=3Drt][= ,bps_wr_threshold=3Dwt]]][[,iops_threshold=3Dit]|[[,iops_rd_threshold=3Dr= t][,iops_wr_threshold=3Dwt]]\n" Is it worth line-wrapping this, so the help text doesn't pass 80 columns?= --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ePWDmDX1XneOasxpdmoIt4pw6HTX7uLW3 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR8szWAAoJEKeha0olJ0NqKqkH/RB3Lj/2pGkLKX4MQNF1EzUz wqOAd00ut6+Yn57aZBNMB7xRmBtuV7pKpqXtTPAjYvwmyXLQESWa6e5Prt6kWHEN B1UpTdu362S1hx0y2t9mGbyCM0tdAnogYEFJT3vpCMzbAWJ0riPccdWtioSy5ZSx FALBS7k6Xn25SNRBsIOOe92oGR+ilFuU0ZSvA4Y4uVDa32duA8HLiUF1W2P9oz1D eUgRS9K/loHO+95GVYqvz2xHEsTtXAGId+SYYSd2zoqfEpl4/Kl8st6FlfKjEX/0 ekpIFw9SJ+rLy1pU/P+dMwi9KQj7TLBCARcAzWFbLxvaltNyCnUa+RICtgKTTA8= =65bX -----END PGP SIGNATURE----- --ePWDmDX1XneOasxpdmoIt4pw6HTX7uLW3--