cpufreq_cpu_get(9)
β¨ NAME β¨
okay bestie, welcome to the Kernel API Manual page for cpufreq_cpu_get(9) β the one that returns the policy for a CPU and marks it as busy π«Ά
πΈ SYNOPSIS πΈ
struct cpufreq_policy * cpufreq_cpu_get (unsigned int cpu );
π ARGUMENTS π
cpuβ the CPU you wanna find the policy for, no cap π₯
π DESCRIPTION π
So here's the vibe: cpufreq_cpu_get calls cpufreq_cpu_get_raw to obtain a cpufreq policy for cpu, and then it increments the kobject reference counter of that policy. It returns a valid policy on success, or NULL on failure π
The policy that comes back from this function has to be released with the help of cpufreq_cpu_put, so its kobject reference counter gets balanced properly. Like, do not ghost that release step β it's giving "mandatory balance check" for real π
bestie reminder: cpufreq_cpu_put is the matching energy. get it, then put it. periodt π
π¦ SEE ALSO π¦
- Kernel file
./drivers/cpufreq/cpufreq.c cpufreq_cpu_put(9)adjust_jiffies(9)cpufreq_notify_transition(9)cpufreq_enable_fast_switch(9)cpufreq_disable_fast_switch(9)cpufreq_driver_resolve_freq(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)
byeee π this lil page comes from ./drivers/cpufreq, dated October 2026, and it's cpufreq_cpu_get(9) in the Kernel API Manual β iconic, slay, etc. πβ¨
π¦ 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