From: "Jan Beulich" Subject: Re: [PATCH v2 12/19] hvmloader: retrieve vNUMA information from hypervisor Date: Wed, 10 Dec 2014 08:19:29 +0000 Message-ID: <54881021020000780004E6D3@mail.emea.novell.com> References: <1417448023-27311-1-git-send-email-wei.liu2@citrix.com> <1417448023-27311-13-git-send-email-wei.liu2@citrix.com> <5487356E020000780004E362@mail.emea.novell.com> <20141209175242.GF25749@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20141209175242.GF25749@zion.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: ian.campbell@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, ufimtseva@gmail.com, boris.ostrovsky@oracle.com List-Id: xen-devel@lists.xenproject.org >>> On 09.12.14 at 18:52, wrote: > On Tue, Dec 09, 2014 at 04:46:22PM +0000, Jan Beulich wrote: >> >>> On 01.12.14 at 16:33, wrote: >> > + */ >> > + >> > +#ifndef __HVMLOADER_VNUMA_H__ >> > +#define __HVMLOADER_VNUMA_H__ >> > + >> > +#include >> > + >> > +#define MAX_VNODES 64 >> > +#define MAX_VDISTANCE (MAX_VNODES * MAX_VNODES) >> > +#define MAX_VMEMRANGES (MAX_VNODES * 2) >> >> These look arbitrary - please add a (brief) comment giving some >> rationale so that people needing to change them know eventual >> consequences. Would it perhaps make sense to derive >> MAX_VNODES from HVM_MAX_VCPUS? Additionally I think the > > I don't think these two have very strong connection though. > > And I remember you saying HVM_MAX_VCPUS will be removed. Removed? I recall myself saying increased... >> code wouldn't become much more difficult if you didn't build in >> static upper limits. >> > > Yes I can make two hypercalls. First one to retrieve the number of nodes > / vmemranges configured, allocate memory then fill in those arrays with > second hypercall. That'd be great, as it would eliminate the point above at once. Jan