Page MenuHomeFreeBSD

Add powerd(8) support for AMD family 17h (Zen) CPUs
ClosedPublic

Authored by cem on Aug 19 2017, 6:45 AM.

Details

Summary

Family 17h CPUs use a slightly different frequency formula than previous
generation models.

PR: 221621

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

So I will note that on my system hwpstate ends up opting to get these from acpi_perf:

kernel: hwpstate0: going to fetch info from acpi_perf
...
mjoras@icarium ~> sysctl dev.hwpstate.0.freq_settings
dev.hwpstate.0.freq_settings: 3400/3825 2800/2765 2200/1952

Forcing it to come from an MSR and using your patch I get:

dev.hwpstate.0.freq_settings: 3400/-1 2800/-1 2200/-1

So that looks good. The power dissipation is unknown, but apparently available when using ACPI. This is the case for older families too. powerd(8) only uses the power information in verbose mode to track total energy usage, apparently.

This patch doesn't fix the PR, as already noted there. It seems like this would in fact fix powerd(8) for the case where getting the information from ACPI fails, so I might mention that this fixes it for the MSR case specifically in the title.

This revision is now accepted and ready to land.Aug 20 2017, 12:32 AM
This revision was automatically updated to reflect the committed changes.