From: Heechul Yun <heechul@illinois.edu>
To: pjt@google.com
Cc: linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl
Subject: [PATCH] sched: Proper initialization of root_task_group
Date: Tue, 29 Nov 2011 23:42:29 -0600 [thread overview]
Message-ID: <20111130054227.GA7808@heechul-desktop> (raw)
Hi,
The following patch fix a initialization issue.
Thanks
Heechul
---
The root_task_group.cfs_bandwidth and root_task_group.shares
were initialized multiple times unnecessarily which are corrected
by this patch.
Signed-off-by: Heechul Yun <heechul@illinois.edu>
---
kernel/sched/core.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ca8fd44..0ed6978 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6772,6 +6772,11 @@ void __init sched_init(void)
autogroup_init(&init_task);
#endif /* CONFIG_CGROUP_SCHED */
+#ifdef CONFIG_FAIR_GROUP_SCHED
+ root_task_group.shares = ROOT_TASK_GROUP_LOAD;
+ init_cfs_bandwidth(&root_task_group.cfs_bandwidth);
+#endif /* CONFIG_FAIR_GROUP_SCHED */
+
for_each_possible_cpu(i) {
struct rq *rq;
@@ -6783,7 +6788,6 @@ void __init sched_init(void)
init_cfs_rq(&rq->cfs);
init_rt_rq(&rq->rt, rq);
#ifdef CONFIG_FAIR_GROUP_SCHED
- root_task_group.shares = ROOT_TASK_GROUP_LOAD;
INIT_LIST_HEAD(&rq->leaf_cfs_rq_list);
/*
* How much cpu bandwidth does root_task_group get?
@@ -6804,7 +6808,6 @@ void __init sched_init(void)
* We achieve this by letting root_task_group's tasks sit
* directly in rq->cfs (i.e root_task_group->se[] = NULL).
*/
- init_cfs_bandwidth(&root_task_group.cfs_bandwidth);
init_tg_cfs_entry(&root_task_group, &rq->cfs, NULL, i, NULL);
#endif /* CONFIG_FAIR_GROUP_SCHED */
--
1.7.5.4
next reply other threads:[~2011-11-30 5:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 5:42 Heechul Yun [this message]
2011-11-30 10:13 ` Kamalesh Babulal
2011-11-30 11:17 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111130054227.GA7808@heechul-desktop \
--to=heechul@illinois.edu \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=pjt@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome