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

Commit 72d01d15 authored by Maria Yu's avatar Maria Yu
Browse files

sched/fair: Only strict skip for current task



Fix the issue that when a task called yield,
it is not going to schedule again if there is
always have task running in that cpu.

Change-Id: I7ec037ac5ea9be159ccb9e9db676d1b8d677746d
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
parent ec12b494
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;
	}