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 some

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 m...@redhat.com 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

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

2012-09-12 Thread Rusty Russell
Mike Waychison mi...@google.com writes: On Mon, Sep 10, 2012 at 3:59 PM, Michael S. Tsirkin m...@redhat.com 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 m...@redhat.com wrote: On Tue, Jun 26, 2012 at 01:32:58PM

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 to

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 m...@redhat.com 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

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 m...@redhat.com 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

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 r...@redhat.com wrote: On 09/10/2012 01:37 PM, Mike Waychison wrote: On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin m...@redhat.com wrote: Also can you pls answer Avi's question? How is overcommit managed? Overcommit in our deployments

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 m...@redhat.com 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

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 m...@redhat.com 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 m...@redhat.com 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 m...@redhat.com 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 m...@redhat.com wrote: On Tue,

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

2012-09-05 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com 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

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

2012-09-03 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_

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-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-num_pfns

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 f...@google.com wrote: On Tue, Jun 26, 2012 at 2:47 PM, Michael S. Tsirkin m...@redhat.com 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

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 m...@redhat.com 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 r...@redhat.com wrote: On 06/26/2012

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 r...@redhat.com wrote: On 06/26/2012 05:31 PM, Frank Swiderski wrote: On Tue, Jun 26, 2012 at 1:40 PM, Rik van Rielr...@redhat.com  wrote: The code looks good to me, my only

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 page

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 m...@redhat.com 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

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 ru...@rustcorp.com.au wrote: On Wed, 27 Jun 2012 00:41:06 +0300, Michael S. Tsirkin m...@redhat.com 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

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 ru...@rustcorp.com.au wrote: On Wed, 27 Jun 2012 00:41:06 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote:

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 m...@redhat.com 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 ru...@rustcorp.com.au wrote: On Wed, 27 Jun 2012 00:41:06 +0300, Michael S. Tsirkin m...@redhat.com

[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.

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,

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 r...@redhat.com 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

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 to

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 Rielr...@redhat.com 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

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 r...@redhat.com 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

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 m...@redhat.com 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 r...@redhat.com wrote: On 06/26/2012 04:32 PM, Frank Swiderski wrote: This implementation of a virtio

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 r...@redhat.com wrote: On 06/26/2012 05:31 PM, Frank Swiderski wrote: On Tue, Jun 26, 2012 at 1:40 PM, Rik van Rielr...@redhat.com  wrote: The code looks good to me, my only worry is the code duplication. We now have 5 balloon drivers, for 4