Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50a2a3b2 authored by Byungchul Park's avatar Byungchul Park Committed by Ingo Molnar
Browse files

sched/fair: Have task_move_group_fair() unconditionally add the entity load to the runqueue



Currently we conditionally add the entity load to the rq when moving
the task between cgroups.

This doesn't make sense as we always 'migrate' the task between
cgroups, so we should always migrate the load too.

[ The history here is that we used to only migrate the blocked load
  which was only meaningfull when !queued. ]

Signed-off-by: default avatarByungchul Park <byungchul.park@lge.com>
[ Rewrote the changelog. ]
Signed-off-by: default avatarPeter 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-3-git-send-email-byungchul.park@lge.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent a05e8c51
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -8041,14 +8041,13 @@ static void task_move_group_fair(struct task_struct *p, int queued)
		se->vruntime -= cfs_rq_of(se)->min_vruntime;
		se->vruntime -= cfs_rq_of(se)->min_vruntime;
	set_task_rq(p, task_cpu(p));
	set_task_rq(p, task_cpu(p));
	se->depth = se->parent ? se->parent->depth + 1 : 0;
	se->depth = se->parent ? se->parent->depth + 1 : 0;
	if (!queued) {
	cfs_rq = cfs_rq_of(se);
	cfs_rq = cfs_rq_of(se);
	if (!queued)
		se->vruntime += cfs_rq->min_vruntime;
		se->vruntime += cfs_rq->min_vruntime;


	/* Virtually synchronize task with its new cfs_rq */
	/* Virtually synchronize task with its new cfs_rq */
	attach_entity_load_avg(cfs_rq, se);
	attach_entity_load_avg(cfs_rq, se);
}
}
}


void free_fair_sched_group(struct task_group *tg)
void free_fair_sched_group(struct task_group *tg)
{
{