[PATCH 0/7] Core sharing validation for CPU isolation

John Kacur
2026-04-21T18:26:36Z

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

--
2.53.0