]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpufreq: Avoid redundant target() calls for unchanged limits
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 22 May 2026 04:19:09 +0000 (09:49 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 22 May 2026 16:41:24 +0000 (18:41 +0200)
commit9801be8bef65dbcbc40c1a9c2f03d70ed67a5d30
tree7423c88d024a3680c10335ec526aa74d612657ee
parentaa70232cc7431d517e0402d90c38e11b67414049
cpufreq: Avoid redundant target() calls for unchanged limits

Drivers setting CPUFREQ_NEED_UPDATE_LIMITS expect target() to be
invoked even if the target frequency remains unchanged, so they can
update their internal policy limits state.

Currently the core invokes target() unconditionally whenever the
requested frequency matches policy->cur for such drivers, even if
policy->min and policy->max haven't changed since the previous update.

Track pending policy limit updates explicitly and skip redundant
target() invocations when neither the target frequency nor the
effective limits changed.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Reviewed-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Link: https://patch.msgid.link/d0107c364b709abca21acf88072220bc05478594.1779423281.git.viresh.kumar@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h