Files
Strata/engine/tests/platform
Niko1221 87c9821bb1 HIP Linux: keep the kernel's NUMA balancing off the engine's memory (#4866, from PR #4867)
With kernel.numa_balancing=1 the NUMA scanner marks the PTEs of the expert arena (registered with hipHostRegister, a KFD userptr range) PROT_NONE
to sample which node touches it; each change invalidates the range and KFD evicts all of the process's GPU queues until it is validated again.
On a two-socket host that was 77-236 s of eviction per engine start and the "no progress for 60 s" stops (7 of 20 fresh 1K prompts), with free
RAM and no swap. The engine now sets MPOL_LOCAL (the same first-touch placement, but the scanner skips the memory) at the top of main(), before
any thread is made, when numa_balancing is on and no policy was set by the user (numactl keeps its own). STRATA_NUMA_BALANCING=keep leaves the
default policy. HIP builds on Linux only; the reporter's PR also changed the CUDA engine, which this commit does not.

Ported from PR #4867 by vivienfanghuagood (header, test, main() call; the hunks moved under engine/ and gated on HIP). The author line of the
original commit is not kept here: the commit is made as the repository owner, the PR author's work is named in this message. Test: numa_balancing_test (the decision, header-only).
2026-11-19 10:56:23 +01:00
..