[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87boxasdhz.fsf@rustcorp.com.au>
Date: Mon, 04 Jul 2011 17:07:12 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: "Michael S. Tsirkin" <mst@...hat.com>,
Sasha Levin <levinsasha928@...il.com>
Cc: linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
dave@...ux.vnet.ibm.com, Amit Shah <amit.shah@...hat.com>,
Pekka Enberg <penberg@...nel.org>
Subject: Re: [PATCH] virtio_balloon: Notify guest only after deflating the balloon
On Sun, 3 Jul 2011 15:11:37 +0300, "Michael S. Tsirkin" <mst@...hat.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists