Skip to content

rteval: cpuset placement for measurement and load overlap

John Kacur linux-rt-users 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8rteval: Add CpuList intersection/difference helpersrteval-cmd rteval/cpulist_utils.py tests/test_cpulist_class.py+93 -60 replies
2/8rteval: Don't create measurement cpuset with --onlyloadrteval-cmd rteval/cpusetmanager.py tests/test_cpusetmanager.py+34 -90 replies
3/8rteval: Add --measurement-member and guard against measurement/load overlaprteval-cmd rteval/cpusetmanager.py tests/test_cpusetmanager.py+65 -40 replies
4/8rteval: Re-enable cpuset overlap tests for the new behaviortests/cpusets/test-cpusets.sh+127 -850 replies
5/8rteval: Move --measurement-member into the measurement module option grouprteval-cmd rteval/modules/__init__.py+8 -60 replies
6/8rteval: Add tests for overlap-check gating and --measurement-member helptests/cpusets/test-cpusets.sh tests/test_cpusetmanager.py+119 -00 replies
7/8rteval: Guard load module config iteration against non-string valuesrteval/modules/loads/__init__.py+4 -20 replies
8/8rteval: Add --loads-cpuset to confine loads to a member cpusetrteval-cmd rteval/__init__.py rteval/cpuset.py +9 more+517 -720 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] rteval: cpuset placement for measurement and load overlap

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(-)
Signature · 1 line
2.55.0