Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Luiz Capitulino
On Mon, 13 May 2013 22:02:50 +0300 "Michael S. Tsirkin" wrote: > On Mon, May 13, 2013 at 02:25:11PM -0400, Luiz Capitulino wrote: > > On Mon, 13 May 2013 11:34:41 -0300 > > Rafael Aquini wrote: > > > > > You're right, and the host's member is used to communicate the configured > > > size > > >

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Michael S. Tsirkin
On Mon, May 13, 2013 at 03:10:19PM -0400, Rik van Riel wrote: > On 05/13/2013 11:35 AM, Michael S. Tsirkin wrote: > >On Mon, May 13, 2013 at 11:22:58AM -0400, Rik van Riel wrote: > > >>I believe the Google patches still included some way for the > >>host to initiate balloon inflation on the guest

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Rik van Riel
On 05/13/2013 11:35 AM, Michael S. Tsirkin wrote: On Mon, May 13, 2013 at 11:22:58AM -0400, Rik van Riel wrote: I believe the Google patches still included some way for the host to initiate balloon inflation on the guest side, because the guest internal state alone is not enough to see when th

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Michael S. Tsirkin
On Mon, May 13, 2013 at 02:25:11PM -0400, Luiz Capitulino wrote: > On Mon, 13 May 2013 11:34:41 -0300 > Rafael Aquini wrote: > > > You're right, and the host's member is used to communicate the configured > > size > > to guest's balloon device, however, by not changing it when the shrinker > >

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Luiz Capitulino
On Mon, 13 May 2013 11:34:41 -0300 Rafael Aquini wrote: > You're right, and the host's member is used to communicate the configured size > to guest's balloon device, however, by not changing it when the shrinker > causes > the balloon to deflate will make the balloon thread to be woken up again

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Michael S. Tsirkin
On Mon, May 13, 2013 at 11:22:58AM -0400, Rik van Riel wrote: > On 05/13/2013 11:16 AM, Michael S. Tsirkin wrote: > > >However, there's a big question mark: host specifies > >inflate, guest says deflate, who wins? > > If we're dealing with a NUMA guest, they could both win :) > > The host could

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Rik van Riel
On 05/13/2013 11:16 AM, Michael S. Tsirkin wrote: However, there's a big question mark: host specifies inflate, guest says deflate, who wins? If we're dealing with a NUMA guest, they could both win :) The host could see reduced memory use of the guest in one place, while the guest could see i

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Michael S. Tsirkin
On Mon, May 13, 2013 at 11:03:03AM -0400, Luiz Capitulino wrote: > On Sun, 12 May 2013 21:49:34 +0300 > "Michael S. Tsirkin" wrote: > > > On Sun, May 12, 2013 at 12:36:09PM -0400, Rik van Riel wrote: > > > On 05/12/2013 10:30 AM, Michael S. Tsirkin wrote: > > > >On Thu, May 09, 2013 at 10:53:49AM

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Luiz Capitulino
On Sun, 12 May 2013 21:49:34 +0300 "Michael S. Tsirkin" wrote: > On Sun, May 12, 2013 at 12:36:09PM -0400, Rik van Riel wrote: > > On 05/12/2013 10:30 AM, Michael S. Tsirkin wrote: > > >On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > > >>Automatic ballooning consists of dynamic

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Rafael Aquini
On Fri, May 10, 2013 at 09:20:46AM -0400, Luiz Capitulino wrote: > On Thu, 9 May 2013 18:15:19 -0300 > Rafael Aquini wrote: > > > Since your shrinker > > doesn't change the balloon target size, > > Which target size are you referring to? The one in the host (member num_pages > of VirtIOBalloon i

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-12 Thread Michael S. Tsirkin
On Sun, May 12, 2013 at 12:36:09PM -0400, Rik van Riel wrote: > On 05/12/2013 10:30 AM, Michael S. Tsirkin wrote: > >On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > >>Automatic ballooning consists of dynamically adjusting the guest's > >>balloon according to memory pressure in th

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-12 Thread Rik van Riel
On 05/12/2013 10:30 AM, Michael S. Tsirkin wrote: On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: Automatic ballooning consists of dynamically adjusting the guest's balloon according to memory pressure in the host and in the guest. This commit implements the guest side of autom

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-12 Thread Michael S. Tsirkin
On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > Automatic ballooning consists of dynamically adjusting the guest's > balloon according to memory pressure in the host and in the guest. > > This commit implements the guest side of automatic balloning, which > basically consists of

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-10 Thread Luiz Capitulino
On Fri, 10 May 2013 09:20:46 -0400 Luiz Capitulino wrote: > On Thu, 9 May 2013 18:15:19 -0300 > Rafael Aquini wrote: > > > On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > > > Automatic ballooning consists of dynamically adjusting the guest's > > > balloon according to memory

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 18:15:19 -0300 Rafael Aquini wrote: > On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > > Automatic ballooning consists of dynamically adjusting the guest's > > balloon according to memory pressure in the host and in the guest. > > > > This commit implements t

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-09 Thread Rafael Aquini
On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > Automatic ballooning consists of dynamically adjusting the guest's > balloon according to memory pressure in the host and in the guest. > > This commit implements the guest side of automatic balloning, which > basically consists of

[RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-09 Thread Luiz Capitulino
Automatic ballooning consists of dynamically adjusting the guest's balloon according to memory pressure in the host and in the guest. This commit implements the guest side of automatic balloning, which basically consists of registering a shrinker callback with the kernel, which will try to deflate