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] Fix domheap structure allocation when NUMA=on

To: "Xiaowei Yang" <xiaowei.yang@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix domheap structure allocation when NUMA=on
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 20 Mar 2009 08:47:50 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 20 Mar 2009 01:48:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49C35517.7040706@xxxxxxxxx>
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>
References: <49C32413.2030505@xxxxxxxxx> <49C35EA9.76E4.0078.0@xxxxxxxxxx> <49C35517.7040706@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx> 20.03.09 09:34 >>>
>Jan Beulich wrote:
>>>>> "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx> 20.03.09 06:05 >>>
>>> DIRECTMAP_VIRT_END can't be passed to virt_to_mfn(), as it's just beyond 
>>> direct map boundary and triggers ASSERT very early at boot time.
>> 
>> While I agree to the analysis, I would think that this
>> 
>> +              mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END - PAGE_SIZE) )
>> 
>> should rather be
>> 
>> +              mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END - 1) + 1 )
>> 
>virt_to_mfn(DIRECTMAP_VIRT_END - 1) is equal to 

Depending on whether DIRECTMAP_VIRT_END is the last byte or the first
following byte. Using "- 1" avoids such a dependency.

>virt_to_mfn(DIRECTMAP_VIRT_END - PAGE_SIZE). Why +1? We use '<=' here.

Because on the left side of the comparison we also calculate the first
following mfn, not the last included one.

Jan


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