Received: from eggs.gnu.org ([2001:4830:134:3::10]:44938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhtre-0003mZ-7k for qemu-devel@nongnu.org; Thu, 08 Sep 2016 03:35:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhtrb-0007WT-4y for qemu-devel@nongnu.org; Thu, 08 Sep 2016 03:35:14 -0400 Received: from 3.mo68.mail-out.ovh.net ([46.105.58.60]:37485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhtra-0007Vi-Qs for qemu-devel@nongnu.org; Thu, 08 Sep 2016 03:35:11 -0400 Received: from player778.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 1C9B9FF9A6A for ; Thu, 8 Sep 2016 09:35:09 +0200 (CEST) Date: Thu, 8 Sep 2016 09:34:55 +0200 From: Greg Kurz Message-ID: <20160908093455.5189b9b9@bahia> In-Reply-To: References: <1473251980-39805-1-git-send-email-pradeep.jagadeesh@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/oclo+Qfz1AujTfM_Cx=tl5m"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] [PATCH] 9pfs: add support for IO limits to 9p-local driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Pradeep , "Aneesh Kumar K.V" , Claudio Fontana , Alberto Garcia , Pradeep , qemu-devel@nongnu.org --Sig_/oclo+Qfz1AujTfM_Cx=tl5m Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 7 Sep 2016 16:36:12 -0500 Eric Blake wrote: > On 09/07/2016 07:39 AM, Pradeep wrote: > > Uses throttling APIs to limit I/O bandwidth and number of operations on= the=20 > > devices which use 9p-local driver. > >=20 > > Signed-off-by: Pradeep > > fsdev/file-op-9p.h | 3 + > > fsdev/qemu-fsdev-opts.c | 52 +++++++++++++ > > hw/9pfs/9p-local.c | 18 ++++- > > hw/9pfs/9p-throttle.c | 199 ++++++++++++++++++++++++++++++++++++++++= ++++++++ > > hw/9pfs/9p-throttle.h | 55 +++++++++++++ > > hw/9pfs/9p.c | 7 ++ > > hw/9pfs/Makefile.objs | 1 + > > 7 files changed, 333 insertions(+), 2 deletions(-) > > create mode 100644 hw/9pfs/9p-throttle.c > > create mode 100644 hw/9pfs/9p-throttle.h > >=20 > > Hi All, > >=20 > > This adds the support for the 9p-local driver. > > For now this functionality can be enabled only through qemu cli options. > > QMP interface and support to other drivers need further extensions. > > To make it simple for other drivers, the throttle code has been put in > > separate files. =20 >=20 > CLI-only extensions mean that we can't use it during hotplug. Are you > sure that blockdev-add won't automatically enable these options, given > that it tries to convert the dictionary passed through QMP back into the > QemuOpts form that matches command line parsing? Also, aren't these 9p-local is fsdev, not blockdev: it has its own QemuOpts and cannot be passed to blockdev-add (and BTW, there isn't any fsdev-add either). > limits very similar to what is already available in the throttle driver? Yes, IIUC this patch tries to implement similar throttling concepts to the read/write operations in fsdev. More details on the motivation here: https://lists.gnu.org/archive/html/qemu-discuss/2016-04/msg00064.html > Why are we repeating them at the 9p driver, instead of putting a > throttle group BDS in the mix? >=20 Not sure if it is possible to mix fsdev and blockdev... to be honest, I really don't know how one would achieve that :) > > +++ b/fsdev/qemu-fsdev-opts.c > > @@ -37,6 +37,58 @@ static QemuOptsList qemu_fsdev_opts =3D { > > }, { > > .name =3D "sock_fd", > > .type =3D QEMU_OPT_NUMBER, > > + }, { > > + .name =3D "bps", > > + .type =3D QEMU_OPT_NUMBER, > > + .help =3D "total bytes burst", > > + }, { > > + .name =3D "bps_rd", > > + .type =3D QEMU_OPT_NUMBER, > > + .help =3D "total bytes read burst", > > + }, { =20 >=20 >=20 > At the very least, if we must have multiple throttle implementations, > can they at least share code so that we don't forget to update one when > adding another option to the other? >=20 This is experimental work. If it turns out that fsdev and blockdev throttling are close enough, I agree that they should probably share code. But at this point, I guess they should remain distinct. Cheers. -- Greg --Sig_/oclo+Qfz1AujTfM_Cx=tl5m Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlfRFKAACgkQAvw66wEB28LrjACfRrtGgeBrTbq0E8Q0wOTJcjL7 2XAAoIK/tVJKNjq4RAEsFJ6aZs/XzFq9 =u8Tz -----END PGP SIGNATURE----- --Sig_/oclo+Qfz1AujTfM_Cx=tl5m--