All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: Ky Srinivasan <KSrinivasan@novell.com>,
	xen-devel@lists.xensource.com,
	Masaki Kanno <kanno.masaki@jp.fujitsu.com>,
	Kurt Garloff <garloff@suse.de>
Subject: Re: [PATCH] Prevent changing a memory size of	Domain-0 evenif users make a careless mistake
Date: Fri, 04 Apr 2008 08:06:49 -0700	[thread overview]
Message-ID: <47F64409.7090202@goop.org> (raw)
In-Reply-To: <47F61CFA.76E4.0078.0@novell.com>

Jan Beulich wrote:
>>>> Masaki Kanno <kanno.masaki@jp.fujitsu.com> 04.04.08 12:06 >>>
>>>>         
>> If users accidentally change a memory size of Domain-0 to very small 
>> memory size by xm mem-set command, users will be not able to operate 
>> Domain-0.  I think that Domain-0 is important for Xen, so I'd like to 
>> prevent the accident by xm mem-set command. 
>>     
>
> Each domain, in my opinion, should also be able to protect itself from
> being ballooned down too much. We have been carrying a respective
> patch for quite a while. Since originally it wasn't written by me, I never
> tried to push it. Nevertheless, I'm showing it below to see whether
> others would think it makes sense.
>
> Jan
>
> From: ksrinivasan@novell.com 
> Subject: Don't allow ballooning down a domain below a reasonable limit.
> References: 172482
>
> Reasonable is hard to judge; we don't want to disallow small domains.
> But the system needs a reasonable amount of memory to perform its
> duties, set up tables, etc. If on the other hand, the admin is able
> to set up and boot up correctly a very small domain, there's no point
> in forcing it to be larger.
> We end up with some kind of logarithmic function, approximated.
>   

Hm, I've been bitten by this myself quite a lot lately, so I'm 
sympathetic to a patch like this.  In the 2.6 pvops balloon driver, I'm 
using hotplug memory to extend the page structures, rather than relying 
on statically preallocating them at boot.  This means that max_pfn isn't 
terribly meaningful, since there's no fixed upper limit.

I was thinking along the lines of having the balloon thread pay 
attention to how much free (lowmem) memory is actually available, and 
stop processing if it drops below some threshold.  That gives the VM 
some time to deal with the memory pressure (swap things out, etc), 
without making things OOM-killer critical.  And if the VM can't free up 
any more memory, then we can't force it beyond that.   The processing 
rate could be proportional to the amount of free memory rather than a 
hard go/no-go switch to make things a bit smoother.

    J

      parent reply	other threads:[~2008-04-04 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 10:06 [PATCH] Prevent changing a memory size of Domain-0 even if users make a careless mistake Masaki Kanno
2008-04-04 10:13 ` Keir Fraser
2008-04-04 11:12   ` [PATCH] Prevent changing a memory size ofDomain-0 " Masaki Kanno
2008-04-05 18:36   ` [PATCH] Prevent changing a memory size of Domain-0 " Mark Williamson
2008-04-07  0:38     ` [PATCH] Prevent changing a memory size of Domain-0even " Masaki Kanno
2008-04-07  0:56       ` Mark Williamson
2008-04-07  2:54         ` Masaki Kanno
2008-04-04 10:20 ` [PATCH] Prevent changing a memory size of Domain-0 evenif " Jan Beulich
2008-04-04 10:27   ` Keir Fraser
2008-04-04 10:50     ` [PATCH] Prevent changing a memory size ofDomain-0 " Jan Beulich
2008-04-04 10:51       ` Keir Fraser
2008-04-05 18:45     ` [PATCH] Prevent changing a memory size of Domain-0 " Mark Williamson
2008-04-04 11:58   ` John Levon
2008-04-04 15:06   ` Jeremy Fitzhardinge [this message]

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=47F64409.7090202@goop.org \
    --to=jeremy@goop.org \
    --cc=KSrinivasan@novell.com \
    --cc=garloff@suse.de \
    --cc=jbeulich@novell.com \
    --cc=kanno.masaki@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.