sched: Use root_task_group_empty only with FAIR_GROUP_SCHED
PATCH 1/1 sched: Use root_task_group_empty only with FAIR_GROUP_SCHED
Please review. Perhaps there some usage planned in future?
-- Cyrill
---root_task_group_empty is used only withFAIR_GROUP_SCHED so if we use other scheduler
we get
kernel/sched.c:314: warning: ‘root_task_group_empty’ defined but not used
So move CONFIG_FAIR_GROUP_SCHED up that it coverroot_task_group_empty.
Signed-off-by Cyrill Gorcunov <[email protected]>
--- kernel/sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched.c +2 -1
@@ -309,6 +309,8 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(str*/ static DEFINE_SPINLOCK (task_group_lock); +#ifdef CONFIG_FAIR_GROUP_SCHED + #ifdef CONFIG_SMP static int root_task_group_empty(void) {
@@ -316,7 +318,6 @@ static int root_task_group_empty(void) }#endif -#ifdef CONFIG_FAIR_GROUP_SCHED #ifdef CONFIG_USER_SCHED # define INIT_TASK_GROUP_LOAD (2*NICE_0_LOAD)#else /* !CONFIG_USER_SCHED */
Commit-ID: e9036b36eed4d3cdb33fa9cbcdd9888ae516889f Gitweb: http://git.kernel.org/tip/e9036b36eed4d3cdb33fa9cbcdd9888ae516889f Author: Cyrill Gorcunov <[email protected]> AuthorDate: Mon, 26 Oct 2009 22:24:14 +0300 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 8 Nov 2009 13:15:48 +0100
sched: Use root_task_group_empty only with FAIR_GROUP_SCHED
root_task_group_empty is used only with FAIR_GROUP_SCHED so if we use other scheduler options we get:
kernel/sched.c:314: warning: 'root_task_group_empty' defined but not used
So move CONFIG_FAIR_GROUP_SCHED up that it covers root_task_group_empty().
Signed-off-by Cyrill Gorcunov <[email protected]>
Cc Peter Zijlstra <[email protected]>
LKML-Reference: <20091026192414.GB5321@lenovo>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/sched.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/sched.c +2 -1
@@ -309,6 +309,8 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(struct rt_rq, init_rt_rq);*/ static DEFINE_SPINLOCK (task_group_lock); +#ifdef CONFIG_FAIR_GROUP_SCHED + #ifdef CONFIG_SMP static int root_task_group_empty(void) {
@@ -316,7 +318,6 @@ static int root_task_group_empty(void) }#endif -#ifdef CONFIG_FAIR_GROUP_SCHED #ifdef CONFIG_USER_SCHED # define INIT_TASK_GROUP_LOAD (2*NICE_0_LOAD)#else /* !CONFIG_USER_SCHED */