Re: [PATCH] Add a page cache-backed balloon device driver.

From: Rusty Russell
Date: Sun Jul 01 2012 - 21:53:08 EST


On Tue, 26 Jun 2012 16:21:58 -0700, Frank Swiderski <fes@xxxxxxxxxx> wrote:
> On Tue, Jun 26, 2012 at 2:47 PM, Michael S. Tsirkin <mst@xxxxxxxxxx> wrote:
> > Let's assume it's a feature bit: how would you
> > formulate what the feature does *from host point of view*?
>
> In this implementation, the host doesn't keep track of pages in the
> balloon, as there is no explicit deflate path. The host device for
> this implementation should merely, for example, MADV_DONTNEED on the
> pages sent in an inflate. Thus, the inflate becomes a notification
> that the guest doesn't need those pages mapped in, but that they
> should be available if the guest touches them. In that sense, it's
> not a rigid shrink of guest memory. I'm not sure what I'd call the
> feature bit though.
>
> Was that the question you were asking, or did I misread?

Hmm, the spec is unfortunately vague: !VIRTIO_BALLOON_F_MUST_TELL_HOST
implies you should tell the host (eventually). I don't know if any
implementations actually care though.

We could add a VIRTIO_BALLOON_F_NEVER_TELL_DEFLATE which would mean the
deflate vq need not be used at all.

Is it altogether impossible to know when a page is reused in your
implementation? If we could do that, we could replace our balloon with
this one.

(My deep ignorance of vm issues is hurting us here, sorry.)

Cheers,
Rusty.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/