summaryrefslogtreecommitdiff
path: root/rust/helpers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-03-28 21:47:31 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-04-09 21:22:16 +0200
commit684e1855211145b71f8d9aaa49d2cc67067cd42a (patch)
treea5a7224f604a01aca4f81fb3d28d61917fc6b71f /rust/helpers
parentece898da386214cf9bf693fe21694b556b785428 (diff)
cpufreq: Introduce cpufreq_policy_refresh()
Since cpufreq_update_limits() obtains a cpufreq policy pointer for the given CPU and reference counts the object pointed to by it, calling cpufreq_update_policy() from cpufreq_update_limits() is somewhat wasteful because that function calls cpufreq_cpu_get() on the same CPU again. To avoid that unnecessary overhead, move the part of the code running under the policy rwsem from cpufreq_update_policy() to a new function called cpufreq_policy_refresh() and invoke that new function from both cpufreq_update_policy() and cpufreq_update_limits(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Tested-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://patch.msgid.link/6047110.MhkbZ0Pkbq@rjwysocki.net
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions