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

Commit 1020387f authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched: rt-group: reduce rescheduling



Only reschedule if the new group has a higher prio task.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 37bb6cb4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -94,8 +94,11 @@ static void sched_rt_ratio_enqueue(struct rt_rq *rt_rq)
	struct sched_rt_entity *rt_se = rt_rq->rt_se;

	if (rt_se && !on_rt_rq(rt_se) && rt_rq->rt_nr_running) {
		struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;

		enqueue_rt_entity(rt_se);
		resched_task(rq_of_rt_rq(rt_rq)->curr);
		if (rt_rq->highest_prio < curr->prio)
			resched_task(curr);
	}
}