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

[Xen-devel] Re: [PATCH] x86/numa: fix c/s 20120 (Fix SRAT check for disc

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] x86/numa: fix c/s 20120 (Fix SRAT check for discontig memory)
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Fri, 28 Aug 2009 08:54:53 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 28 Aug 2009 07:55:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A97CD2D0200007800012161@xxxxxxxxxxxxxxxxxx>
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>
Organization: HP OSLO R&D
References: <4A97CD2D0200007800012161@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2009-08-28 at 11:27 +0100, Jan Beulich wrote:
> That change converted the (wrong) assumption of contiguous nodes'
> memory to a similarly wrong one of assuming discontiguous memory (i.e.
> each node having separate E820 table entries). The code ought to be
> able to deal with both, though, and I hope this change makes it so.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Works for me.

Acked-by: Alex Williamson <alex.williamson@xxxxxx>

> --- 2009-08-24.orig/xen/arch/x86/srat.c       2009-08-28 00:00:00.000000000 
> +0200
> +++ 2009-08-24/xen/arch/x86/srat.c    2009-08-28 12:12:40.000000000 +0200
> @@ -249,15 +249,23 @@ static int nodes_cover_memory(void)
>               start = e820.map[i].addr;
>               end = e820.map[i].addr + e820.map[i].size - 1;
>  
> -             found = 0;
> -             for_each_node_mask(j, nodes_parsed) {
> -                     if (start >= nodes[j].start && end <= nodes[j].end) {
> -                             found = 1;
> -                             break;
> -                     }
> -             }
> +             do {
> +                     found = 0;
> +                     for_each_node_mask(j, nodes_parsed)
> +                             if (start < nodes[j].end
> +                                 && end > nodes[j].start) {
> +                                     if (start >= nodes[j].start) {
> +                                             start = nodes[j].end;
> +                                             found = 1;
> +                                     }
> +                                     if (end <= nodes[j].end) {
> +                                             end = nodes[j].start;
> +                                             found = 1;
> +                                     }
> +                             }
> +             } while (found && start < end);
>  
> -             if (!found) {
> +             if (start < end) {
>                       printk(KERN_ERR "SRAT: No PXM for e820 range: "
>                               "%016Lx - %016Lx\n", start, end);
>                       return 0;
> 
> 
> 



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

<Prev in Thread] Current Thread [Next in Thread>