sched/fair: Update task group's load_avg after task migration
authorYuyang Du <yuyang.du@intel.com>
Tue, 13 Oct 2015 01:18:23 +0000 (09:18 +0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Oct 2015 08:13:35 +0000 (10:13 +0200)
commit3e386d56bafbb6d2540b49367444997fc671ea69
tree24e69c43e299f8319f61be60d01914b116f2f21d
parentfde7d22e01aa0d252fc5c95fa11f0dac35a4dd59
sched/fair: Update task group's load_avg after task migration

When cfs_rq has cfs_rq->removed_load_avg set (when a task migrates from
this cfs_rq), we need to update its contribution to the group's load_avg.

This should not increase tg's update too much, because in most cases, the
cfs_rq has already decayed its load_avg.

Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Yuyang Du <yuyang.du@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
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>
Link: http://lkml.kernel.org/r/1444699103-20272-2-git-send-email-yuyang.du@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c