Skip to content

Commit 9badc14

Browse files
committed
topology: ignore unreachable nodes for upper limit of candidates' calculation
Now unreachable nodes are not considered when calculating all the subsets for the NUMA nodes combinations for scheduling a domain. Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
1 parent cba91b8 commit 9badc14

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ocaml/xenopsd/lib/topology.ml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,22 @@ module NUMA = struct
181181
None
182182
)
183183
in
184-
let numa_nodes = Array.length d in
184+
let numa_nodes = Seq.length valid_nodes in
185185
let nodes =
186-
if numa_nodes > 16 then
186+
if numa_nodes > 16 then (
187187
(* Avoid generating too many candidates because of the exponential
188188
running time. We could do better here, e.g. by
189189
reducing the matrix *)
190+
D.info
191+
"%s: More than 16 valid NUMA nodes detected, considering only \
192+
individual nodes."
193+
__FUNCTION__ ;
190194
valid_nodes
191195
|> Seq.map (fun i ->
192196
let self = d.(i).(i) in
193197
(distance_to_candidate self, Seq.return i)
194198
)
195-
else
199+
) else
196200
valid_nodes |> seq_all_subsets |> Seq.filter_map (node_distances d)
197201
in
198202
nodes

0 commit comments

Comments
 (0)