Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e218134 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: Force CPU capacity update from higher level sched domain"

parents 506b13a9 edd112fb
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -8789,10 +8789,12 @@ skip_unlock: __attribute__ ((unused));
		capacity = 1;

	cpu_rq(cpu)->cpu_capacity = capacity;
	if (!sd->child) {
		sdg->sgc->capacity = capacity;
		sdg->sgc->max_capacity = capacity;
		sdg->sgc->min_capacity = capacity;
	}
}

void update_group_capacity(struct sched_domain *sd, int cpu)
{
@@ -8805,8 +8807,15 @@ void update_group_capacity(struct sched_domain *sd, int cpu)
	interval = clamp(interval, 1UL, max_load_balance_interval);
	sdg->sgc->next_update = jiffies + interval;

	if (!child) {
	/*
	 * When there is only 1 CPU in the sched group of a higher
	 * level sched domain (sd->child != NULL), the load balance
	 * does not happen for the last level sched domain. Check
	 * this condition and update the CPU capacity accordingly.
	 */
	if (cpumask_weight(sched_group_cpus(sdg)) == 1) {
		update_cpu_capacity(sd, cpu);
		if (!child)
			return;
	}