em_dev_register_perf_domain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 to cpumask_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 to NULL πŸ™ˆ
  • 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


🫢 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