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

Commit 371d69c5 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: Only strict skip for current task"

parents 068b5e30 7badbcc3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4226,6 +4226,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
@@ -4245,13 +4246,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;
	}