diff options
author | Kirill Tkhai <ktkhai@parallels.com> | 2014-12-15 14:56:58 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-01-14 13:34:16 +0100 |
commit | bb04159df99fa353d0fb524574aca03ce2c6515b (patch) | |
tree | 1ea21466b45395836fb0fd6abb6398eb012b135b /kernel/sched/fair.c | |
parent | 1f8a7633094b7886c0677b78ba60b82e501f3ce6 (diff) |
sched/fair: Fix sched_entity::avg::decay_count initialization
Child has the same decay_count as parent. If it's not zero,
we add it to parent's cfs_rq->removed_load:
wake_up_new_task()->set_task_cpu()->migrate_task_rq_fair().
Child's load is a just garbade after copying of parent,
it hasn't been on cfs_rq yet, and it must not be added to
cfs_rq::removed_load in migrate_task_rq_fair().
The patch moves sched_entity::avg::decay_count intialization
in sched_fork(). So, migrate_task_rq_fair() does not change
removed_load.
Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ben Segall <bsegall@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1418644618.6074.13.camel@tkhai
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 97000a99a293..2a0b302e51de 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -676,7 +676,6 @@ void init_task_runnable_average(struct task_struct *p) { u32 slice; - p->se.avg.decay_count = 0; slice = sched_slice(task_cfs_rq(p), &p->se) >> 10; p->se.avg.runnable_avg_sum = slice; p->se.avg.runnable_avg_period = slice; |