Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ocaml/xenopsd/lib/xenops_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3556,9 +3556,9 @@ module VIF = struct
()
end

let default_numa_affinity_policy = ref Xenops_interface.Host.Any
let default_numa_affinity_policy = ref Xenops_interface.Host.Best_effort

let numa_placement = ref Xenops_interface.Host.Any
let numa_placement = ref !default_numa_affinity_policy

let string_of_numa_affinity_policy =
Xenops_interface.Host.(function Any -> "any" | Best_effort -> "best-effort")
Expand Down
9 changes: 5 additions & 4 deletions ocaml/xenopsd/lib/xenopsd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ let feature_flags_path = ref "/etc/xenserver/features.d"

let pvinpvh_xen_cmdline = ref "pv-shim console=xen"

let numa_placement_compat = ref false

(* O(N^2) operations, until we get a xenstore cache, so use a small number here *)
let vm_guest_agent_xenstore_quota = ref 128

Expand Down Expand Up @@ -242,8 +240,11 @@ let options =
, "Command line for the inner-xen for PV-in-PVH guests"
)
; ( "numa-placement"
, Arg.Bool (fun x -> numa_placement_compat := x)
, (fun () -> string_of_bool !numa_placement_compat)
, Arg.Bool (fun _ -> ())
, (fun () ->
string_of_bool
(!Xenops_server.default_numa_affinity_policy = Best_effort)
)
, "NUMA-aware placement of VMs (deprecated, use XAPI setting)"
)
; ( "pci-quarantine"
Expand Down
2 changes: 0 additions & 2 deletions ocaml/xenopsd/xc/xenops_server_xen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5294,8 +5294,6 @@ let init () =
{Xs_protocol.ACL.owner= 0; other= Xs_protocol.ACL.READ; acl= []}
) ;
Device.Backend.init () ;
Xenops_server.default_numa_affinity_policy :=
if !Xenopsd.numa_placement_compat then Best_effort else Any ;
info "Default NUMA affinity policy is '%s'"
Xenops_server.(string_of_numa_affinity_policy !default_numa_affinity_policy) ;
Xenops_server.numa_placement := !Xenops_server.default_numa_affinity_policy ;
Expand Down
Loading