Repository navigation
soc: apple: clpc: T6050: sample on time with no vote held - #1556
Merged
Merged
Conversation
With no vote held the CLPC sampled from a deferrable timer, which fires only when the CPU that armed it wakes for something else. A CPU that went busy after an idle spell then went unseen: on the M5 Pro (J714sAP) a pointer chase started 300 ms after the last work ran at DRAM state 0 (300 ns per load) for the whole 60 ms it was measured. Sampling on time puts the floor in place within 24-32 ms (110 ns). Idle system power reads 6.44 W against 6.40 W, within the SMC's noise. Other SoCs keep the deferrable timer until it is measured on them. The T6050 comment also says what macOS's CLPC does instead: it votes from memory stalls, which this driver doesn't see. Signed-off-by: Diljit Singh <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T6050's CLPC now samples every 4 ms even when it holds no vote. Until now it sampled from a deferrable timer in that state, and the DRAM floor didn't come up after an idle spell.
Problem
With no vote held, the CLPC samples from a deferrable timer, which only fires when the CPU that armed it wakes for something else. So when a CPU goes busy after an idle spell, the CLPC doesn't see it until that other CPU happens to wake.
On the M5 Pro (J714sAP), a pointer chase that starts 300 ms after the last work ran at DRAM state 0 (about 300 ns per load) for the whole 60 ms it was measured. It ran at 110 ns once the floor was up.
Change
idle_on_time: with no vote held, keep sampling every period instead of from the deferrable timer.Validation (J714sAP, MEAS 2026-11-11)
Pointer chase on CPU 12 starting after a 300 ms sleep, median of 20, DRAM latency at 0 / 16 / 24 / 32 / 59 ms:
🤖 Generated with Claude Code