Re: [PATCH RFC] sched/fair: let cpu's cfs_rq to reflect task migration

From: Peter Zijlstra
Date: Fri Apr 01 2016 - 15:49:57 EST


On Sat, Apr 02, 2016 at 12:38:37AM +0800, Leo Yan wrote:
> When task is migrated from CPU_A to CPU_B, scheduler will decrease
> the task's load/util from the task's cfs_rq and also add them into
> migrated cfs_rq. But if kernel enables CONFIG_FAIR_GROUP_SCHED then this
> cfs_rq is not the same one with cpu's cfs_rq. As a result, after task is
> migrated to CPU_B, then CPU_A still have task's stale value for
> load/util; on the other hand CPU_B also cannot reflect new load/util
> which introduced by the task.
>
> So this patch is to operate the task's load/util to cpu's cfs_rq, so
> finally cpu's cfs_rq can really reflect task's migration.

Sorry but that is unintelligible.

What is the problem? Why do we care? How did you fix it? and at what
cost?