diff options
author | 2019-01-22 16:25:01 +0000 | |
---|---|---|
committer | 2019-02-11 08:02:14 +0100 | |
commit | d0fe0b9c45c144e4ac60cf7f07f7e8ae86d3536d (patch) | |
tree | e6715bb39987a468ab5f46bf79ec4be048e40f92 /kernel/sched/core.c | |
parent | sched/fair: Fix O(nr_cgroups) in the load balancing path (diff) | |
download | wireguard-linux-d0fe0b9c45c144e4ac60cf7f07f7e8ae86d3536d.tar.xz wireguard-linux-d0fe0b9c45c144e4ac60cf7f07f7e8ae86d3536d.zip |
sched/fair: Simplify post_init_entity_util_avg() by calling it with a task_struct pointer argument
Since commit:
d03266910a53 ("sched/fair: Fix task group initialization")
the utilization of a sched entity representing a task group is no longer
initialized to any other value than 0. So post_init_entity_util_avg() is
only used for tasks, not for sched_entities.
Make this clear by calling it with a task_struct pointer argument which
also eliminates the entity_is_task(se) if condition in the fork path and
get rid of the stale comment in remove_entity_load_avg() accordingly.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Perret <quentin.perret@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20190122162501.12000-1-dietmar.eggemann@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e86e2b8f6922..6b2c055564b5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2433,7 +2433,7 @@ void wake_up_new_task(struct task_struct *p) #endif rq = __task_rq_lock(p, &rf); update_rq_clock(rq); - post_init_entity_util_avg(&p->se); + post_init_entity_util_avg(p); activate_task(rq, p, ENQUEUE_NOCLOCK); p->on_rq = TASK_ON_RQ_QUEUED; |