diff mbox series

[1/4] cpufreq: schedutil: Initialize sg_cpu->flags to 0

Message ID 763feda6424ced8486b25a0c52979634e6104478.1513158452.git.viresh.kumar@linaro.org
State Accepted
Commit 6257e7047890084fbeeb84c641200b43f0668abc
Headers show
Series sched: cpufreq: Track util update flags | expand

Commit Message

Viresh Kumar Dec. 13, 2017, 9:53 a.m. UTC
Initializing sg_cpu->flags to SCHED_CPUFREQ_RT has no obvious benefit.
The flags field wouldn't be used until the utilization update handler is
called for the first time, and once that is called we will overwrite
flags anyway.

Initialize it to 0.

Change-Id: I028dbb40c5c242cff52fe1b14aeaff37f29a2f8d
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

---
 kernel/sched/cpufreq_schedutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.15.0.194.g9af6a3dea062

Comments

Juri Lelli Dec. 13, 2017, 11:13 a.m. UTC | #1
Hi Viresh,

On 13/12/17 15:23, Viresh Kumar wrote:
> Initializing sg_cpu->flags to SCHED_CPUFREQ_RT has no obvious benefit.

> The flags field wouldn't be used until the utilization update handler is

> called for the first time, and once that is called we will overwrite

> flags anyway.

> 

> Initialize it to 0.

> 

> Change-Id: I028dbb40c5c242cff52fe1b14aeaff37f29a2f8d


Without ^

> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>


Reviewed-by: Juri Lelli <juri.lelli@redhat.com>


Best,

- Juri
Viresh Kumar Dec. 13, 2017, 11:22 a.m. UTC | #2
On 13-12-17, 12:13, Juri Lelli wrote:
> Hi Viresh,

> 

> On 13/12/17 15:23, Viresh Kumar wrote:

> > Initializing sg_cpu->flags to SCHED_CPUFREQ_RT has no obvious benefit.

> > The flags field wouldn't be used until the utilization update handler is

> > called for the first time, and once that is called we will overwrite

> > flags anyway.

> > 

> > Initialize it to 0.

> > 

> > Change-Id: I028dbb40c5c242cff52fe1b14aeaff37f29a2f8d

> 

> Without ^


Wow. I have a script in place to make sure this doesn't get added. Not sure how
this got added here, while its not present in any of the other patches.

> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

> 

> Reviewed-by: Juri Lelli <juri.lelli@redhat.com>

> 

> Best,

> 

> - Juri


-- 
viresh
diff mbox series

Patch

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 2f52ec0f1539..e8ccfa30f01a 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -655,7 +655,7 @@  static int sugov_start(struct cpufreq_policy *policy)
 		memset(sg_cpu, 0, sizeof(*sg_cpu));
 		sg_cpu->cpu = cpu;
 		sg_cpu->sg_policy = sg_policy;
-		sg_cpu->flags = SCHED_CPUFREQ_RT;
+		sg_cpu->flags = 0;
 		sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq;
 	}