From: "Jan Beulich" Subject: Re: [PATCH 3/5] x86: widen NUMA nodes to be allocated from Date: Fri, 27 Feb 2015 13:36:32 +0000 Message-ID: <54F080F002000078000649C9@mail.emea.novell.com> References: <54EF315902000078000640FF@mail.emea.novell.com> <54EF33A60200007800064144@mail.emea.novell.com> <1425043639.10194.67.camel@citrix.com> 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 1YRL5m-00018S-LM for xen-devel@lists.xenproject.org; Fri, 27 Feb 2015 13:36:34 +0000 In-Reply-To: <1425043639.10194.67.camel@citrix.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: Dario Faggioli Cc: "Keir (Xen.org)" , Ian Campbell , AndrewCooper , Julien Grall , Stefano Stabellini , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org >>> On 27.02.15 at 14:27, wrote: > One question (a genuine one, i.e., I'm really not sure what I'm saying > is correct). > > After this series, vcpu_to_node() (defined in xen/include/xen/numa.h) is > left with only one use, in xen/arch/arm/domain.c, besides of course > being used to implement domain_to_node() (still in > xen/include/xen/numa.h). > > So, provided ARM people (and I'm Cc-ing them) can get rid of that, can > that macro be removed all together, and domain_to_node(d) be defined > after d->node_affinity... something like: > > #define domain_to_node(d) \ > ( nodes_equal(d->node_affinity, NODE_MASK_ALL) \ > ? NUMA_NO_NODE : first_node(d->node_affinity) ) > > I'm asking because I really don't like vcpu_to_node(). And I'm not > talking about how it is implemented (there probably are not much > alternatives), I'm saying I don't think it should exist, and I really > would see value in killing it. :-) I'm all for killing it. In fact I'd also like to see domain_to_node() go away, as it's similarly bogus (no matter of the proposed changed implementation) - neither a vCPU nor a domain have a "focus" node or some such (some may happen to if their node mask has just a single set bit, but that's nothing code should depend on). (And btw, at the very least first_node() in your proposal should become any_node().) Jan