From: "Jan Beulich" Subject: Re: [PATCH v3 1/7] xen: vNUMA support for PV guests Date: Tue, 19 Nov 2013 16:43:42 +0000 Message-ID: <528BA34E0200007800104A88@nat28.tlf.novell.com> References: <1384806262-12532-1-git-send-email-ufimtseva@gmail.com> <1384806262-12532-2-git-send-email-ufimtseva@gmail.com> <528B7D350200007800104840@nat28.tlf.novell.com> <1384871712.19880.90.camel@Abyss> <528B885702000078001048CF@nat28.tlf.novell.com> <1384875772.15360.6.camel@Solace> <528B97C502000078001049AE@nat28.tlf.novell.com> <1384878960.15360.27.camel@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VioOx-0000gY-NB for xen-devel@lists.xenproject.org; Tue, 19 Nov 2013 16:43:47 +0000 In-Reply-To: <1384878960.15360.27.camel@Solace> 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: Dario Faggioli Cc: keir@xen.org, Ian.Campbell@citrix.com, lccycc123@gmail.com, george.dunlap@eu.citrix.com, msw@linux.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, Elena Ufimtseva , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 19.11.13 at 17:36, Dario Faggioli wrote: > On mar, 2013-11-19 at 15:54 +0000, Jan Beulich wrote: >> >>> On 19.11.13 at 16:42, Dario Faggioli wrote: >> > So, what would the best option be? Another hypercall (or a special way >> > of calling this one) "just" to retrieve the number of vnodes? >> >> Iirc there's a padding field in the interface structure, which could >> be leveraged. But then again you need two counts, and hence it >> might be better to simply add two respective fields. Then make >> it/them IN/OUT, and rather than filling the arrays when they're >> too small just send back the necessary values. (And of course >> you'll want to also send back the actual values in case the passed >> in ones turned out to large, so the guest would know how many >> of the array elements actually have valid data). >> >> But in the end the fundamental question stands - how was a PV >> guest in your so far proposed model supposed to know its number >> of vNodes? While for HVM guests you can make this available via >> ACPI, that's not an option for PV. >> > Wait... I'm no longer so sure I'm getting what you say. I'd be inclined > to say "by the XENMEM_get_vnuma_info hcall implemented here", but then > again, maybe I'm missing something. > > The hypercall does provide a mean for the guest to retrieve _all_ the > virtual topology information, such as: > - number of virtual nodes > - virtual node memory ranges > - virtual cpu to virtual node mapping > - virtual node to physical node mapping, for use in (future) in-guest > vNUMA aware subsystems (e.g., ballooning) > > So, if your point is (as I thought) that for properly allocating the > buffers for this hypercall to work we need an information only provided > by this hypercall itself, then I agree, and that's why I asked what > alternative way would be best to retrieve that bit of information. > > If it's something else, then I don't know. :-) No, it is what you're naming above. I was merely curious how you had supposed the guest would know the vNode count prior to this change request of mine. I didn't look at the Linux patches yet (due to lack of time), hence I don't know how you derived(?) the node count without it coming back from the hypercall here. Jan