cpufreq_driver_resolve_freq(9)
π cpufreq_driver_resolve_freq(9) β the Kernel API Manual, but make it make sense
okay so bestie, welcome to the Kernel API Manual page for cpufreq_driver_resolve_freq β yes that whole mouthful is the name, and yes you're gonna slay it. This is the function that takes whatever frequency you want and finds you the closest one the driver will actually give you. matchmaker energy fr fr π
β¨ SYNOPSIS β¨
unsigned int cpufreq_driver_resolve_freq (struct cpufreq_policy *policy
, unsigned int target_freq );
that's it, that's the whole signature. two args, one unsigned int coming back at you. π
πΈ ARGUMENTS πΈ
policyβ the associated policy you're interrogating π like, this is the policy object you want to ask questions to. be nice to it.target_freqβ the target frequency you want resolved. the wish, the dream, the number you're bringing to the function to see what it can do with it.
π¦ DESCRIPTION π¦
okay so here's the vibe: the mapping from your target frequency to the driver frequency is cached in the policy. that's it. that's the whole description. the lookup result lives in the policy so it's not out here doing fresh work every single time. iconic efficiency honestly π
β RETURN β
you get back the lowest driver-supported frequency that's greater than or equal to the target_freq you passed in β and it's still subject to policy (min/max) and driver limitations, so don't come for it if your max is capping things. it's doing its best within the rules, periodt. π₯
π SEE ALSO π
buckle up bestie, this is the whole group chat. all of these live in the kernel file ./drivers/cpufreq/cpufreq.c:
cpufreq_cpu_get(9)cpufreq_cpu_put(9)adjust_jiffies(9)cpufreq_notify_transition(9)cpufreq_enable_fast_switch(9)cpufreq_disable_fast_switch(9)cpufreq_parse_governor(9)cpufreq_add_dev(9)cpufreq_out_of_sync(9)cpufreq_quick_get(9)cpufreq_quick_get_max(9)cpufreq_get_hw_max_freq(9)cpufreq_get(9)cpufreq_suspend(9)cpufreq_resume(9)cpufreq_driver_test_flags(9)cpufreq_get_current_driver(9)cpufreq_get_driver_data(9)cpufreq_register_notifier(9)cpufreq_unregister_notifier(9)cpufreq_driver_fast_switch(9)cpufreq_driver_adjust_perf(9)cpufreq_driver_has_adjust_perf(9)cpufreq_update_pressure(9)cpufreq_set_policy(9)cpufreq_update_policy(9)cpufreq_update_limits(9)cpufreq_register_driver(9)
like, the entire cpufreq friend group. go read them, iykyk π
ngl there are no warnings, bugs, or caveats on this page β just vibes and a cached mapping. don't invent drama where there is none π
and that's the page!! this one came from ./drivers/cpufreq, dated October 2026, and it's cpufreq_driver_resolve_freq(9) signing off. mwah, go resolve some frequencies bestie π«Άπβ¨
π¦ 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