RFC arm64: expose CPU prefetch and cache modulation controls
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest3 patches 5 repliesIn review
- v1 RFC3 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- Remove redundant GPL boilerplate from the new source file while retaining the SPDX identifier and NVIDIA copyright notice.
- Address Rob Herring's ABI feedback by adding standard Documentation/ABI/testing/sysfs-devices-system-cpu records and keeping the arm64 guide as a pointer to that ABI, without a second attribute list.
- Address Breno Leitao's access/readback feedback by returning live synchronous target-CPU register reads, changing the six register-backed controls to mode 0600, documenting affected_cpus as 0444, and adding deterministic selftest mode checks.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | arm64: add CPU prefetch and cache modulation sysfs interfacearch/ arch/ arch/ +1 more | +569 | 5 replies | |
| 2/3 | Documentation/arch/arm64: document arm_cpumodDocumentation/ Documentation/ Documentation/ | +144 | 0 replies | |
| 3/3 | selftests: arm64: add arm_cpumod kselftesttools/ tools/ tools/ | +549 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Fenghua Yu | Tushar Dave | Kai-Heng Feng |
|---|---|---|---|
| 1/3 | R-b | R-b | R-b |
| 2/3 | R-b | R-b | R-b |
| 3/3 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [RFC PATCH v2 0/3] arm64: expose CPU prefetch and cache modulation controls
This series adds CONFIG_ARM64_CPUMOD, a default-off arm64 interface for controlled performance characterization of selected implementation-defined CPU prefetch and cache-management fields. It exposes a small set of named, per-CPU attributes under the path below, with writable control fields range-checked before register state is changed:
/sys/devices/system/cpu/cpuN/cpumod/
The directory is created for online CPUs whose MIDR matches a recognized Grace or Vera profile, with common and profile-specific attributes selected for that CPU. Register accesses execute on the CPU that owns the sysfs instance, and CPU hotplug creates or removes the per-CPU subtree as the CPU transitions online or offline. Unsupported CPU profiles are skipped without blocking module load or CPU hotplug.
The register-backed attributes are root-only read/write files. Reads return the live value from the synchronous target-CPU callback rather than relying on persistent per-attribute sysfs storage. affected_cpus remains world-readable and read-only.
Changes since v1:
- Remove redundant GPL boilerplate from the new source file while retaining the SPDX identifier and NVIDIA copyright notice.
- Address Rob Herring's ABI feedback by adding standard Documentation/ABI/testing/sysfs-devices-system-cpu records and keeping the arm64 guide as a pointer to that ABI, without a second attribute list.
- Address Breno Leitao's access/readback feedback by returning live synchronous target-CPU register reads, changing the six register-backed controls to mode 0600, documenting affected_cpus as 0444, and adding deterministic selftest mode checks.
Koba Ko (3):
arm64: add CPU prefetch and cache modulation sysfs interface Documentation/arch/arm64: document arm_cpumod
selftests: arm64: add arm_cpumod kselftest
.../ABI/testing/sysfs-devices-system-cpu | 77 +++ Documentation/arch/arm64/arm-cpumod.rst | 66 +++ Documentation/arch/arm64/index.rst | 1 + arch/arm64/Kconfig | 17 + arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/arm_cpumod.c | 458 +++++++++++++++ arch/arm64/kernel/arm_cpumod_internal.h | 93 +++ tools/testing/selftests/arm64/Makefile | 2 +- .../selftests/arm64/arm_cpumod/Makefile | 5 + .../selftests/arm64/arm_cpumod/arm_cpumod.sh | 543 ++++++++++++++++++ 10 files changed, 1262 insertions(+), 1 deletion(-) create mode 100644 Documentation/arch/arm64/arm-cpumod.rst create mode 100644 arch/arm64/kernel/arm_cpumod.c create mode 100644 arch/arm64/kernel/arm_cpumod_internal.h create mode 100644 tools/testing/selftests/arm64/arm_cpumod/Makefile create mode 100755 tools/testing/selftests/arm64/arm_cpumod/arm_cpumod.sh
Signature · 1 line
2.43.0