Skip to content

Commit

Permalink
Merge pull request snabbco#1211 from Igalia/affinity-check
Browse files Browse the repository at this point in the history
Fix PCI affinity check for --preferred NUMA binding
  • Loading branch information
wingo authored Mar 5, 2019
2 parents a5ddf2f + 7f2a1d2 commit 9f37939
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/numa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ function check_affinity_for_pci_addresses (addrs)
print('Warning: No NUMA memory affinity.')
print('Pass --cpu to bind to a CPU and its NUMA node.')
end
elseif policy.mode ~= S.c.MPOL_MODE['bind'] then
print("Warning: NUMA memory policy already in effect, but it's not --membind.")
elseif (policy.mode ~= S.c.MPOL_MODE['bind'] and
policy.mode ~= S.c.MPOL_MODE['preferred']) then
print("Warning: NUMA memory policy already in effect, but it's not --membind or --preferred.")
else
local node = S.getcpu().node
local node_for_pci = choose_numa_node_for_pci_addresses(addrs)
Expand Down

0 comments on commit 9f37939

Please sign in to comment.