From 82f75d3edf677170b6cebf7b722ac3601fd96518 Mon Sep 17 00:00:00 2001 From: Youngtae Lee Date: Tue, 14 Nov 2017 11:18:33 +0900 Subject: [PATCH] sched: schedutil: change loop condition to get next_freq on shared policy Between CPUHP_AP_ONLINE_DYN notif for cpufreq and stopper, schedutil can not see util of hotplug out core. At this time, there is a task in the core which is hotplug out, there is a problem that utilization of these tasks is not reflected. To avoid this, schedutil sees through the online mask to find next_frequency. Change-Id: I3fc28c605edb184de390727a5f4a3eaa73a8797c Signed-off-by: Youngtae Lee --- kernel/sched/cpufreq_schedutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 0538e8bb2b10..7561b003d0f2 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -364,7 +364,7 @@ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time) unsigned long util = 0, max = 1; unsigned int j; - for_each_cpu(j, policy->cpus) { + for_each_cpu_and(j, policy->related_cpus, cpu_online_mask) { struct sugov_cpu *j_sg_cpu = &per_cpu(sugov_cpu, j); unsigned long j_util, j_max; s64 delta_ns; -- 2.20.1