From: "Zhai, Edwin" Subject: Re: [RFC][PATCH] domheap optimization for NUMA Date: Wed, 2 Apr 2008 21:06:04 +0800 Message-ID: <20080402130604.GH27634@edwin-srv.sh.intel.com> References: <20080331104015.GM18363@edwin-srv.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: ryanh@us.ibm.com, xen-devel@lists.xensource.com, "Zhai, Edwin" List-Id: xen-devel@lists.xenproject.org On Mon, Mar 31, 2008 at 11:47:36AM +0100, Keir Fraser wrote: > On 31/3/08 11:40, "Zhai, Edwin" wrote: > > > A new interface alloc_domheap_pages_on_node is introduced instead of changing > > current implementation, which is invasive. > > > > There are still many places left for the new interface, but we can change them > > in a incremental way if needed. > > A function called alloc_domheap_pages_on_node() should take a *node* > argument not a vcpu. Perhaps have a helper domain_default_node() which > returns node for d->vcpu[0] if d->vcpu[0] is non-NULL, else returns some > value meaning 'any'. > > This will probably require some changes to page_alloc.c. That file currently > likes to pass cpu ids around rather than node ids, but it would really be > cleaner to pass around the latter. 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. 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. > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > -- best rgds, edwin