proof-cascade: RAPL reads each package's energy-status MSR where powercap lists none #626
Loading…
Reference in a new issue
No description provided.
Delete branch "proof-cascade/rapl-msr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some kernels ship without the powercap RAPL driver (Ubuntu without
linux-modules-extra, as on some rented bare-metal servers). On those hosts/sys/class/powercaplists no package even though the counters are there. This ports the MSR fallback from #618 (jouleclaw-energy) into this meter, with no dependency added: the standards do not depend on one another.Where powercap lists no package, each package's
MSR_PKG_ENERGY_STATUSis read on that package's first CPU through/dev/cpu/<n>/msr:proof-cascade specifics
psysand has no readable MSR still reads as Absent.proof --measure: names themsrmodule andCAP_SYS_RAWIOin its Unavailable reason and mentions the MSRs in its Absent reason. The README line is updated.tests/rapl_hardware.rs: gains its own MSR oracle where powercap lists no package.Verified
cargo test -p proof-cascadeand-p proof-clipass;cargo check --workspace --all-targetsis clean; clippy onproof-cascadeandproof-cliis clean.cargo test -p proof-cascadepasses and theioreport liveness:grep matches. Clippy onproof-cascadeandproof-solversis clean.proof --measuregives 64,676 µJ per proof, HwShunt.--measuredeclines with the new reason.Second commit: die scope
Linux scopes Intel's RAPL MSRs per die and AMD's and Hygon's per package.
arch/x86/events/rapl.csays "AMD/HYGON platforms have a per-PKG package energy counter" and "CLX-AP is multi-die and its RAPL MSRs are die-scope". The powercap driver names a multi-die Intel package's zonespackage-<p>-die-<d>, one top-level zone per die.physical_package_id,die_id) on Intel and the package on AMD and Hygon. Each domain is read on its own first CPU and they are summed. Single-die parts are unchanged.package-<n>-die-<m>, so a multi-die host's die zones count as packages. It accepts nothing looser.New unit tests: a two-die Intel package is two domains, summed; an AMD package whose CPUs list several
die_ids is one domain; a two-die powercap tree sums both die zones; and the name rule's accepted names and near misses. Tests and clippy pass as before on Linux and macOS.🤖 Generated with Claude Code