virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: dor.laor@qumranet.com
Cc: Marcelo Tosatti <marcelo@kvack.org>,
	virtualization@lists.linux-foundation.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	schwidefsky@de.ibm.com,
	kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH] KVM simplified virtio balloon driver
Date: Thu, 17 Jan 2008 07:56:21 -0600	[thread overview]
Message-ID: <478F5E85.9020009@us.ibm.com> (raw)
In-Reply-To: <1200570025.26281.141.camel@localhost.localdomain>

Dor Laor wrote:
> On Thu, 2008-01-17 at 11:25 +0100, Martin Schwidefsky wrote:
>   
>>> Another idea: Martin added an oom notifier to the cmm driver. Before the 
>>> oom-killer kicks in cmm will try to free 256 pages. I think your virtio 
>>> balloon driver should do the same - it seems to be the correct tradeoff. 
>>>       
>> Nod, you definitly want to add an oom notifier. If 256 pages is the
>> correct number of pages to free is debatable. We have seen long delays
>> for a process that quickly eats up memory if there are lots of pages in
>> the balloon. The problem is that the memory management tries hard to
>> find memory until it decides to oom kill a process, only to be stopped
>> in the last second by the oom notifier. The 1MB is quickly eaten up
>> again so the whole things starts again. The profile of such a scenario
>> shows that almost all cpu is burned in the page reclaim code.
>>
>>     
>
> Seconded, in that case we can add a config space notification from the
> guest to the host that will be triggered by the oom.
> The host will get this notification and will decide whether to allow the
> guest to deflate the balloon or to keep the current balloon size because
> the whole host is over committed.
>   

The host doesn't decide whether to allow the guest to deflate.  Virtual 
memory size and resident memory side are independent in KVM.  The host 
decides what the RSS is but the guest is free to determine it's VSS.  
The host provides hints to the guest about it's RSS size (via 
ballooning) so the guest can optimize it's VSS size.  If guest chooses 
to make it's VSS size to large, it will only hurt itself (by being 
forced to swap by the host).

Regards,

Anthony Liguori

> Regards,
> Dor.
>
>   

  parent reply	other threads:[~2008-01-17 13:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-14 20:03 [PATCH] KVM virtio balloon driver Marcelo Tosatti
2008-01-14 21:29 ` Anthony Liguori
2008-01-15 14:22   ` Marcelo Tosatti
2008-01-14 23:32 ` Rusty Russell
2008-01-15 19:01   ` Marcelo Tosatti
2008-01-16 23:12     ` Dor Laor
     [not found]     ` <1200525166.26281.103.camel@localhost.localdomain>
2008-01-17  1:45       ` [PATCH] KVM simplified " Rusty Russell
     [not found]       ` <200801171245.59510.rusty@rustcorp.com.au>
2008-01-17  2:14         ` [kvm-devel] " Anthony Liguori
     [not found]         ` <478EBA22.30301@codemonkey.ws>
2008-01-17  3:29           ` Rusty Russell
     [not found]           ` <200801171429.32888.rusty@rustcorp.com.au>
2008-01-17  4:01             ` Anthony Liguori
     [not found]             ` <478ED32A.1060803@codemonkey.ws>
2008-01-17  5:59               ` Rusty Russell
2008-01-19  7:05               ` Avi Kivity
2008-01-17  9:32         ` Christian Borntraeger
     [not found]         ` <200801171032.26198.borntraeger@de.ibm.com>
2008-01-17 10:25           ` Martin Schwidefsky
     [not found]           ` <1200565558.22385.13.camel@localhost>
2008-01-17 11:40             ` Dor Laor
     [not found]             ` <1200570025.26281.141.camel@localhost.localdomain>
2008-01-17 13:56               ` Anthony Liguori [this message]
2008-01-17 23:01                 ` Dor Laor
     [not found]                 ` <1200610891.26281.171.camel@localhost.localdomain>
2008-01-17 23:35                   ` Anthony Liguori
2008-01-19  7:02         ` [kvm-devel] " Avi Kivity
2008-01-19 22:37           ` Anthony Liguori
2008-01-19 22:37           ` Anthony Liguori
     [not found]           ` <47927BB7.7060805@codemonkey.ws>
2008-01-20  0:24             ` Marcelo Tosatti
     [not found]             ` <20080120002433.GA6880@dmt>
2008-01-20  0:40               ` Anthony Liguori
     [not found]               ` <47929884.2010908@codemonkey.ws>
2008-01-24  1:58                 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=478F5E85.9020009@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=dor.laor@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=marcelo@kvack.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).