|
@@ -837,7 +837,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
|
|
struct task_struct *curr = rq->curr;
|
|
struct task_struct *curr = rq->curr;
|
|
struct cfs_rq *cfs_rq = task_cfs_rq(curr);
|
|
struct cfs_rq *cfs_rq = task_cfs_rq(curr);
|
|
struct sched_entity *se = &curr->se, *pse = &p->se;
|
|
struct sched_entity *se = &curr->se, *pse = &p->se;
|
|
- s64 delta, gran;
|
|
|
|
|
|
+ unsigned long gran;
|
|
|
|
|
|
if (unlikely(rt_prio(p->prio))) {
|
|
if (unlikely(rt_prio(p->prio))) {
|
|
update_rq_clock(rq);
|
|
update_rq_clock(rq);
|
|
@@ -860,12 +860,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
|
|
pse = parent_entity(pse);
|
|
pse = parent_entity(pse);
|
|
}
|
|
}
|
|
|
|
|
|
- delta = se->vruntime - pse->vruntime;
|
|
|
|
gran = sysctl_sched_wakeup_granularity;
|
|
gran = sysctl_sched_wakeup_granularity;
|
|
if (unlikely(se->load.weight != NICE_0_LOAD))
|
|
if (unlikely(se->load.weight != NICE_0_LOAD))
|
|
gran = calc_delta_fair(gran, &se->load);
|
|
gran = calc_delta_fair(gran, &se->load);
|
|
|
|
|
|
- if (delta > gran)
|
|
|
|
|
|
+ if (pse->vruntime + gran < se->vruntime)
|
|
resched_task(curr);
|
|
resched_task(curr);
|
|
}
|
|
}
|
|
|
|
|