Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277410
b: refs/heads/master
c: 7ceff01
h: refs/heads/master
v: v3
  • Loading branch information
Daisuke Nishimura authored and Ingo Molnar committed Dec 21, 2011
1 parent a55d486 commit 53b122d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fc420c91f53e0a9f95665c6b14a1983716081e7
refs/heads/master: 7ceff013c43c0f38f0d26c79507889c6791c0ea0
13 changes: 13 additions & 0 deletions trunk/kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -5338,6 +5338,19 @@ static void task_move_group_fair(struct task_struct *p, int on_rq)
* to another cgroup's rq. This does somewhat interfere with the
* fair sleeper stuff for the first placement, but who cares.
*/
/*
* When !on_rq, vruntime of the task has usually NOT been normalized.
* But there are some cases where it has already been normalized:
*
* - Moving a forked child which is waiting for being woken up by
* wake_up_new_task().
*
* To prevent boost or penalty in the new cfs_rq caused by delta
* min_vruntime between the two cfs_rqs, we skip vruntime adjustment.
*/
if (!on_rq && !p->se.sum_exec_runtime)
on_rq = 1;

if (!on_rq)
p->se.vruntime -= cfs_rq_of(&p->se)->min_vruntime;
set_task_rq(p, task_cpu(p));
Expand Down

0 comments on commit 53b122d

Please sign in to comment.