STRUCT EM_PERF_DOMAIN(9)
okay so bestie, welcome to the struct em_perf_domain(9) page from the Kernel API Manual β no cap, this is the Performance domain struct and we're gonna cover every single member π
β¨
π NAME π
struct em_perf_domain β Performance domain. that's the name, and yes it's giving main-character kernel-struct energy π
β¨ SYNOPSIS β¨
Here's the whole shape, literally, don't touch the code bestie:
struct em_perf_domain {
struct em_perf_table *em_table;
struct list_head node;
int id;
int nr_perf_states;
int min_perf_state;
int max_perf_state;
unsigned long flags;
unsigned long cpus[];
};
πΈ Members πΈ
Okay, member-by-member vibe check, bestie β every single one is here:
em_tableβ Pointer to the runtime modifiableem_perf_table. literally a pointer, and it points at the runtime modifiable table, periodt πnodeβ node inem_pd_list(inenergy_model.c). iykyk πidβ a unique ID number for each performance domain. every PD gets its own lil ID π¦nr_perf_statesβ Number of performance states. not me counting states πmin_perf_stateβ Minimum allowed Performance State index. lowercase "minimum allowed", iconic boundary behavior β¨max_perf_stateβ Maximum allowed Performance State index. the other boundary, equally iconic β¨flagsβ See"em_perf_domain flags". yes bestie, go look at the flags πcpusβ Cpumask covering the CPUs of the domain. It's here for performance reasons to avoid potential cache misses during energy calculations in the scheduler and simplifies allocating/freeing that memory region. literally here for speed and memory-management convenience π«Ά
π¦ Description π¦
In case of CPU device, a "performance domain" represents a group of CPUs whose performance is scaled together β think squad of CPUs moving as one, but technical π
All CPUs of a performance domain must have the same micro-architecture. that's mandatory, no mixing vibes there.
Performance domains often have a 1-to-1 mapping with CPUFreq policies. yes bestie, often 1-to-1, not always, okay? π
In case of other devices the cpus field is unused β so don't come for it, it's just sitting there unused in those cases π
π₯ SEE ALSO π₯
Kernel file ./include/linux/energy_model.h β go read these next, bestie:
struct em_perf_state(9)struct em_perf_table(9)em_pd_get_efficient_state(9)em_cpu_energy(9)em_pd_nr_perf_states(9)em_perf_state_from_pd(9)
xoxo bestie, this struct em_perf_domain(9) page came from ./include/linux and it's dated October 2026 β 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