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

Commit 15d7aefb 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: Only strict skip for current task"

parents ff7779fe 72d01d15
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3914,6 +3914,7 @@ pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr)
{
	struct sched_entity *left = __pick_first_entity(cfs_rq);
	struct sched_entity *se;
	bool strict_skip = false;

	/*
	 * If curr is set we have to see if its left of the leftmost entity
@@ -3933,13 +3934,15 @@ pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr)

		if (se == curr) {
			second = __pick_first_entity(cfs_rq);
			if (sched_feat(STRICT_SKIP_BUDDY))
				strict_skip = true;
		} else {
			second = __pick_next_entity(se);
			if (!second || (curr && entity_before(curr, second)))
				second = curr;
		}

		if (second && (sched_feat(STRICT_SKIP_BUDDY) ||
		if (second && (strict_skip ||
		    wakeup_preempt_entity(second, left) < 1))
			se = second;
	}