Skip to content

Commit

Permalink
lib.numa: do NUMA migrations only for >1 node systems
Browse files Browse the repository at this point in the history
This works around an issue in lwaftr where workers hang on
NUMA migrations.

Possibly, this only fixes the issue on flat NUMA systems.

See 89c48fc
  • Loading branch information
eugeneia committed Jun 21, 2022
1 parent ee2a703 commit 3d8ddcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/numa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function bind_to_cpu (cpu, skip_perf_checks)
end

function unbind_numa_node ()
if supports_numa() then
if has_numa() then
assert(S.set_mempolicy('default'))
end
bound_numa_node = nil
Expand All @@ -227,7 +227,7 @@ function bind_to_numa_node (node, policy)
if not node then return unbind_numa_node() end
assert(not bound_numa_node, "already bound")

if supports_numa() then
if has_numa() then
assert(S.set_mempolicy(policy or 'preferred', node))

-- Migrate any pages that might have the wrong affinity.
Expand Down

0 comments on commit 3d8ddcc

Please sign in to comment.