public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Core sharing validation for CPU isolation
@ 2026-04-21 18:26 John Kacur
  2026-04-21 18:26 ` [PATCH 1/7] rteval: Add CoreSiblings class for CPU core topology queries John Kacur
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: John Kacur @ 2026-04-21 18:26 UTC (permalink / raw)
  To: linux-rt-users; +Cc: Clark Williams, Tomas Glozar

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-04-21 18:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21 18:26 [PATCH 0/7] Core sharing validation for CPU isolation John Kacur
2026-04-21 18:26 ` [PATCH 1/7] rteval: Add CoreSiblings class for CPU core topology queries John Kacur
2026-04-21 18:26 ` [PATCH 2/7] rteval: Add core sharing validation for CPU isolation John Kacur
2026-04-21 18:26 ` [PATCH 3/7] rteval: Include core sharing warnings in XML report John Kacur
2026-04-21 18:26 ` [PATCH 4/7] rteval: Add temporary test for core sharing validation with mocked isolated CPUs John Kacur
2026-04-21 18:26 ` [PATCH 5/7] rteval: Display core sharing warnings in text report John Kacur
2026-04-21 18:26 ` [PATCH 6/7] rteval: Add --warn-non-isolated-core-sharing option for measurement vs load warnings John Kacur
2026-04-21 18:26 ` [PATCH 7/7] rteval: Include --warn-non-isolated-core-sharing warnings in XML report John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox