[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1436089411-27244-1-git-send-email-byungchul.park@lge.com>
Date: Sun, 5 Jul 2015 18:43:31 +0900
From: byungchul.park@....com
To: mingo@...nel.org, peterz@...radead.org
Cc: minchan.kim@....com, linux-kernel@...r.kernel.org,
Byungchul Park <byungchul.park@....com>
Subject: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
From: Byungchul Park <byungchul.park@....com>
account_numa_dequeue and manipulating se->group_node are meaningful only on SMP
Signed-off-by: Byungchul Park <byungchul.park@....com>
---
kernel/sched/fair.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 09456fc..93b8de6 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2337,15 +2337,17 @@ account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
update_load_sub(&cfs_rq->load, se->load.weight);
if (!parent_entity(se))
update_load_sub(&rq_of(cfs_rq)->load, se->load.weight);
+#ifdef CONFIG_SMP
if (entity_is_task(se)) {
account_numa_dequeue(rq_of(cfs_rq), task_of(se));
list_del_init(&se->group_node);
}
+#endif
cfs_rq->nr_running--;
}
#ifdef CONFIG_FAIR_GROUP_SCHED
-# ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)
{
long tg_weight;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists