From: Vincent Guittot <vincent.guittot@linaro.org>
To: linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org,
peterz@infradead.org, mingo@kernel.org, fweisbec@gmail.com
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Subject: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag
Date: Tue, 29 Jan 2013 11:38:59 +0100 [thread overview]
Message-ID: <1359455940-1710-2-git-send-email-vincent.guittot@linaro.org> (raw)
In-Reply-To: <1359455940-1710-1-git-send-email-vincent.guittot@linaro.org>
On my smp platform which is made of 5 cores in 2 clusters,I have the
nr_busy_cpu field of sched_group_power struct that is not null when the
platform is fully idle. The root cause seems to be:
During the boot sequence, some CPUs reach the idle loop and set their
NOHZ_IDLE flag while waiting for others CPUs to boot. But the nr_busy_cpus
field is initialized later with the assumption that all CPUs are in the busy
state whereas some CPUs have already set their NOHZ_IDLE flag.
We clear the NOHZ_IDLE flag when nr_busy_cpus is initialized in order to
have a coherent configuration.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 257002c..fd41924 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5884,6 +5884,7 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd)
update_group_power(sd, cpu);
atomic_set(&sg->sgp->nr_busy_cpus, sg->group_weight);
+ clear_bit(NOHZ_IDLE, nohz_flags(cpu));
}
int __weak arch_sd_sibling_asym_packing(void)
--
1.7.9.5
next prev parent reply other threads:[~2013-01-29 10:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 10:38 [PATCH v2 0/2] sched: fix nr_busy_cpus Vincent Guittot
2013-01-29 10:38 ` Vincent Guittot [this message]
2013-02-01 18:03 ` [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag Frederic Weisbecker
2013-02-04 9:09 ` Vincent Guittot
2013-02-08 15:35 ` Frederic Weisbecker
2013-02-08 17:09 ` Vincent Guittot
2013-02-18 14:33 ` Frederic Weisbecker
2013-02-18 14:38 ` Frederic Weisbecker
2013-02-18 15:06 ` Vincent Guittot
2013-02-18 15:40 ` Frederic Weisbecker
2013-02-19 10:29 ` Vincent Guittot
2013-02-19 10:56 ` Vincent Guittot
2013-01-29 10:39 ` [PATCH v2 2/2] sched: fix update " Vincent Guittot
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=1359455940-1710-2-git-send-email-vincent.guittot@linaro.org \
--to=vincent.guittot@linaro.org \
--cc=fweisbec@gmail.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--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).