cpufreq_set_policy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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: the cpuinfo part of policy is not updated by this function. no cap. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/cpufreq/cpufreq.c πŸ‘‘


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