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

2012-10-30 Thread Mike Waychison
On Tue, Oct 30, 2012 at 8:29 AM, Michael S. Tsirkin wrote: > On Tue, Sep 11, 2012 at 12:10:18AM +0300, Michael S. Tsirkin wrote: >> > On the plus side, having an exit taken here on each page turns out to >> > be relatively cheap, as the vmexit from the page fault should be >> > faster to process a

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

2012-10-30 Thread Michael S. Tsirkin
On Tue, Sep 11, 2012 at 12:10:18AM +0300, Michael S. Tsirkin wrote: > > On the plus side, having an exit taken here on each page turns out to > > be relatively cheap, as the vmexit from the page fault should be > > faster to process as it is fully handled within the host kernel. > > > > Perhaps so

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

2012-09-11 Thread Rusty Russell
Mike Waychison writes: > On Mon, Sep 10, 2012 at 3:59 PM, Michael S. Tsirkin wrote: >> On Mon, Sep 10, 2012 at 01:37:06PM -0400, Mike Waychison wrote: >>> On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin wrote: >>> > On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: >>> >> This

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

2012-09-10 Thread Michael S. Tsirkin
On Mon, Sep 10, 2012 at 04:49:40PM -0400, Mike Waychison wrote: > On Mon, Sep 10, 2012 at 3:59 PM, Michael S. Tsirkin wrote: > > On Mon, Sep 10, 2012 at 01:37:06PM -0400, Mike Waychison wrote: > >> On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin > >> wrote: > >> > On Tue, Jun 26, 2012 at 01:

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

2012-09-10 Thread Mike Waychison
On Mon, Sep 10, 2012 at 3:59 PM, Michael S. Tsirkin wrote: > On Mon, Sep 10, 2012 at 01:37:06PM -0400, Mike Waychison wrote: >> On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin wrote: >> > On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: >> >> This implementation of a virtio ba

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

2012-09-10 Thread Michael S. Tsirkin
On Mon, Sep 10, 2012 at 01:37:06PM -0400, Mike Waychison wrote: > On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin wrote: > > On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > >> This implementation of a virtio balloon driver uses the page cache to > >> "store" pages that have

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

2012-09-10 Thread Mike Waychison
On Mon, Sep 10, 2012 at 2:04 PM, Rik van Riel wrote: > On 09/10/2012 01:37 PM, Mike Waychison wrote: >> >> On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin >> wrote: > > >>> Also can you pls answer Avi's question? >>> How is overcommit managed? >> >> >> Overcommit in our deployments is managed

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

2012-09-10 Thread Rik van Riel
On 09/10/2012 01:37 PM, Mike Waychison wrote: On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin wrote: Also can you pls answer Avi's question? How is overcommit managed? Overcommit in our deployments is managed using memory cgroups on the host. This allows us to have very directed polici

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

