linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: byungchul.park@lge.com
To: mingo@kernel.org, peterz@infradead.org
Cc: minchan.kim@lge.com, linux-kernel@vger.kernel.org,
	Byungchul Park <byungchul.park@lge.com>
Subject: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
Date: Sun,  5 Jul 2015 18:43:31 +0900	[thread overview]
Message-ID: <1436089411-27244-1-git-send-email-byungchul.park@lge.com> (raw)

From: Byungchul Park <byungchul.park@lge.com>

account_numa_dequeue and manipulating se->group_node are meaningful only on SMP

Signed-off-by: Byungchul Park <byungchul.park@lge.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


             reply	other threads:[~2015-07-05  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-05  9:43 byungchul.park [this message]
2015-07-06 11:27 ` [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system Peter Zijlstra
2015-07-06 12:05   ` Byungchul Park
2016-08-25  6:56 ` Byungchul Park
2016-08-26  3:00   ` Byungchul Park

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=1436089411-27244-1-git-send-email-byungchul.park@lge.com \
    --to=byungchul.park@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan.kim@lge.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).