Skip to content

Core sharing validation for CPU isolation

John Kacur linux-rt-users 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7rteval: Add CoreSiblings class for CPU core topology queriesrteval/sysinfo/coresiblings.py+110 -00 replies
2/7rteval: Add core sharing validation for CPU isolationrteval-cmd rteval/sysinfo/coresiblings.py rteval/systopology.py+69 -20 replies
3/7rteval: Include core sharing warnings in XML reportrteval-cmd rteval/sysinfo/__init__.py rteval/sysinfo/cputopology.py+45 -40 replies
4/7rteval: Add temporary test for core sharing validation with mocked isolated CPUstest_full_validation.py+151 -00 replies
5/7rteval: Display core sharing warnings in text reportrteval/rteval_text.xsl+12 -10 replies
6/7rteval: Add --warn-non-isolated-core-sharing option for measurement vs load warningsrteval-cmd rteval/systopology.py+21 -80 replies
7/7rteval: Include --warn-non-isolated-core-sharing warnings in XML reportrteval-cmd rteval/sysinfo/cputopology.py+6 -30 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/7] Core sharing validation for CPU isolation

This patch series adds validation to detect and warn when CPUs sharing physical cores (SMT siblings) are assigned to different workload types, which can defeat CPU isolation and corrupt real-time measurements.

When SMT/hyperthreading is enabled, CPUs sharing a physical core also share L1/L2 caches, execution units, TLB, and other core-level resources. Running different workload types (housekeeping, measurement, load) on sibling threads defeats CPU isolation and can create unreproducible results.

The series implements:

1. CoreSiblings class - Provides a simple interface for querying which CPUs share physical cores by reading thread_siblings_list from sysfs. Works with any SMT configuration (1-way, 2-way, 4-way, 8-way).

2. Core sharing validation - Detects when isolated CPUs share cores between housekeeping, measurement, and load groups. Warnings are logged to console and included in XML reports.

3. XSLT integration - Warnings appear in text reports generated with the -Z option via a CoreSharingWarnings section.

4. Optional stricter validation - --warn-non-isolated-core-sharing flag enables warnings for measurement vs load CPU pairs even when neither is isolated, for users who want maximum isolation assurance.

The validation is purely informational - it warns users but does not prevent execution, allowing informed decisions about CPU configurations.

Testing includes comprehensive scenarios with both isolated and non-isolated CPU configurations, verified with real isolated CPUs.

John Kacur (7):
rteval: Add CoreSiblings class for CPU core topology queries
rteval: Add core sharing validation for CPU isolation
rteval: Include core sharing warnings in XML report
rteval: Add temporary test for core sharing validation with mocked
isolated CPUs
rteval: Display core sharing warnings in text report
rteval: Add --warn-non-isolated-core-sharing option for measurement vs
load warnings
rteval: Include --warn-non-isolated-core-sharing warnings in XML
report

 rteval-cmd                     |  18 +++-
 rteval/rteval_text.xsl         |  13 ++-
 rteval/sysinfo/__init__.py     |   3 +
 rteval/sysinfo/coresiblings.py | 116 +++++++++++++++++++++++++
 rteval/sysinfo/cputopology.py  |  35 ++++++++
 rteval/systopology.py          |  64 ++++++++++++++
 test_full_validation.py        | 151 +++++++++++++++++++++++++++++++++
 7 files changed, 398 insertions(+), 2 deletions(-)
 create mode 100644 rteval/sysinfo/coresiblings.py
 create mode 100644 test_full_validation.py
Signature · 1 line
2.53.0