未验证 提交 f59c1a3e 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!1134 【openEuler-1.0-LTS】cpufreq:conservative: Fix load in fast_dbs_update()

Merge Pull Request from: @xuesinian 
 
Remove "dbs_update(policy)" for getting load in fast_dbs_update(), incoming "load" from cs_dbs_update().

Load results are inaccurate after two consecutive updates, resulting in inaccurate frequency scaling.

Related issue : #I7DJU2  
 
Link:https://gitee.com/openeuler/kernel/pulls/1134 

Reviewed-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> 
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> 
......@@ -52,13 +52,12 @@ static inline unsigned int get_freq_step(struct cs_dbs_tuners *cs_tuners,
return freq_step;
}
static unsigned int fast_dbs_update(struct cpufreq_policy *policy)
static unsigned int fast_dbs_update(struct cpufreq_policy *policy, const unsigned int load)
{
struct policy_dbs_info *policy_dbs = policy->governor_data;
struct cs_policy_dbs_info *dbs_info = to_dbs_info(policy_dbs);
unsigned int requested_freq = dbs_info->requested_freq;
struct dbs_data *dbs_data = policy_dbs->dbs_data;
unsigned int load = dbs_update(policy);
unsigned int min_f, max_f;
/*
......@@ -121,7 +120,7 @@ static unsigned int cs_dbs_update(struct cpufreq_policy *policy)
/* If seek to reduce performance loss */
if (cs_tuners->fast_mode == 1)
return fast_dbs_update(policy);
return fast_dbs_update(policy, load);
/*
* If requested_freq is out of range, it is likely that the limits
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册