Hi Jan, > -----Original Message----- > From: Jan Beulich <jbeul...@suse.com> > Subject: Re: [PATCH v3 03/17] xen/arm: implement node distance helpers for > Arm > > > Thanks for the explanation! I think I now understand :) Would this diff > below > > look good to you then? Appreciate your patience. > > Looks largely okay, but possibly one part can now be omitted (see below). > > > unsigned char __node_distance(nodeid_t from, nodeid_t to) > > { > > - /* When NUMA is off, any distance will be treated as remote. */ > > + if ( from == to ) > > + return NUMA_LOCAL_DISTANCE; > > + > > + /* When NUMA is off, any distance will be treated as unreachable > > (0xFF). > */ > > Please avoid mentioning the actual value of 0xFF: This serves no real > purpose (afaict) and is liable to go stale at some point.
Good point, I will drop the 0xFF. > > > if ( numa_disabled() ) > > - return NUMA_REMOTE_DISTANCE; > > + return NUMA_NO_DISTANCE; > > With the code below this is now only an optimization. Might be worth > saying so in the comment (assuming having this optimization is deemed > worth it). Sounds good, if you think below comment makes sense to you, I will add: "When NUMA is disabled, the node distance should always be NUMA_NO_DISTANCE, directly return here as an optimization." Kind regards, Henry > > Jan