Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1689700

[PATCH] cpufreq: schedutil: Update last_update from sugov_set_iowait_boost()

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject [PATCH] cpufreq: schedutil: Update last_update from sugov_set_iowait_boost()
Date 2017-07-18 07:00 +0200
Message-ID <u4sM2-6i8-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


sg_cpu->last_update is always updated right after we call
sugov_set_iowait_boost() and its better to update it from that routine
itself. This makes it more readable.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 kernel/sched/cpufreq_schedutil.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 29a397067ffa..63557b9f36b6 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -177,6 +177,8 @@ static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
 		if (delta_ns > TICK_NSEC)
 			sg_cpu->iowait_boost = 0;
 	}
+
+	sg_cpu->last_update = time;
 }
 
 static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, unsigned long *util,
@@ -219,7 +221,6 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
 	bool busy;
 
 	sugov_set_iowait_boost(sg_cpu, time, flags);
-	sg_cpu->last_update = time;
 
 	if (!sugov_should_update_freq(sg_policy, time))
 		return;
@@ -299,7 +300,6 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,
 	sg_cpu->flags = flags;
 
 	sugov_set_iowait_boost(sg_cpu, time, flags);
-	sg_cpu->last_update = time;
 
 	if (sugov_should_update_freq(sg_policy, time)) {
 		if (flags & SCHED_CPUFREQ_RT_DL)
-- 
2.13.0.71.gd7076ec9c9cb

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] cpufreq: schedutil: Update last_update from sugov_set_iowait_boost() Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-18 07:00 +0200
  Re: [PATCH] cpufreq: schedutil: Update last_update from  sugov_set_iowait_boost() Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-18 13:30 +0200
    Re: [PATCH] cpufreq: schedutil: Update last_update from  sugov_set_iowait_boost() Juri Lelli <Juri.Lelli@arm.com> - 2017-07-18 13:40 +0200
      Re: [PATCH] cpufreq: schedutil: Update last_update from sugov_set_iowait_boost() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-19 00:30 +0200
  Re: [PATCH] cpufreq: schedutil: Update last_update from  sugov_set_iowait_boost() Juri Lelli <Juri.Lelli@arm.com> - 2017-07-18 13:30 +0200

csiph-web