ANDROID: sched/fair: update_max_interval() active_mask dependant

Adding support in update_max_interval() for incomplete HP _cpu_down, where
cpu_active_mask != cpu_online_mask. This situation can happen in the event
of a partial _cpu_down. i.e. _cpu_down(target) where
target > CPUHP_AP_OFFLINE.

Bug: 161210528
Change-Id: Ia422057c65f16dc9aa8f6d272098b2308b00f0ac
Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
This commit is contained in:
Vincent Donnefort
2020-08-13 19:24:52 +01:00
committed by Todd Kjos
parent b05fe6b580
commit 75d6951cf8
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -6971,6 +6971,8 @@ int sched_cpu_activate(unsigned int cpu)
}
rq_unlock_irqrestore(rq, &rf);
update_max_interval();
return 0;
}
@@ -7005,6 +7007,9 @@ int sched_cpu_deactivate(unsigned int cpu)
return ret;
}
sched_domains_numa_masks_clear(cpu);
update_max_interval();
return 0;
}
@@ -7013,7 +7018,6 @@ static void sched_rq_cpu_starting(unsigned int cpu)
struct rq *rq = cpu_rq(cpu);
rq->calc_load_update = calc_load_update;
update_max_interval();
}
int sched_cpu_starting(unsigned int cpu)
@@ -7045,7 +7049,6 @@ int sched_cpu_dying(unsigned int cpu)
trace_android_rvh_sched_cpu_dying(cpu);
calc_load_migrate(rq);
update_max_interval();
nohz_balance_exit_idle(rq);
hrtick_clear(rq);
return 0;
+1 -1
View File
@@ -10033,7 +10033,7 @@ static DEFINE_SPINLOCK(balancing);
*/
void update_max_interval(void)
{
max_load_balance_interval = HZ*num_online_cpus()/10;
max_load_balance_interval = HZ*num_active_cpus()/10;
}
/*