em_adjust_cpu_capacity(9)
π em_adjust_cpu_capacity(9) β the Kernel API Manual, bestie edition
okay so you're reading em_adjust_cpu_capacity(9), which lives in section 9 of the Kernel API Manual (that's the kernel-functions section, iykyk β¨). It's about the EM β energy model β and yes we're gonna get into it. π¦
πΈ NAME πΈ
em_adjust_cpu_capacity β literally just going in and adjusting the EM for a CPU after its capacity got updated. that's the whole vibe. π
β¨ SYNOPSIS β¨
void em_adjust_cpu_capacity (unsigned int cpu );
that's it. that's the call. she's short but she's doing her job. π
π«Ά ARGUMENTS π«Ά
cpuβ the target CPU. like, which CPU are we doing this to. that one. π
π₯ DESCRIPTION π₯
So here's the situation: you adjust the existing EM for cpu after a capacity update. β
But bestie, there's an assumption baked in here, and you need to know it: this works under the assumption that the capacity has been updated in the same way for all of the CPUs in the same perf domain. same perf domain = same treatment, no cap. it's giving "we're all in this together" energy. πβ¨
So yeah β one CPU gets named in cpu, but the mental model is the whole perf domain moving together. got it? perfect. π
π SEE ALSO π
The kernel file lives at ./kernel/power/energy_model.c, and here's the whole friend group you should go meet:
em_table_free(9)em_table_alloc(9)em_dev_compute_costs(9)em_dev_update_perf_domain(9)em_pd_get(9)em_cpu_get(9)em_dev_register_perf_domain(9)em_dev_register_pd_no_update(9)em_dev_unregister_perf_domain(9)em_dev_update_chip_binning(9)em_update_performance_limits(9)
go read them. they're all icons in their own right. πβπ§
lowkey reminder: everything above is the actual documented behaviour β nothing more, nothing less. no guessing, no extra lore. π
and that's the page!! sign-off time: this gem comes from the ./kernel/power source tree, dated October 2026, and yeah β she ate. π
ππ 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