cpufreq_set_policy(9)
π cpufreq_set_policy(9) β Kernel API Manual π
πΈ NAME πΈ
cpufreq_set_policy β modify cpufreq policy parameters. π
β¨ SYNOPSIS β¨
int cpufreq_set_policy (struct cpufreq_policy *policy , struct
cpufreq_governor *new_gov , unsigned int new_pol );
π ARGUMENTS π
policyβ policy object to modify. π«Άnew_govβ policy governor pointer. π§new_polβ policy value (for drivers with built-in governors). π
π DESCRIPTION π
okay so bestie, here's the vibe: cpufreq_set_policy invokes the cpufreq driver's ->verify callback to sanity-check the frequency limits to be set for the policy, updates policy with the verified limits values, and then either invokes the driver's ->setpolicy callback (if present) or carries out a governor update for policy. β¨
That means it runs the current governor's ->limits callback (if new_gov points to the same object as the one in policy) or replaces the governor for policy with new_gov. π¦
important bestie: thecpuinfopart ofpolicyis not updated by this function. no cap. π
π¦ SEE ALSO π¦
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_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_update_policy(9)cpufreq_update_limits(9)cpufreq_register_driver(9)
okay bye bestie, mwah π β source/version ./drivers/cpufreq, date October 2026, page cpufreq_set_policy(9) from the Kernel API Manual. ππβ¨
π¦ 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