Skip to content

drm/asahi: g16: Log cooling decisions at debug, ceiling edges at info - #2744

Draft
RyanTheTide wants to merge 1 commit into
djdev/g16-272from
j713/g16-cooling-log-edges
Draft

RyanTheTide wants to merge 1 commit into
djdev/g16-272from
j713/g16-cooling-log-edges

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

G16 logs every change of its cooling decision at info level (M4 cooling: sample_ns=... limit=S<n>). On a fanless M4 Air under sustained GPU load the governor, budget and backstop move several times a second. During a 97-104 C desktop load on the J713 that was up to 82 lines in 10 s, which pushes older lines out of the kernel log buffer within minutes. Every boot also writes about 15 of them while the startup hold lets go.

Change

The full decision line moves to dev_dbg. At info level, G16 logs only the two edges: the ceiling dropping below the board's top state, and coming back to it, with the temperature and the number of decisions in between. The startup hold counts as "below the top", so a normal boot logs one line when it lets go. The cooling policy itself does not change.

Stacked on #2676 (djdev/g16-272 at ed41e08).

Testing

  • make cpu in tools/testing/selftests/drivers/gpu/asahi-m4: 24/24 pass.
  • Builds clean as part of a full J713 kernel (the J713's t4 config) with this commit on top. power.rs is identical between drm/asahi: g16: run the M4 GPU on the macOS 27.2 firmware (26B123) #2676's ed41e08 and the head it was first built on.
  • The log rate in the Problem section is measured on the J713 default (t4) during a GNOME + 3D + video load.

Still to run

  • A J713 boot with this change: check one info line at the end of the startup hold, and only edge lines under a heat row. It will ride the next J713 default candidate build.
Measurement

M4 cooling lines per 10 s in the soak's kernel log (t4, die hotspot 97-104 C): 5, 54, 72, 82, 58, 4, 14. Ceiling values seen in those lines: S1 28, S2 24, S3 14, S4 19, S5 19, S6 44, S7 58, S8 61, S9 22.

Assisted-by: LLM (Claude:Opus 5.5)

service_power() logs every change of the cooling decision (governor,
budget, backstop, sensor error, ceiling) with dev_info. Under sustained
heat those inputs move several times a second. On the J713 (M4 Air,
fanless) a desktop load at 97-104 C wrote up to 82 such lines in 10 s,
enough to push older lines out of the kernel log buffer within minutes,
and every boot writes about 15 while the startup hold lets go.

Keep the full decision at dev_dbg. The info log gets only the two edges
a user cares about: the ceiling dropping below the board's top state,
and coming back to it, with the temperature and the number of decisions
in between. The startup hold counts as below the top, so a normal boot
logs one line when it lets go.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

This waits on #2676, which is still a draft; it can be folded into it or land right after it. Still needed: a J713 boot row showing one info line when the startup hold lets go and only the ceiling edge lines under a heat load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant