Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269160
b: refs/heads/master
c: f4cfb33
h: refs/heads/master
v: v3
  • Loading branch information
Wang Xingchao authored and Ingo Molnar committed Sep 26, 2011
1 parent c9ae731 commit bc99f5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: bfa322c48dc69bfdaee10faf3bd8dbc23b39a21c
refs/heads/master: f4cfb33ed980085b14a8f376281edb2e270f0244
16 changes: 8 additions & 8 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,8 @@ static void
check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
{
unsigned long ideal_runtime, delta_exec;
struct sched_entity *se;
s64 delta;

ideal_runtime = sched_slice(cfs_rq, curr);
delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
Expand All @@ -1127,16 +1129,14 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
if (delta_exec < sysctl_sched_min_granularity)
return;

if (cfs_rq->nr_running > 1) {
struct sched_entity *se = __pick_first_entity(cfs_rq);
s64 delta = curr->vruntime - se->vruntime;
se = __pick_first_entity(cfs_rq);
delta = curr->vruntime - se->vruntime;

if (delta < 0)
return;
if (delta < 0)
return;

if (delta > ideal_runtime)
resched_task(rq_of(cfs_rq)->curr);
}
if (delta > ideal_runtime)
resched_task(rq_of(cfs_rq)->curr);
}

static void
Expand Down

0 comments on commit bc99f5b

Please sign in to comment.