2012-09-10 Thread Mike Waychison
On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin wrote: > On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: >> This implementation of a virtio balloon driver uses the page cache to >> "store" pages that have been released to the host. The communication >> (outside of target coun

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

2012-09-10 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > This implementation of a virtio balloon driver uses the page cache to > "store" pages that have been released to the host. The communication > (outside of target counts) is one way--the guest notifies the host when > it adds a page

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

2012-09-05 Thread Rusty Russell
Paolo Bonzini writes: > Il 02/07/2012 02:29, Rusty Russell ha scritto: >> VIRTIO_BALLOON_F_MUST_TELL_HOST >> implies you should tell the host (eventually). I don't know if any >> implementations actually care though. > > This is indeed broken, because it is a "negative" feature: it tells you > th

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

2012-09-03 Thread Avi Kivity
On 06/26/2012 11:32 PM, Frank Swiderski wrote: > This implementation of a virtio balloon driver uses the page cache to > "store" pages that have been released to the host. The communication > (outside of target counts) is one way--the guest notifies the host when > it adds a page to the page cache

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

2012-09-02 Thread Paolo Bonzini
Il 02/07/2012 02:29, Rusty Russell ha scritto: > VIRTIO_BALLOON_F_MUST_TELL_HOST > implies you should tell the host (eventually). I don't know if any > implementations actually care though. This is indeed broken, because it is a "negative" feature: it tells you that "implicit deflate" is _not_ su

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

2012-08-30 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > +static void fill_balloon(struct virtio_balloon *vb, size_t num) > +{ > + int err; > + > + /* We can only do one array worth at a time. */ > + num = min(num, ARRAY_SIZE(vb->pfns)); > + > + for (vb->num_pfns = 0; vb->

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

2012-07-01 Thread Rusty Russell
On Tue, 26 Jun 2012 16:21:58 -0700, Frank Swiderski wrote: > On Tue, Jun 26, 2012 at 2:47 PM, Michael S. Tsirkin 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 pag

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

2012-06-27 Thread Frank Swiderski
On Wed, Jun 27, 2012 at 9:06 AM, Michael S. Tsirkin wrote: > On Wed, Jun 27, 2012 at 08:48:55AM -0700, Frank Swiderski wrote: >> On Tue, Jun 26, 2012 at 7:56 PM, Rusty Russell wrote: >> > On Wed, 27 Jun 2012 00:41:06 +0300, "Michael S. Tsirkin" >> > wrote: >> >> On Tue, Jun 26, 2012 at 01:32:58

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

2012-06-27 Thread Michael S. Tsirkin
On Wed, Jun 27, 2012 at 08:48:55AM -0700, Frank Swiderski wrote: > On Tue, Jun 26, 2012 at 7:56 PM, Rusty Russell wrote: > > On Wed, 27 Jun 2012 00:41:06 +0300, "Michael S. Tsirkin" > > wrote: > >> On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > >> > This implementation of a v

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

2012-06-27 Thread Frank Swiderski
On Tue, Jun 26, 2012 at 7:56 PM, Rusty Russell wrote: > On Wed, 27 Jun 2012 00:41:06 +0300, "Michael S. Tsirkin" > wrote: >> On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: >> > This implementation of a virtio balloon driver uses the page cache to >> > "store" pages that have be

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

2012-06-27 Thread Rusty Russell
On Wed, 27 Jun 2012 00:41:06 +0300, "Michael S. Tsirkin" wrote: > On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > > This implementation of a virtio balloon driver uses the page cache to > > "store" pages that have been released to the host. The communication > > (outside of ta

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

2012-06-27 Thread Amit Shah
On (Tue) 26 Jun 2012 [13:32:58], Frank Swiderski wrote: > This implementation of a virtio balloon driver uses the page cache to > "store" pages that have been released to the host. The communication > (outside of target counts) is one way--the guest notifies the host when > it adds a page to the p

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

2012-06-27 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 04:45:36PM -0700, Frank Swiderski wrote: > On Tue, Jun 26, 2012 at 2:45 PM, Rik van Riel wrote: > > On 06/26/2012 05:31 PM, Frank Swiderski wrote: > >> > >> On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel  wrote: > > > > > >>> The code looks good to me, my only worry is the >

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

2012-06-27 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 04:21:58PM -0700, Frank Swiderski wrote: > On Tue, Jun 26, 2012 at 2:47 PM, Michael S. Tsirkin wrote: > > On Tue, Jun 26, 2012 at 02:31:26PM -0700, Frank Swiderski wrote: > >> On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel wrote: > >> > On 06/26/2012 04:32 PM, Frank Swiders

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

2012-06-26 Thread Frank Swiderski
On Tue, Jun 26, 2012 at 2:45 PM, Rik van Riel wrote: > On 06/26/2012 05:31 PM, Frank Swiderski wrote: >> >> On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel  wrote: > > >>> The code looks good to me, my only worry is the >>> code duplication. We now have 5 balloon drivers, >>> for 4 hypervisors, all

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

2012-06-26 Thread Frank Swiderski
On Tue, Jun 26, 2012 at 2:47 PM, Michael S. Tsirkin wrote: > On Tue, Jun 26, 2012 at 02:31:26PM -0700, Frank Swiderski wrote: >> On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel wrote: >> > On 06/26/2012 04:32 PM, Frank Swiderski wrote: >> >> >> >> This implementation of a virtio balloon driver uses

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

2012-06-26 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 02:31:26PM -0700, Frank Swiderski wrote: > On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel wrote: > > On 06/26/2012 04:32 PM, Frank Swiderski wrote: > >> > >> This implementation of a virtio balloon driver uses the page cache to > >> "store" pages that have been released to t

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

2012-06-26 Thread Rik van Riel
On 06/26/2012 05:31 PM, Frank Swiderski wrote: On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel wrote: The code looks good to me, my only worry is the code duplication. We now have 5 balloon drivers, for 4 hypervisors, all implementing everything from scratch... Do you have any recommendations

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

2012-06-26 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > This implementation of a virtio balloon driver uses the page cache to > "store" pages that have been released to the host. The communication > (outside of target counts) is one way--the guest notifies the host when > it adds a page

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

2012-06-26 Thread Frank Swiderski
On Tue, Jun 26, 2012 at 1:40 PM, Rik van Riel wrote: > On 06/26/2012 04:32 PM, Frank Swiderski wrote: >> >> This implementation of a virtio balloon driver uses the page cache to >> "store" pages that have been released to the host.  The communication >> (outside of target counts) is one way--the g

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

2012-06-26 Thread Rik van Riel
On 06/26/2012 04:32 PM, Frank Swiderski wrote: This implementation of a virtio balloon driver uses the page cache to "store" pages that have been released to the host. The communication (outside of target counts) is one way--the guest notifies the host when it adds a page to the page cache, allo

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

2012-06-26 Thread Frank Swiderski
This implementation of a virtio balloon driver uses the page cache to "store" pages that have been released to the host. The communication (outside of target counts) is one way--the guest notifies the host when it adds a page to the page cache, allowing the host to madvise(2) with MADV_DONTNEED.