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

Commit 810e95cc authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched: another wakeup_granularity fix



unit mis-match: wakeup_gran was used against a vruntime

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a58f6f25
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -818,7 +818,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
	struct task_struct *curr = rq->curr;
	struct cfs_rq *cfs_rq = task_cfs_rq(curr);
	struct sched_entity *se = &curr->se, *pse = &p->se;
	s64 delta;
	s64 delta, gran;

	if (unlikely(rt_prio(p->prio))) {
		update_rq_clock(rq);
@@ -833,8 +833,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
	}

	delta = se->vruntime - pse->vruntime;
	gran = sysctl_sched_wakeup_granularity;
	if (unlikely(se->load.weight != NICE_0_LOAD))
		gran = calc_delta_fair(gran, &se->load);

	if (delta > (s64)sysctl_sched_wakeup_granularity)
	if (delta > gran)
		resched_task(curr);
}