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] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation
Date: Tue, 28 May 2013 14:04:03 +0200 [thread overview]
Message-ID: <51A49D33.8090008@redhat.com> (raw)
In-Reply-To: <20130528114402.GA21107@redhat.com>
Il 28/05/2013 13:44, Michael S. Tsirkin ha scritto:
> negotiated in spec means "present and acked by guest".
> We can try and replace "negotiated" by "present and acked by guest"
> everywhere - think it will be clearer?
No, I understand what negotiated means. But in this case, "negotiated"
is not the word that you want.
>>>> Now rereading it, it may be correct, but it is not clear enough.
>>>>
>>>> Perhaps my patch is even too verbose, but it doesn't leave anything open
>>>> for interpretation.
>>>
>>> I'm fine with adding more clarifications but I don't yet see why
>>> do we need a new bit.
>>
>> There are three cases:
>>
>> 1) the drivers is not able to tell the host first (or never tell the
>> host at all), like the Windows driver or the Google fileballoon driver.
>> If the host always wants to be told first (e.g. a hypothetical
>> virtio-balloon running on Xen) it should somehow prevent these drivers
>> from running.
>
> I don't think hosts that always want to be told first can exist.
> Handling guests that don't tell first is super easy -
> e.g. just don't do anything.
Of course you can work around it and not do anything. This doesn't
change the fact that the host needs to know whether to actually balloon
out pages, or fake it.
>> 2) the driver will always tell the host first, like the Linux driver.
>> The host can trust the guest to do the right thing.
>
> It should not if guest did not ack the feature bit.
Of course.
1 = guest doesn't ack feature bit, host may have to "fake" ballooning
2 or 3 = guest acks feature bit, host assumes that guest will tell first
>> 3) the driver wants to optimize if the host can be told last (or not
>> told altogether). Again, the host can trust the guest to do the right
>> thing, but there are two possible behaviors for the guest driver.
>>
>> The existing bit lets the host distinguish 1 from 2+3. The other bit is
>> needed for the guest to pick the right behavior in case 3.
>
> 1 does not exist.
1 does not exist in the sense that it's always possible to work around
the problem. But you need to know when to work around it. In that
sense, 1 exists.
> And guests simply do not treat the existing bit as your spec patch says
> they should. Instead they treat it as they would treat your new bit.
How so? I even changed the name of the existing bit to
VIRTIO_F_GUEST_TELLS_HOST.
Paolo
next prev parent reply other threads:[~2013-05-28 12:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 10:10 [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation Paolo Bonzini
2013-05-27 15:55 ` Paolo Bonzini
[not found] ` <51A381D9.5010800@redhat.com>
2013-05-27 16:04 ` Michael S. Tsirkin
[not found] ` <20130527160437.GA18270@redhat.com>
2013-05-27 16:09 ` Paolo Bonzini
2013-05-27 17:02 ` Michael S. Tsirkin
2013-05-28 8:38 ` Paolo Bonzini
2013-05-28 10:45 ` Michael S. Tsirkin
[not found] ` <20130528104503.GD5467@redhat.com>
2013-05-28 11:13 ` Paolo Bonzini
2013-05-28 11:44 ` Michael S. Tsirkin
2013-05-28 12:04 ` Paolo Bonzini [this message]
2013-05-28 13:32 ` Michael S. Tsirkin
2013-05-28 14:06 ` Paolo Bonzini
2013-05-28 14:29 ` Michael S. Tsirkin
2013-05-28 14:32 ` Paolo Bonzini
[not found] ` <51A4C00C.6020707@redhat.com>
2013-05-28 15:09 ` Michael S. Tsirkin
2013-05-28 16:23 ` Paolo Bonzini
2013-05-28 16:50 ` Michael S. Tsirkin
2013-05-28 16:57 ` Paolo Bonzini
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=51A49D33.8090008@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).