All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: amit.shah@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
	anthony@codemonkey.ws, qemu-devel@nongnu.org,
	"libvir-list@redhat.com" <libvir-list@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate
Date: Tue, 26 Nov 2013 08:32:30 -0700	[thread overview]
Message-ID: <5294BF0E.1040603@redhat.com> (raw)
In-Reply-To: <20131126152352.GC29669@amosk.info>

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

On 11/26/2013 08:23 AM, Amos Kong wrote:

>>
>> Hmm.  Libvirt is already converting a user's rate of bytes/period into
>> the qemu parameters, defaulting to 1 second as its default period.
> 
> So libvirt will always pass a fixed 1 second period to qemu?

You forced me to check the code :)

We're safe.  Libvirt lets the user control both rate and period in the
XML.  If the user specifies neither, then libvirt doesn't pass max-bytes
or period (but that's the default for unlimited, and you argued that
even with your changes, the default is still effectively unlimited); the
same is true if the user specifies period but not rate (a different
period with no maximum is still effectively unlimited throughput, so it
didn't really matter that we don't pass period on through).  It is only
when the user specifies rate that libvirt passes anything on to qemu;
and in that case, libvirt always passes both max-bytes and period
(either with a period set by user, or with the period forced to 1000).

> 
> Nothing need to do in Libvirt for _this patch_

Agreed.  Phew.

-- 
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 --]

      reply	other threads:[~2013-11-26 15: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
2013-11-26 14:44     ` Paolo Bonzini
2013-11-26 15:23     ` Amos Kong
2013-11-26 15:32       ` Eric Blake [this message]

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=5294BF0E.1040603@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.