virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v2 2/2] virtio-balloon spec: reintroduce "silent deflation" feature
Date: Wed, 29 May 2013 10:47:08 +0200	[thread overview]
Message-ID: <51A5C08C.1030708@redhat.com> (raw)
In-Reply-To: <20130529074950.GC4472@redhat.com>

Il 29/05/2013 09:49, Michael S. Tsirkin ha scritto:
> On Tue, May 28, 2013 at 07:40:18PM +0200, Paolo Bonzini wrote:
>> The original idea of the VIRTIO_BALLOON_F_MUST_TELL_HOST feature was to
>> let drivers skip usage of the deflate queue when leaking the balloon
>> ("silent deflation").  Guests may benefit from silent deflate by
>> aggressively inflating the balloon; they know that they will be able to
>> use ballooned pages without issuing a (blocking) request to the device.
>>
>> The previous patch redefined the feature to ensure correctness of the
>> operation when drivers do not correctly report deflation.  This patch
>> adds back the optimization.
>>
>> The new feature bit is for the host to tell the drivers if silent
>> deflation is actually supported.  The meaning of the feature bit is
>> reversed compared to the original, because the original meaning was
>> not safe against migration.
>>
>> For features to be safe against migration, they have to be defined as
>> "this is true if the guest _can_ do X".  For such a "positive" feature,
>> migration is possible if the destination supports it, or the source
>> didn't set it:
>>
>>     dest support      source set          ok?
>>           T                T              T
>>           T                F              T
>>           F                T              F
>>           F                F              T
>>
>> Instead, the old feature was defined as "this is true if the guest
>> _cannot_ do X".  For such a "negative" feature, migration is possible
>> if the destination supports it, or the source sets it:
>>
>>     dest support      source set          ok?
>>           T                T              T
>>           T                F              F
>>           F                T              T
>>           F                F              T
>>
>> However, the negotiated features are supposed to be the AND of the
>> device- and driver-supported features.  In the F/T case, the feature
>> would be negotiated by the source as T, and become F when negotiated on
>> the destination.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Do you have any numbers showing how this new feature improves
> performance?
> We are able to batch quite a lot of pages in a single deflate
> request - is the overhead measureable in practice?

It's not only about better times, but also about better algorithms.  I
started writing this after seeing the Google fileballoon driver.  For
that implementation, the deflateq cannot be used at all.

Paolo

  reply	other threads:[~2013-05-29  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 17:40 [PATCH v2 0/2] virtio-balloon spec: silent deflation Paolo Bonzini
2013-05-28 17:40 ` [PATCH v2 1/2] virtio-balloon spec: rewrite description of VIRTIO_BALLOON_F_MUST_TELL_HOST Paolo Bonzini
2013-05-28 18:15   ` Michael S. Tsirkin
2013-05-29  6:24     ` Paolo Bonzini
     [not found]     ` <51A59F0A.80805@redhat.com>
2013-05-29  7:45       ` Michael S. Tsirkin
2013-05-29  8:45         ` Paolo Bonzini
2013-05-28 17:40 ` [PATCH v2 2/2] virtio-balloon spec: reintroduce "silent deflation" feature Paolo Bonzini
2013-05-29  7:49   ` Michael S. Tsirkin
2013-05-29  8:47     ` Paolo Bonzini [this message]
2013-05-29  9:25       ` Michael S. Tsirkin
2013-05-29 14:21 ` [PATCH v2 0/2] virtio-balloon spec: silent deflation Michael S. Tsirkin

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=51A5C08C.1030708@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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).