From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0 Date: Tue, 23 Aug 2011 13:03:10 +0100 Message-ID: References: <4E5391E00200007800052B9A@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4E5391E00200007800052B9A@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , David Vrabel Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 23/08/2011 10:41, "Jan Beulich" wrote: >>> Besides that the assignment needs to be saturating, as struct domain's >>> max_pages member is only "unsigned int", whereas the local variables >>> are all "unsigned long". So in the end this should really be an equivalent >>> of >>> >>> d->max_pages = min(max_pages, UINT_MAX); >> >> We should make d->max_pages a ulong or u64. > > I'd rather not, as for now there's no good reason for this to be a > 64-bit variable (as we can't get even close to the 16Tb it would > take to overflow this). But then again I expect you to say that > the few extra REX prefixes don't matter all that much... Ha, you'd be right! :-) I'll leave it to David to champion his patch. I'll note I added it for 4.1.2 as well, if we decide there is a better way we will need to change it there in advance of that release, and preferably -rc1 as well. -- Keir