Skip to content

Commit

Permalink
sched: remove condition from set_task_cpu()
Browse files Browse the repository at this point in the history
remove condition from set_task_cpu(). Now that ->vruntime
is not global anymore, it should (and does) work fine without
it too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
  • Loading branch information
Ingo Molnar committed Oct 15, 2007
1 parent 8465e79 commit 785c29e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
if (p->se.block_start)
p->se.block_start -= clock_offset;
#endif
if (likely(new_rq->cfs.min_vruntime))
p->se.vruntime -= old_rq->cfs.min_vruntime -
new_rq->cfs.min_vruntime;
p->se.vruntime -= old_rq->cfs.min_vruntime - new_rq->cfs.min_vruntime;

__set_task_cpu(p, new_cpu);
}
Expand Down

0 comments on commit 785c29e

Please sign in to comment.