Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73406
b: refs/heads/master
c: 502d26b
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Nov 9, 2007
1 parent f29c9e1 commit c4547c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77d9cc44b543fa831169e54c495ad06ef3a0c726
refs/heads/master: 502d26b524d8980f3ed80d9aec398e85671a8160
5 changes: 2 additions & 3 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,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, gran;
unsigned long gran;

if (unlikely(rt_prio(p->prio))) {
update_rq_clock(rq);
Expand All @@ -860,12 +860,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
pse = parent_entity(pse);
}

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 > gran)
if (pse->vruntime + gran < se->vruntime)
resched_task(curr);
}

Expand Down

0 comments on commit c4547c1

Please sign in to comment.