[PATCH 0/8] rteval: cpuset placement for measurement and load overlap
COOLING10d
From: John Kacur <jkacur@redhat.com>
Date: 2026-09-22 22:26:34
This series improves how rteval places measurement and load workloads when
--cpusets is used, and adds the ability to confine loads to their own cpuset.
Background: rteval --cpusets creates the rteval_measurement cpuset as a
cgroup-v2 isolated partition, which removes its CPUs from the root cgroup's
effective set. Loads run in the root cgroup bound only by CPU affinity
(taskset). In the
default run both cpulists default to all online CPUs (100% overlap), so the
isolated partition starves the taskset-bound loads, kcompile fails, and
rteval exits non-zero. This is why several cpuset tests had been skipped.
The series is in two parts.
Part 1 - overlap validation + --measurement-member (patches 1-6):
Fail loudly by default, and let the user explicitly opt into co-location.
A new --measurement-member flag flips rteval_measurement to a member
partition so loads and measurement may legally share CPUs. When measurement
is isolated and the load/measurement cpulists overlap without
--measurement-member, rteval now exits early with a clear message pointing
at the two ways forward (add --measurement-member, or supply disjoint
cpulists). The check is gated on loads actually running (not --noload /
--onlyload) to avoid firing spuriously. The previously skipped cpuset tests
are re-enabled and updated for the new behavior.
Part 2 - loads in a cpuset (patches 7-8):
A new opt-in --loads-cpuset flag confines load workloads to their own
rteval_loads member cpuset instead of relying only on taskset. It is purely
additive: without the flag, loads use taskset exactly as before. A cpuset is
a hard ceiling the whole kcompile/hackbench descendant subtree inherits and
cannot escape (taskset masks can be widened via sched_setaffinity), and it
lays the groundwork for NUMA memory binding. Placement uses a shared
self-placement-before-exec helper (cpuset_preexec) that the measurement
modules were refactored onto as well. Patch 7 is a standalone bugfix for an
unguarded m[1].lower() over the loads config section that the new boolean
option would otherwise crash on.
Tested on a root machine: the full cpuset shell suite passes, including the
overlapping-member case (--measurement-member together with --loads-cpuset).
John Kacur (8):
rteval: Add CpuList intersection/difference helpers
rteval: Don't create measurement cpuset with --onlyload
rteval: Add --measurement-member and guard against measurement/load
overlap
rteval: Re-enable cpuset overlap tests for the new behavior
rteval: Move --measurement-member into the measurement module option
group
rteval: Add tests for overlap-check gating and --measurement-member
help
rteval: Guard load module config iteration against non-string values
rteval: Add --loads-cpuset to confine loads to a member cpuset
rteval-cmd | 51 +-
rteval/__init__.py | 42 +-
rteval/cpulist_utils.py | 26 +
rteval/cpuset.py | 37 ++
rteval/cpusetmanager.py | 125 +++--
rteval/modules/__init__.py | 16 +
rteval/modules/loads/__init__.py | 6 +-
rteval/modules/loads/hackbench.py | 7 +-
rteval/modules/loads/kcompile.py | 12 +-
rteval/modules/loads/stressng.py | 7 +-
rteval/modules/measurement/cyclictest.py | 13 +-
rteval/modules/measurement/timerlat.py | 13 +-
tests/cpusets/test-cpusets.sh | 573 +++++++++++++++++++----
tests/test_cpulist_class.py | 60 +++
tests/test_cpusetmanager.py | 129 +++++
15 files changed, 950 insertions(+), 167 deletions(-)
--
2.55.0