Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69078
b: refs/heads/master
c: 8651a86
h: refs/heads/master
v: v3
  • Loading branch information
Srivatsa Vaddagiri authored and Ingo Molnar committed Oct 15, 2007
1 parent e2fece0 commit 19bfbf4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 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: 57cb499df26d80ec11cd49e56d20835334ac4ab9
refs/heads/master: 8651a86c342ab79a956afec0c5971acaad38d3a1
21 changes: 16 additions & 5 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,19 +796,30 @@ static void yield_task_fair(struct rq *rq)
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 cfs_rq *cfs_rq = task_cfs_rq(curr), *pcfs_rq;
struct sched_entity *se = &curr->se, *pse = &p->se;

if (unlikely(rt_prio(p->prio))) {
update_rq_clock(rq);
update_curr(cfs_rq);
resched_task(curr);
return;
}
if (is_same_group(curr, p)) {
s64 delta = curr->se.vruntime - p->se.vruntime;

if (delta > (s64)sysctl_sched_wakeup_granularity)
resched_task(curr);
for_each_sched_entity(se) {
cfs_rq = cfs_rq_of(se);
pcfs_rq = cfs_rq_of(pse);

if (cfs_rq == pcfs_rq) {
s64 delta = se->vruntime - pse->vruntime;

if (delta > (s64)sysctl_sched_wakeup_granularity)
resched_task(curr);
break;
}
#ifdef CONFIG_FAIR_GROUP_SCHED
pse = pse->parent;
#endif
}
}

Expand Down

0 comments on commit 19bfbf4

Please sign in to comment.