Skip to content
Snippets Groups Projects
Commit da5e79bc authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

cpufreq: conservative: Take limits changes into account properly


If the policy limits change between invocations of cs_dbs_update(),
the requested frequency value stored in dbs_info may not be updated
and the function may use a stale value of it next time.  Moreover, if
idle periods are takem into account by cs_dbs_update(), the requested
frequency value stored in dbs_info may be below the min policy limit,
which is incorrect.

To fix these problems, always update the requested frequency value
in dbs_info along with the local copy of it when the previous
requested frequency is beyond the policy limits and avoid decreasing
the requested frequency below the min policy limit when taking
idle periods into account.

Fixes: abb66279 (cpufreq: conservative: Fix next frequency selection)
Fixes: 00bfe058 (cpufreq: conservative: Decrease frequency faster for deferred updates)
Reported-by: default avatarWaldemar Rymarkiewicz <waldemarx.rymarkiewicz@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarWaldemar Rymarkiewicz <waldemarx.rymarkiewicz@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 4b73d334
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment