diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-06-14 11:04:13 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-06-14 11:04:13 +0200 |
commit | 07f9f22087a94e8162f77ee997c52a23f158aee8 (patch) | |
tree | 04bfe0395c6aa95bae5c6983c3433d9ac8eb7731 /kernel/sched/fair.c | |
parent | 03c041c5bf6ed584dff36b7cd509e0146a124277 (diff) | |
parent | b7fa30c9cc48c4f55663420472505d3b4f6e1705 (diff) | |
download | linux-07f9f22087a94e8162f77ee997c52a23f158aee8.tar.bz2 |
Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c6dd8bab010c..40d5ace002a9 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8468,8 +8468,9 @@ void free_fair_sched_group(struct task_group *tg) int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) { - struct cfs_rq *cfs_rq; struct sched_entity *se; + struct cfs_rq *cfs_rq; + struct rq *rq; int i; tg->cfs_rq = kzalloc(sizeof(cfs_rq) * nr_cpu_ids, GFP_KERNEL); @@ -8484,6 +8485,8 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) init_cfs_bandwidth(tg_cfs_bandwidth(tg)); for_each_possible_cpu(i) { + rq = cpu_rq(i); + cfs_rq = kzalloc_node(sizeof(struct cfs_rq), GFP_KERNEL, cpu_to_node(i)); if (!cfs_rq) @@ -8497,7 +8500,10 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) init_cfs_rq(cfs_rq); init_tg_cfs_entry(tg, cfs_rq, se, i, parent->se[i]); init_entity_runnable_average(se); + + raw_spin_lock_irq(&rq->lock); post_init_entity_util_avg(se); + raw_spin_unlock_irq(&rq->lock); } return 1; |