From: "Jan Beulich" Subject: Re: [PATCH v3 1/7] xen: vNUMA support for PV guests Date: Tue, 19 Nov 2013 14:48:39 +0000 Message-ID: <528B885702000078001048CF@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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vimbc-0003fL-9C for xen-devel@lists.xenproject.org; Tue, 19 Nov 2013 14:48:44 +0000 In-Reply-To: <1384871712.19880.90.camel@Abyss> 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 15:35, Dario Faggioli wrote: > On mar, 2013-11-19 at 14:01 +0000, Jan Beulich wrote: >> One thing that I only realized - what information is the guest >> supposed to use to know the number of virtual nodes it has >> (needed to size the arrays the handles here point to)? >> > If I understand correctly what you're asking, the (current) answer is in > the Linux patch, here: > > > http://bugs.xenproject.org/xen/mid/%3C1384811922-14642-2-git-send-email-ufimt > seva@gmail.com%3E > > which uses num_possible_cpus() > > http://lxr.linux.no/linux+v3.12/+code=num_possible_cpus > > to size all the three arrays. But what guarantees num_possible_cpus() to be larger than some hypervisor internal variables that the domain has no knowledge about? Just consider a guest with a Linux configured for just 4 CPUs and 2 nodes, but having a config file specifying 16 vCPU-s on 4 virtual nodes? Jan