STRUCT AMD_CPUDATA(9)
π struct amd_cpudata(9) β like, the whole vibe
okay so bestie, welcome to the Kernel API Manual entry for struct amd_cpudata(9). this is the private CPU data situation for AMD P-State and honestly? it ate. let's get into it π«Ά
β¨ NAME β¨
struct amd_cpudata β the private CPU data for AMD P-State. that's it, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
struct amd_cpudata {
int cpu;
struct freq_qos_request req[2];
u64 cppc_req_cached;
u64 cppc_req2_cached;
union perf_cached perf;
u8 prefcore_ranking;
u8 floor_perf_cnt;
u8 bios_floor_perf;
u32 min_limit_freq;
u32 max_limit_freq;
u32 nominal_freq;
u32 max_freq;
u32 lowest_nonlinear_freq;
u32 floor_freq;
struct amd_aperf_mperf cur;
struct amd_aperf_mperf prev;
u64 freq;
bool boost_supported;
bool hw_prefcore;
u32 policy;
bool suspended;
u8 epp_default_ac;
u8 epp_default_dc;
bool dynamic_epp;
bool raw_epp;
struct notifier_block power_nb;
enum platform_profile_option current_profile;
struct device *ppdev;
char *profile_name;
};
look at her. iconic struct. every single field is right there, no skips, we respect all of them π
π Members π
okay so here's the cast, one by one, no cap:
cpuβ the CPU number. which CPU she is, basically.reqβ the constraint request to apply.cppc_req_cachedβ cached performance request hints.cppc_req2_cachedβ cached value ofMSR_AMD_CPPC_REQ2. yes, the number-two register, we love a sequel.perfβ cached performance-related data.prefcore_rankingβ the preferred core ranking. higher value = higher priority, so like, the higher the value the more main-character the core is πfloor_perf_cntβ the cached value of the number of distinct floor performance levels supported.bios_floor_perfβ the cached value of the boot-time floor performance level fromMSR_AMD_CPPC_REQ2.min_limit_freqβ cached value ofpolicy->min(in khz).max_limit_freqβ cached value ofpolicy->max(in khz).nominal_freqβ the frequency (in khz) that mapped tonominal_perf.max_freqβ in ideal conditions, the maximum frequency (in khz) possible frequency. ideal conditions! manifesting β¨lowest_nonlinear_freqβ the frequency (in khz) that mapped tolowest_nonlinear_perf.floor_freqβ cached value of the user requestedfloor_freq.curβ the difference of Aperf/Mperf/tsc count between the last and current sample.prevβ the last Aperf/Mperf/tsc count value read from the register.freqβ the current cpu frequency value (in khz).boost_supportedβ checks whether the Processor or SBIOS supports boost mode.hw_prefcoreβ checks whether HW supports the preferred core featue. only whenhw_prefcoreand the early prefcore param are true does the AMD P-State driver support the preferred core featue. so both conditions or it's a no πpolicyβ the Cpufreq policy value.suspendedβ if the CPU core if offlined. (yes, that's the original wording, we're keeping it fr fr π)epp_default_acβ the default EPP value for the AC power source.epp_default_dcβ the default EPP value for the DC power source.dynamic_eppβ whether dynamic EPP is enabled.raw_eppβ whether the last EPP write was a raw numeric value rather than a named preference.power_nbβ the notifier block for power events.current_profileβ the currently selected platform profile option.ppdevβ the device registered with the platform profile handler.profile_nameβ the name under whichppdevis registered.
π¦ Description π¦
so, amd_cpudata is literally the key private data for each CPU thread in AMD P-State, and it represents all the attributes and goals that AMD P-State requests at runtime. she's holding everything together. the way that one struct carries the entire runtime wishlist? obsessed ππ
π SEE ALSO π
go peek at these, iykyk:
- Kernel file
./drivers/cpufreq/amd-pstate.h union perf_cached(9)struct amd_aperf_mperf(9)
ok that's the whole page bestie, every field, every flag, nothing skipped π―
and that's a wrap! π this little masterpiece came from ./drivers/cpufreq, dated October 2026, and it's brought to you by the Kernel API Manual β see you in the next one, mwah ππΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms