linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6 v5] sched: reflect sched_entity move into task_group's load
@ 2016-10-17  9:14 Vincent Guittot
  2016-10-17  9:14 ` [PATCH 1/6 v5] sched: factorize attach entity Vincent Guittot
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Vincent Guittot @ 2016-10-17  9:14 UTC (permalink / raw)
  To: peterz, mingo, linux-kernel, dietmar.eggemann
  Cc: yuyang.du, Morten.Rasmussen, linaro-kernel, pjt, bsegall,
	kernellwp, Vincent Guittot

Ensure that the move of a sched_entity will be reflected in load and
utilization of the task_group hierarchy.

When a sched_entity moves between groups or CPUs, load and utilization
of cfs_rq don't reflect the changes immediately but converge to new values.
As a result, the metrics are no more aligned with the new balance of the
load in the system and next decisions will have a biased view.

This patchset synchronizes load/utilization of sched_entity with its child
cfs_rq (se->my-q) only when tasks move to/from child cfs_rq:
-move between task group
-migration between CPUs
Otherwise, PELT is updated as usual.

This version doesn't include any changes related to discussion that have
started during the review of the previous version about:
- encapsulate the sequence for changing the propoerty of a task
- remove a cfs_rq from list during update_blocked_averages  
These topics don't gain anything from being added in this patchset as they
are fairly independent and deserve a separate patch.

Changes since v4:
- minor typo and commit message changes
- move call to cfs_rq_clock_task(cfs_rq) in post_init_entity_util_avg

Changes since v3:
- Replaced the 2 arguments of update_load_avg by 1 flags argument
- Propagated move in runnable_load_avg when sched_entity is already on_rq
- Ensure that intermediate value will not reach memory when updating load and
  utilization
- Optimize the the calculation of load_avg of the sched_entity
- Fixed some typo

Changes since v2:
- Propagate both utilization and load
- Synced sched_entity and se->my_q instead of adding the delta

Changes since v1:
- This patch needs the patch that fixes issue with rq->leaf_cfs_rq_list
  "sched: fix hierarchical order in rq->leaf_cfs_rq_list" in order to work
  correctly. I haven't sent them as a single patchset because the fix is
  independent of this one
- Merge some functions that are always used together
- During update of blocked load, ensure that the sched_entity is synced
  with the cfs_rq applying changes
- Fix an issue when task changes its cpu affinity

Vincent Guittot (6):
  sched: factorize attach entity
  sched: fix hierarchical order in rq->leaf_cfs_rq_list
  sched: factorize PELT update
  sched: propagate load during synchronous attach/detach
  sched: propagate asynchrous detach
  sched: fix task group initialization

 kernel/sched/core.c  |   1 +
 kernel/sched/fair.c  | 359 +++++++++++++++++++++++++++++++++++++++++----------
 kernel/sched/sched.h |   2 +
 3 files changed, 292 insertions(+), 70 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-10-26 18:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17  9:14 [PATCH 0/6 v5] sched: reflect sched_entity move into task_group's load Vincent Guittot
2016-10-17  9:14 ` [PATCH 1/6 v5] sched: factorize attach entity Vincent Guittot
2016-10-17  9:14 ` [PATCH 2/6 v5] sched: fix hierarchical order in rq->leaf_cfs_rq_list Vincent Guittot
2016-10-17  9:14 ` [PATCH 3/6 v5] sched: factorize PELT update Vincent Guittot
2016-10-26 11:41   ` Peter Zijlstra
2016-10-26 12:56     ` Vincent Guittot
2016-10-17  9:14 ` [PATCH 4/6 v5] sched: propagate load during synchronous attach/detach Vincent Guittot
2016-10-21 12:19   ` Dietmar Eggemann
2016-10-26  7:05     ` Vincent Guittot
2016-10-26 11:16       ` Peter Zijlstra
2016-10-26 12:31         ` Vincent Guittot
2016-10-26 10:54   ` Peter Zijlstra
2016-10-26 12:31     ` Vincent Guittot
2016-10-26 14:28       ` Peter Zijlstra
2016-10-26 18:40         ` Vincent Guittot
2016-10-26 11:45   ` Peter Zijlstra
2016-10-17  9:14 ` [PATCH 5/6 v5] sched: propagate asynchrous detach Vincent Guittot
2016-10-17  9:14 ` [PATCH 6/6 v5] sched: fix task group initialization Vincent Guittot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).