em_dev_register_perf_domain(9)
π em_dev_register_perf_domain(9) π
okay bestie, welcome to the Kernel API Manual β this page is literally about registering the Energy Model (EM) for a device, and itβs giving very specific energy-management vibes β¨
πΈ NAME πΈ
em_dev_register_perf_domain β Register the Energy Model (EM) for a device π
π¦ SYNOPSIS π¦
int em_dev_register_perf_domain (struct device *dev , unsigned int
nr_states , const struct em_data_callback *cb , const cpumask_t *cpus ,
bool microwatts );
π ARGUMENTS π
devβ the device youβre registering the EM for, bestie π«Άnr_statesβ the number of performance states to register β¨cbβ callback functions that provide the data of the Energy Model πcpusβ pointer tocpumask_t; if itβs a CPU device this is obligatory (like, actually required), and it can be taken from i.e.'policy->cpus'. For other types of devices this should be set toNULLπmicrowattsβ flag indicating that the power values are in micro-Watts or in some other scale. It must be set properly, no cap β οΈ
π₯ DESCRIPTION π₯
Create Energy Model tables for a performance domain using the callbacks defined in cb. iconic behavior, honestly π
The microwatts is important to set with correct value. Some kernel subsystems might rely on this flag and check if all devices in the EM are using the same scale. so yeah, get that flag right fr fr π
If multiple clients register the same performance domain, all but the first registration will be ignored. first one ate, the rest are just standing there π
Return 0 on success β¨
π SEE ALSO π
Kernel file ./kernel/power/energy_model.c
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_pd_no_update(9)em_dev_unregister_perf_domain(9)em_adjust_cpu_capacity(9)em_dev_update_chip_binning(9)em_update_performance_limits(9)
π«Ά cute little sign-off: this page came from ./kernel/power, dated October 2026, and itβs the em_dev_register_perf_domain(9) manual page. bye bestie, go register that EM responsibly πβ¨π
π¦ 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