UNION PERF_CACHED(9)
π union perf_cached β the kernel API manual, section 9, bestie π«Ά
okay so picture this: it's a manual page from the Kernel API Manual, section 9, and it's all about one little union that holds the receipts on CPU performance data. yes ma'am, we're getting into the vibes of processor perf levels today β¨
πΈ NAME πΈ
union perf_cached β literally just a union whose whole job is to cache performance-related data. that's it, that's the gig π
β¨ SYNOPSIS β¨
union perf_cached {
struct {
u8 highest_perf;
u8 nominal_perf;
u8 lowest_nonlinear_perf;
u8 lowest_perf;
u8 min_limit_perf;
u8 max_limit_perf;
u8 bios_min_perf;
};
u64 val;
};
look at her. iconic. a struct full of u8 cuties chilling inside a union with one big u64. main character energy fr fr π
π MEMBERS π
the anonymous one
{unnamed_struct}β bestie has no name, she's anonymous π (the manpage literally saysanonymous, and honestly? mysterious of her)
the named girlies π
highest_perfβ the maximum performance an individual processor may reach, assuming ideal conditions. ok so here's the tea π΅: for platforms that support the preferred core feature, thehighest_perfvalue maybe configured to any value in the range166-255by the firmware (because the preferred core ranking is encoded in thehighest_perfvalue). and to maintain consistency across all platforms, we split thehighest_perfand preferred core ranking values intocpudata->perf.highest_perfandcpudata->prefcore_ranking. yes that's a whole lot, but it's important, don't skip it π₯nominal_perfβ the maximum sustained performance level of the processor, assuming ideal operating conditions. sustained, babes. she's in it for the long haul πlowest_nonlinear_perfβ the lowest performance level at which nonlinear power savings are achieved. lowkey the most niche flex in here βlowest_perfβ the absolute lowest performance level of the processor. the floor. the basement. the absolute bottom π§min_limit_perfβ cached value of the performance corresponding topolicy->minπmax_limit_perfβ cached value of the performance corresponding topolicy->maxπ¦bios_min_perfβ cached perf value corresponding to the"Requested CPU Min Frequency"BIOS option. yes, BIOS really said "let me set the min frequency" and this field is keeping the receipt πvalβ raw 64-bit value for atomic access viaREAD_ONCE/WRITE_ONCE. she's the whole union viewed as one number, and she's atomic about it. no cap π₯
π SEE ALSO π
- Kernel file
./drivers/cpufreq/amd-pstate.h struct amd_aperf_mperf(9)struct amd_cpudata(9)
go read those too, iykyk π
ok final vibe check:valgives you atomic access to the whole thing, but the individual fields are theu8girlies living inside thatanonymousstruct. know the difference, bestie π«Ά
and that's the page!! π this lil beauty comes to you from ./drivers/cpufreq, dated October 2026, and yeah she's filed under union perf_cached(9) β periodt π
β¨
π¦ 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