Re: NOHZ: WARNING: at arch/x86/kernel/smp.c:123native_smp_send_reschedule

From: Paul E. McKenney
Date: Wed May 15 2013 - 14:51:45 EST


On Thu, May 09, 2013 at 02:58:59PM +0200, Borislav Petkov wrote:
> On Thu, May 09, 2013 at 02:50:40PM +0200, Borislav Petkov wrote:
> > Looks like we're sending a resched IPI to a cpu which is not online
> > yet in order to start the MCE polling timer. So the rcu* options are
> > kinda unlikely to be related, AFAICT.
>
> On a second thought, they must be somehow indirectly related because I
> had "rcu_nocbs=4-7" on the command line and have the warning on the same
> CPUs: 4 - 7.
>
> Actually, NO_HZ_FULL_ALL makes all CPUs full dynticks so I'd guess the
> RCU callback offloading happens on all of them, thus the warning can
> happen on every CPU which is in full dynticks mode but not online yet.

Does the following patch help?

Thanx, Paul

------------------------------------------------------------------------

diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 63098a5..68b1f26 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -2371,7 +2371,7 @@ static bool init_nocb_callback_list(struct rcu_data *rdp)
static void rcu_kick_nohz_cpu(int cpu)
{
#ifdef CONFIG_NO_HZ_FULL
- if (tick_nohz_full_cpu(cpu))
+ if (tick_nohz_full_cpu(cpu) && cpu_online(cpu))
smp_send_reschedule(cpu);
#endif /* #ifdef CONFIG_NO_HZ_FULL */
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/