Page MenuHomeFreeBSD

hwpstate: Use dynamic sysctl initialization
Needs ReviewPublic

Authored by aokblast on Mon, Jan 5, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 13, 9:48 AM
Unknown Object (File)
Mon, Jan 12, 9:19 PM
Unknown Object (File)
Mon, Jan 12, 7:14 AM
Unknown Object (File)
Mon, Jan 12, 1:24 AM
Unknown Object (File)
Sat, Jan 10, 4:48 AM
Unknown Object (File)
Thu, Jan 8, 11:34 PM
Unknown Object (File)
Thu, Jan 8, 4:31 PM
Unknown Object (File)
Tue, Jan 6, 11:30 AM
Subscribers

Details

Reviewers
markj
olce
khng
Summary

The AMD and Intel's pstate drives share the same sysctl node. To prevent
warning from module loader, we use dynami sysctl which will be allocated
and deallocated when module being load and unload.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 69626
Build 66509: arc lint + arc unit

Event Timeline

sys/x86/cpufreq/hwpstate_amd.c
376

This definitely needs some comment explaining why we register the sysctls this way.

sys/x86/cpufreq/hwpstate_amd.c
377–387

While it does not hurt per se, I would not move the above knobs here, as they do not exist in the Intel driver and my plan is to remove machdep.hwpstate_pkg_ctrl both here and in the Intel driver in favor of a common knob under dev.hwpstate_* to set all cores' EPP, which could later lead to removing hwpstate_modevent().