Skip to content

Commit

Permalink
topology: ignore unreachable nodes for upper limit of candidates' cal…
Browse files Browse the repository at this point in the history
…culation

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 <[email protected]>
  • Loading branch information
psafont committed Feb 3, 2025
1 parent cba91b8 commit 9badc14
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ocaml/xenopsd/lib/topology.ml
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,22 @@ module NUMA = struct
None
)
in
let numa_nodes = Array.length d in
let numa_nodes = Seq.length valid_nodes in
let nodes =
if numa_nodes > 16 then
if numa_nodes > 16 then (
(* Avoid generating too many candidates because of the exponential
running time. We could do better here, e.g. by
reducing the matrix *)
D.info
"%s: More than 16 valid NUMA nodes detected, considering only \
individual nodes."
__FUNCTION__ ;
valid_nodes
|> Seq.map (fun i ->
let self = d.(i).(i) in
(distance_to_candidate self, Seq.return i)
)
else
) else
valid_nodes |> seq_all_subsets |> Seq.filter_map (node_distances d)
in
nodes
Expand Down

0 comments on commit 9badc14

Please sign in to comment.