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

Commit 379daaaa authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: Only kick nohz balance when runqueue has more than 1 task"

parents 22fe96ab 20017f33
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -11209,13 +11209,16 @@ static inline bool nohz_kick_needed(struct rq *rq, bool only_update)
	if (time_before(now, nohz.next_balance))
		return false;

	/*
	 * If energy aware is enabled, do idle load balance if runqueue has
	 * at least 2 tasks and cpu is overutilized
	 */
	if (rq->nr_running >= 2 &&
	    (!energy_aware() || cpu_overutilized(cpu)))
		return true;

	/* Do idle load balance if there have misfit task */
	if (energy_aware())
		return rq_has_misfit(rq);
		return false;

	rcu_read_lock();
	sds = rcu_dereference(per_cpu(sd_llc_shared, cpu));