From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Re: [Xen-users] [XCP]: RC1 of XCP 0.5 available for testing Date: Tue, 15 Jun 2010 11:18:35 +0100 Message-ID: References: <1276525334.4626.11.camel@home.desunote.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1276525334.4626.11.camel@home.desunote.ru> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Shuklin , Dave Scott Cc: "'xen-devel@lists.xensource.com'" , "'xen-users@lists.xensource.com'" List-Id: xen-devel@lists.xenproject.org On 14/06/2010 15:22, "George Shuklin" wrote: > static unsigned long minimum_target(void) > ... > if (max_pfn < MB2PAGES(128)) > min_pages = MB2PAGES(8) + (max_pfn >> 1); > else if (max_pfn < MB2PAGES(512)) > min_pages = MB2PAGES(40) + (max_pfn >> 2); > else if (max_pfn < MB2PAGES(2048)) > min_pages = MB2PAGES(104) + (max_pfn >> 3); > else > min_pages = MB2PAGES(296) + (max_pfn >> 5); > ... > > I think, those numbers are unreasonable (especially around 2Gb limit). I never thought putting policy like that in the kernel driver was a good idea. Its intention is to stop stupid users echoing unrealistic targets into /proc/xen/balloon. Possibly these checks could be removed, made configurable on the kernel command line, or only applied to target changes via /proc, leaving updates via xenstore unchecked. There's a whole very unproductive argument around this as to whether policy belongs in a kernel (hard to change, but maybe knows more about the VM), versus in a higher-level toolstack (easier to change, maybe knows less about the VM); safety vs flexibility; blah blah blah. -- Keir