qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Amos Kong <akong@redhat.com>
Cc: amit.shah@redhat.com,
	"libvir-list@redhat.com" <libvir-list@redhat.com>,
	qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: Re: [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate
Date: Tue, 26 Nov 2013 07:32:37 -0700	[thread overview]
Message-ID: <5294B105.2080000@redhat.com> (raw)
In-Reply-To: <5294A902.5060000@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]

[adding libvirt]

On 11/26/2013 06:58 AM, Paolo Bonzini wrote:
> Il 26/11/2013 14:43, Amos Kong ha scritto:
>> /* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s.  If
>>  * you have an entropy source capable of generating more entropy than this
>>  * and you can pass it through via virtio-rng, then hats off to you.  Until
>>  * then, this is unlimited for all practical purposes.
>>  */
>>
>> But the current rate is (INT64_MAX) bytes per (1 << 16) ms, it's 128,000 TB/s
> 
> You are changing:
> 
> * max-bytes from 2^63 to 2^47
> 
> * period from 65536 to 60000
> 
> For a user, changing only period would have no effect, the limit rate
> would remain effectively infinite.  Changing max-bytes would give a 7%
> higher rate after your patch.
> 
> Not a big deal, and max-bytes is easier to explain after your patch
> (bytes/minute) than before (bytes/65536ms).
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> 

Hmm.  Libvirt is already converting a user's rate of bytes/period into
the qemu parameters, defaulting to 1 second as its default period.  Am I
correct that as long as libvirt specified both rate AND period, then
this change has no impact (and that the 7% change occurs if you specify
period while leaving max-bytes alone)?  Or is this an ABI change where
libvirt will have to be taught to be smart enough to know whether it is
old qemu or new qemu to adjust how libvirt does its calculations when
converting the user's rate into qemu terms?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  parent reply	other threads:[~2013-11-26 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26 13:43 [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate Amos Kong
2013-11-26 13:58 ` Paolo Bonzini
2013-11-26 14:23   ` Amos Kong
2013-11-26 14:32   ` Eric Blake [this message]
2013-11-26 14:44     ` Paolo Bonzini
2013-11-26 15:23     ` Amos Kong
2013-11-26 15:32       ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5294B105.2080000@redhat.com \
    --to=eblake@redhat.com \
    --cc=akong@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=libvir-list@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).