public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	Sasha Levin <levinsasha928@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
	dave@linux.vnet.ibm.com, Amit Shah <amit.shah@redhat.com>,
	Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH] virtio_balloon: Notify guest only after deflating the balloon
Date: Mon, 04 Jul 2011 17:07:12 +0930	[thread overview]
Message-ID: <87boxasdhz.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20110703121137.GA15826@redhat.com>

On Sun, 3 Jul 2011 15:11:37 +0300, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Sun, Jul 03, 2011 at 01:52:29PM +0300, Sasha Levin wrote:
> > This just leads me to believe that we should either not notify the host,
> > or not wait_for_completion() when telling the host.
> 
> Interesting. The spec says
> 
> (a) The driver constructs an array of addresses of memory pages it has
> previously given to the balloon, as described above. This descriptor
> is added to the deflateq.
> (b) If the VIRTIO_BALLOON_F_MUST_TELL_HOST feature is set,
> the guest may not use these requested pages until that descriptor in
> the deflateq has been used by the device.
> (c) Otherwise, the guest may begin to re-use pages previously given to
> the balloon before the device has acknowledged their withdrawl.
>  21 In this case, deflation advice is merely a courtesy
> 
> This does not discuss the following issue: what happens
> if the device never uses the descriptor in the deflateq
> and VIRTIO_BALLOON_F_MUST_TELL_HOST is not set?
> 
> Rusty, any comments?

The device still *has* a queue.  It should process it!

The feature should be called VIRTIO_BALLOON_F_ASK_HOST_BEFORE_REUSE.

If we didn't want the information at *all*, we would have made the queue
not exist in that case...

Thanks,
Rusty.

      parent reply	other threads:[~2011-07-04  7:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02  3:06 [PATCH] virtio_balloon: Notify guest only after deflating the balloon Sasha Levin
2011-07-03  8:27 ` Michael S. Tsirkin
2011-07-03  9:46   ` Sasha Levin
2011-07-03 10:30     ` Michael S. Tsirkin
2011-07-03 10:52       ` Sasha Levin
2011-07-03 12:11         ` Michael S. Tsirkin
2011-07-03 12:32           ` Sasha Levin
2011-07-03 13:44             ` Michael S. Tsirkin
2011-07-03 15:12               ` Sasha Levin
2011-07-03 16:36                 ` Michael S. Tsirkin
2011-07-04  7:37           ` Rusty Russell [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=87boxasdhz.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=amit.shah@redhat.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=penberg@kernel.org \
    --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