From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [RFC][PATCH] domheap optimization for NUMA Date: Wed, 02 Apr 2008 14:27:55 +0100 Message-ID: References: <20080402130604.GH27634@edwin-srv.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080402130604.GH27634@edwin-srv.sh.intel.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: "Zhai, Edwin" Cc: ryanh@us.ibm.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 2/4/08 14:06, "Zhai, Edwin" wrote: > The issue is alloc_domheap_pages take domain* as parameter to indicate if need > account pages for the domain, sometimes it's NULL. In this case, we can't > deduct > the node from domain. I believe it's why use cpu here as getting cpuid is > easier. Yes, but it's a bad interface, particularlty when the function is called alloc_domheap_pages_on_node(). Pass in a nodeid. Write a helper function to work out the nodeid from the domain*. > Another option, always use domain* to locate node(not allowed NULL) and add a > new flag _MEMF_assign to indicate the assignment, which changes the interface > and is invasive. Yes, that's a bad idea. -- Keir