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] Question about memory allocation on NUMA node.

To: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Question about memory allocation on NUMA node.
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Fri, 17 Oct 2008 14:10:49 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 17 Oct 2008 05:13:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081017192639.D25E.SHIMADA-YXB@xxxxxxxxxxxxxxx>
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: AMD
References: <20081017192639.D25E.SHIMADA-YXB@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Yuji,

> I have a question about memory allocation on NUMA node for Xen
> Hypervisor.
> 
> I think that the memory relating guest domain should be allocated from
> the NUMA node on which the guest run.
> Because the latency of the same NUMA node is better than that of a
> different one.
> 
> According to this idea, most of the codes are good in xen-unstable.
> But some memory relating guest domain are allocated from the NUMA node
> on which CPU #0 run.
No, it will default to the node on which the domain runs, see below.
> 
> For example,
>     - xen/arch/x86/domain.c
>         setup_compat_l4(struct vcpu *v)
>           struct page_info *pg = alloc_domheap_page(NULL, 0);
0 for memflags means default behaviour, if you look at the
implementation of alloc_domheap_pages
(http://lxr.xensource.com/lxr/source/xen/common/page_alloc.c?a=x86_64#L774)
a value of zero will evalutate to node=NUMA_NO_NODE, which in turn
will be replaced by 'node = domain_to_node(d);', which is what you
wanted to insert below. So I see no problem here.

Regards,
Andre.

> 
> I think this memory should be allocated from the NUMA node on which
> the guest run.
> 
> For example, 
>     - xen/arch/x86/domain.c at
>         setup_compat_l4(struct vcpu *v)
>           struct page_info *pg = alloc_domheap_page(NULL,
>                                  MEMF_node(domain_to_node(v->domain)));
> 
> As a result, machine performance becomes better.
> 
> What do you think about this idea? 
> I'd like some comments.
> 
> If the developers agree with me, I would like to list them and submit
> patch.
> 
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


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