WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] x86: use 'dom0_mem' to limit the number of pages

To: Jan Beulich <JBeulich@xxxxxxxxxx>, David Vrabel <david.vrabel@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Tue, 23 Aug 2011 13:03:10 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 23 Aug 2011 05:04:09 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=F35TJojigHGC5KwCUeDWf0GqMEQCcj9Ip/NqaEySY1g=; b=JvlPlaIBAJAf5TF9F5GC3pR34z3H/daBBR7V8NAD8TM5FeODrBoqOFCKMm+alh6uNj r2BECWy2aaP84mKSIEmI8R+co7cdvr/yL2PkUa2o0FC521+SwlACsa7gog0sF4yCweKk dMnOpac6a6UqufNP0fkNthXIG9jkzDVH65N4g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E5391E00200007800052B9A@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxhjKBS7yeex6Kb306MjG5bh+rnkQ==
Thread-topic: [Xen-devel] [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0
User-agent: Microsoft-Entourage/12.30.0.110427
On 23/08/2011 10:41, "Jan Beulich" <JBeulich@xxxxxxxxxx> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel