STRUCT DEVFREQ_GOVERNOR(9)
πΈ struct devfreq_governor(9) πΈ
okay bestie, welcome to the Kernel API Manual page for struct devfreq_governor β yes it's a whole Devfreq policy governor, and yes it's lowkey iconic π
β¨ NAME β¨
struct devfreq_governor β Devfreq policy governor π
β SYNOPSIS β
here's the whole vibe, character for character, no cap:
struct devfreq_governor {
struct list_head node;
const char name[DEVFREQ_NAME_LEN];
const u64 attrs;
const u64 flags;
int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
int (*event_handler)(struct devfreq *devfreq, unsigned int event,
void *data);
};
like, look at her. she's giving struct. she's giving governor. she's giving DEVFREQ_NAME_LEN. π¦
π«Ά Members π«Ά
nodeβ the list node, bestie π β it's the thing that holds all the registered devfreq governors together. the group chat of governors, if you will.nameβ the governor's name β¨ literally just her name. her brand. her identity.attrsβ the governor's sysfs attribute flags π the little settings that say what she's about in sysfs.flagsβ the governor's feature flags β fun little feature bits, so she can flex what she can do.get_target_freqβ returns the desired operating frequency for the device π₯ okay so basically,get_target_freqwill rundevfreq_dev_profile.get_dev_statusto get the status of the device β and that status isload = busy_time / total_time. math queen behavior fr fr ππevent_handlerβ the callback for the devfreq core framework to notify events to governors π§ the events include per device governor init and exit, opp changes out of devfreq, and suspend and resume of per device devfreq during device idle. she's the one who picks up the phone every time the core framework calls, periodt π
π Description π
β οΈ okay important caveat bestie, do NOT skip this one: note that the callbacks are called with devfreq->lock locked by devfreq. π like, the lock is already held when they ring you up β respect the lock, don't go grabbing it again, iykyk π
π SEE ALSO π
- Kernel file
./include/linux/devfreq-governor.hπ
and that's the whole page, bestie!! π this absolute baddie of a manpage came to you straight from ./include/linux (that's the source/version tag, look at her go), dated October 2026 β so go forth, register some governors, and slay π
β¨ππ«Ά
π¦ 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