From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqwRX-0007YA-Ij for qemu-devel@nongnu.org; Wed, 11 Dec 2013 21:56:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqwRS-0006Jd-9U for qemu-devel@nongnu.org; Wed, 11 Dec 2013 21:56:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqwRS-0006JF-1k for qemu-devel@nongnu.org; Wed, 11 Dec 2013 21:55:58 -0500 Date: Thu, 12 Dec 2013 10:55:48 +0800 From: Amos Kong Message-ID: <20131212025548.GA8416@amosk.info> References: <1386598213-8156-1-git-send-email-akong@redhat.com> <1386598213-8156-3-git-send-email-akong@redhat.com> <52A7482B.302@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <52A7482B.302@redhat.com> Subject: Re: [Qemu-devel] [PATCH RFC 2/2] rng-egd: introduce a parameter to set buffer size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: amit.shah@redhat.com, varadgautam@gmail.com, qemu-devel@nongnu.org, anthony@codemonkey.ws --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 10, 2013 at 09:58:19AM -0700, Eric Blake wrote: > On 12/09/2013 07:10 AM, Amos Kong wrote: Hi Eric, > > This patch makes the buffer size configurable, the max > > buffer size is 65536. > >=20 > > -object rng-egd,chardev=3Dchr0,id=3Drng0,buf_size=3D1024 > >=20 > > Signed-off-by: Amos Kong > > --- > > backends/rng-egd.c | 24 +++++++++++++++++++++--- > > 1 file changed, 21 insertions(+), 3 deletions(-) >=20 > > @@ -281,6 +298,7 @@ static void rng_egd_init(Object *obj) > > object_property_add_str(obj, "chardev", > > rng_egd_get_chardev, rng_egd_set_chardev, > > NULL); > > + object_property_add_str(obj, "buf_size", NULL, rng_egd_set_buf_siz= e, NULL); > > } >=20 > Will libvirt ever need to set this property? And is it easily > discoverable whether qemu supports or lacks this property? This is ajust a RFC patch, we might fix the performance with other method. If it won't cost too much memory for buf, we can remove this parameter. In this patch, we have a default buffer size. =20 > --=20 > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org --=20 Amos. --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSqSW0AAoJELxSv6I5vP9jjn8P/32fnB1D85PTOWBlTKT4bE8v MwOEjFP2R9OR9Dp04GzEIFrxaq4y9mAnam2kxh1Hb4tJao+osQisOvESIIqa+nMT h9c1M3KyyhAFLo/nCwLdle47pO2DaSulcDZK/ecghGFXLXhNnR0o24tt8oqlc5mX SiNH20fLwkRDsS8QYVuMI/2e+x3QvarhM4Rv3GmjVmAgW4aS0T9kNdlbokA2sQHD 3GT5XIZ714hvhEMZIG0hLb6pxqNTlG+66ETreV4zWweChuFRzhx12TVAJ8Y6buQD yi4zdyeezS/IhLSr45YypEU8N+2zaI3jMn5mjTSFHFVPuUtxGj05TGQ+xjLqN6wl aQfh6u5W94E4B0YQmI0VlFMbFwCbJOVdMjt/tAa3XLW/j2e9Vd1NlL8Tz2tKtLwH bbqGSh79ES/sq2YSApvj1idFrjfRH2IEfPtCxp2L7xZ8eESNBXLQpt2UehLP7dQh OwqsfwYJ+vtcDS7fux6OtvBbhoHJL3ylrMtCmwujImk7IAI+Qa9Lb1t4QnCrCBIA uGR9uRb8cX0wKATzg31bSObeG8xa9x+euU81Jfz+34Omg7LL4oa9hcZkAG/3Gwq/ WkrfOMvcCMSgsi7dRrQZIgMJABiYlQD/8K/co/5cKX5kQsLqASi/RsAHtAYfbiD7 kKms3gQRz0d+wHu1Ojsb =K3rm -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--