cpufreq: schedutil: Remove the needless sg_policy parameter to ignore_dl_rate_limit()
Subsystems (2)
PATCH 1/1 cpufreq: schedutil: Remove the needless sg_policy parameter to ignore_dl_rate_limit()
From: Yue Hu <[email protected]>
Since sg_policy is a member of struct sugov_cpu. Also remove the local variable in sugov_update_single_common() to make the code more clean.
Signed-off-by Yue Hu <[email protected]>
--- kernel/sched/cpufreq_schedutil.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
kernel/sched/cpufreq_schedutil.c +5 -7
@@ -320,23 +320,21 @@ static bool sugov_cpu_is_busy(struct sugov_cpu *sg_cpu)* Make sugov_should_update_freq() ignore the rate limit when DL * has increased the utilization. */ -static inline void ignore_dl_rate_limit (struct sugov_cpu *sg_cpu,struct sugov_policy *sg_policy) +static inline void ignore_dl_rate_limit (struct sugov_cpu *sg_cpu) {if (cpu_bw_dl (cpu_rq (sg_cpu->cpu)) > sg_cpu->bw_dl) - sg_policy->limits_changed = true; + sg_cpu->sg_policy->limits_changed = true; }static inline bool sugov_update_single_common (struct sugov_cpu *sg_cpu,u64 time,unsigned int flags) { -struct sugov_policy *sg_policy = sg_cpu->sg_policy; -sugov_iowait_boost (sg_cpu, time, flags); sg_cpu->last_update = time; -ignore_dl_rate_limit (sg_cpu, sg_policy); +ignore_dl_rate_limit (sg_cpu); -if (!sugov_should_update_freq (sg_policy, time)) +if (!sugov_should_update_freq (sg_cpu->sg_policy, time))return false;sugov_get_util (sg_cpu);
@@ -452,7 +450,7 @@ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time)sugov_iowait_boost (sg_cpu, time, flags); sg_cpu->last_update = time; -ignore_dl_rate_limit (sg_cpu, sg_policy); +ignore_dl_rate_limit (sg_cpu);if (sugov_should_update_freq (sg_policy, time)) { next_f =sugov_next_freq_shared (sg_cpu, time);
Signature · 1 line
1.9.1
Quoted 9 lines · Yue Hu
From: Yue Hu <[email protected]>
Since
sg_policyis a member of structsugov_cpu. Also remove the local variable insugov_update_single_common()to make the code more clean.Signed-off-by Yue Hu <[email protected]>--- kernel/sched/cpufreq_schedutil.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
Acked-by Viresh Kumar <[email protected]>
Signature · 1 line
viresh
Quoted 7 lines · Viresh Kumar
Quoted 5 lines · Yue Hu
From: Yue Hu <[email protected]>
Since
sg_policyis a member of structsugov_cpu. Also remove the local variable insugov_update_single_common()to make the code more clean.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Yue Hu <[email protected]>--- kernel/sched/cpufreq_schedutil.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)Acked-by Viresh Kumar <[email protected]>
Applied as 5.12-rc material, thanks!