diff options
author | Byungchul Park <byungchul.park@lge.com> | 2015-08-20 13:21:58 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-13 09:52:47 +0200 |
commit | 1746babbb15594ba2d8d8196589bbbc2b5ff51c9 (patch) | |
tree | 3d9d99fe4e8c2eaf0df1118a1518709c517dcab1 /kernel/sched/fair.c | |
parent | sched/fair: Have task_move_group_fair() unconditionally add the entity load t... (diff) | |
download | linux-1746babbb15594ba2d8d8196589bbbc2b5ff51c9.tar.xz linux-1746babbb15594ba2d8d8196589bbbc2b5ff51c9.zip |
sched/fair: Have task_move_group_fair() also detach entity load from the old runqueue
Since we attach the entity load to the new runqueue, we should also
detatch the entity load from the old runqueue, otherwise load can
accumulate.
Signed-off-by: Byungchul Park <byungchul.park@lge.com>
[ Rewrote the changelog. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: yuyang.du@intel.com
Link: http://lkml.kernel.org/r/1440069720-27038-4-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 959b2ea386b3..1e1fe7f796e9 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8037,8 +8037,12 @@ static void task_move_group_fair(struct task_struct *p, int queued) if (!queued && (!se->sum_exec_runtime || p->state == TASK_WAKING)) queued = 1; + cfs_rq = cfs_rq_of(se); if (!queued) - se->vruntime -= cfs_rq_of(se)->min_vruntime; + se->vruntime -= cfs_rq->min_vruntime; + + /* Synchronize task with its prev cfs_rq */ + detach_entity_load_avg(cfs_rq, se); set_task_rq(p, task_cpu(p)); se->depth = se->parent ? se->parent->depth + 1 : 0; cfs_rq = cfs_rq_of(se); |