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

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

Merge "sched/fair: Consider task affinity while skipping a sched group"

parents abc63c08 b0df0e53
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -761,7 +761,12 @@ static bool eval_need(struct cluster_data *cluster)
	if (new_need > cluster->active_cpus) {
		ret = 1;
	} else {
		if (new_need == last_need) {
		/*
		 * When there is no change in need and there are no more
		 * active CPUs than currently needed, just update the
		 * need time stamp and return.
		 */
		if (new_need == last_need && new_need == cluster->active_cpus) {
			cluster->need_ts = now;
			spin_unlock_irqrestore(&state_lock, flags);
			return 0;
+7 −0
Original line number Diff line number Diff line
@@ -7053,6 +7053,13 @@ static inline bool skip_sg(struct task_struct *p, struct sched_group *sg,
	if (!sg->group_weight)
		return true;

	/*
	 * Don't skip a group if a task affinity allows it
	 * to run only on that group.
	 */
	if (cpumask_subset(&p->cpus_allowed, sched_group_span(sg)))
		return false;

	if (!task_fits_max(p, fcpu))
		return true;