All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Michael Wang <wangyun@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org, Suresh Siddha <suresh.b.siddha@intel.com>,
	Venkatesh Pallipadi <venki@google.com>
Subject: Re: WARNING: cpu_is_offline() at native_smp_send_reschedule()
Date: Fri, 07 Sep 2012 09:23:16 +0200	[thread overview]
Message-ID: <1347002596.18408.84.camel@twins> (raw)
In-Reply-To: <20120907012058.GA9000@localhost>

On Fri, 2012-09-07 at 09:20 +0800, Fengguang Wu wrote:

> FYI, the bisect result is
> 
> commit 554cecaf733623b327eef9652b65965eb1081b81
> Author: Diwakar Tundlam <dtundlam@nvidia.com>
> Date:   Wed Mar 7 14:44:26 2012 -0800
> 
>     sched/nohz: Correctly initialize 'next_balance' in 'nohz' idle balancer
> 
>     The 'next_balance' field of 'nohz' idle balancer must be initialized
>     to jiffies. Since jiffies is initialized to negative 300 seconds the
>     'nohz' idle balancer does not run for the first 300s (5mins) after
>     bootup. If no new processes are spawed or no idle cycles happen, the
>     load on the cpus will remain unbalanced for that duration.
> 
>     Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
>     Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>     Link: http://lkml.kernel.org/r/1DD7BFEDD3147247B1355BEFEFE4665237994F30EF@HQMAIL04.nvidia.com
>     Signed-off-by: Ingo Molnar <mingo@elte.hu>

Oh fun.. does the below 'fix' it?

The thing I'm thinking of a tick happening right after we set jiffies
but before the zalloc (specifically the memset(0)) is complete. Since
we've already registered the softirq we can end up in the load-balancer
and see a completely weird idle mask.

Hmm?

---
 kernel/sched/fair.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1ca4fe4..ac57bb6 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5346,13 +5346,12 @@ void print_cfs_stats(struct seq_file *m, int
cpu)
 __init void init_sched_fair_class(void)
 {
 #ifdef CONFIG_SMP
-	open_softirq(SCHED_SOFTIRQ, run_rebalance_domains);
-
 #ifdef CONFIG_NO_HZ
 	nohz.next_balance = jiffies;
 	zalloc_cpumask_var(&nohz.idle_cpus_mask, GFP_NOWAIT);
 	cpu_notifier(sched_ilb_notifier, 0);
 #endif
-#endif /* SMP */
 
+	open_softirq(SCHED_SOFTIRQ, run_rebalance_domains);
+#endif /* SMP */
 }



  parent reply	other threads:[~2012-09-07  7:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05  1:11 WARNING: cpu_is_offline() at native_smp_send_reschedule() Fengguang Wu
2012-09-05  4:35 ` Michael Wang
2012-09-05 10:54   ` Peter Zijlstra
2012-09-05 12:57     ` Fengguang Wu
2012-09-07  1:20       ` Fengguang Wu
2012-09-07  3:08         ` Michael Wang
2012-09-07  7:23         ` Peter Zijlstra [this message]
2012-09-07  8:17           ` Fengguang Wu

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=1347002596.18408.84.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=venki@google.com \
    --cc=wangyun@linux.vnet.ibm.com \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.