HomeFreeBSD

amdsmu: Expose sysctls for metrics about last sleep

Description

amdsmu: Expose sysctls for metrics about last sleep

Get "log" address with the SMU_MSG_LOG_GETDRAM_ADDR_HI/LO SMU
commands. From this, we dump & read metrics about residency in various
sleep states (none, S0i2, and S0i3), as well as active durations for
the IP blocks on the CPU during the last sleep. All these metrics are
exposed under the dev.amdsmu.0.metrics node.

This is useful for debugging sleep as the residency registers in the
_LPI object are not populated on some systems (e.g. AMD Phoenix).

A dev.amdsmu.0.ip_blocks.XXX node is also created for each IP block,
with children for the current active state and time spent active during
the last sleep.

Differential Revision: https://reviews.freebsd.org/D48714

Reviewed by: cem, kib, mckusick
Approved by: kib, mckusick
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48714

Details

Provenance
obiwacAuthored on Jun 14 2025, 3:33 PM
Reviewer
cem
Differential Revision
D48714: amdsmu: Get and expose sysctls for metrics about last sleep
Parents
rG1b7f9c586d25: UPDATING: Belatedly document commit fa02551dc8a0
Branches
Unknown
Tags
Unknown