From 7f2a1d25bb257999efb03c3ef248ad5e0e2d11d9 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 5 Mar 2019 12:35:39 +0000 Subject: [PATCH] Fix PCI affinity check for --preferred NUMA binding --- src/lib/numa.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/numa.lua b/src/lib/numa.lua index a600db7033..cd86b6ce77 100644 --- a/src/lib/numa.lua +++ b/src/lib/numa.lua @@ -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)