linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: bobby.prani@gmail.com, linux-kernel@vger.kernel.org,
	mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
	peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com,
	edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com,
	oleg@redhat.com, sbw@mit.edu, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH RFC tip/core/rcu 1/2] rcu: Rationalize kthread spawning
Date: Thu, 17 Jul 2014 17:04:13 -0700	[thread overview]
Message-ID: <20140718000413.GF8690@linux.vnet.ibm.com> (raw)
In-Reply-To: <53C7F37D.1060100@oracle.com>

On Thu, Jul 17, 2014 at 12:02:05PM -0400, Sasha Levin wrote:
> On 07/17/2014 01:33 AM, Paul E. McKenney wrote:
> > On Wed, Jul 16, 2014 at 10:57:39PM -0400, Sasha Levin wrote:
> >> On 07/14/2014 06:06 AM, Paul E. McKenney wrote:
> >>> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> >>>
> >>> Currently, RCU spawns kthreads from several different early_initcall()
> >>> functions.  Although this has served RCU well for quite some time,
> >>> as more kthreads are added a more deterministic approach is required.
> >>> This commit therefore causes all of RCU's early-boot kthreads to be
> >>> spawned from a single early_initcall() function.
> >>>
> >>> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> >>
> >> Hey Paul,
> >>
> >> I've updated to today's -next and my VM started hanging on boot. Bisect
> >> pointed out this patch.
> >>
> >> I don't have any further info right now, but can provide whatever you'll
> >> find useful.
> > 
> > Could you please add initcall_debug to qemu's -append list?  If sysrq-T
> > works that early, its output would be helpful as well.
> > 
> > Your .config would also be helpful.
> 
> Hi Pranith, Paul,
> 
> I've attached my boot log with initcall_debug, as well as the .config.

Hello, Sasha,

Looks like you might have run into the same thing that Ingo ran into.
Could you please try the following patch?  (Or wait for it to show up
in the next -next, if you prefer.)

							Thanx, Paul

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

rcu: Allow for NULL tick_nohz_full_mask when nohz_full= missing

If there isn't a nohz_full= kernel parameter specified, then
tick_nohz_full_mask can legitimately be NULL.  This can cause
problems when RCU's boot code tries to cpumask_or() this value into
rcu_nocb_mask.  In addition, if NO_HZ_FULL_ALL=y, there is no point
in doing the cpumask_or() in the first place because this will cause
RCU_NOCB_CPU_ALL=y, which in turn will have all bits already set in
rcu_nocb_mask.

This commit therefore avoids the cpumask_or() if NO_HZ_FULL_ALL=y
and checks for !tick_nohz_full_running otherwise, this latter check
catching cases when there was no nohz_full= kernel parameter specified.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index f62b7f2f6abd..00dc411e9676 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2479,9 +2479,10 @@ static void __init rcu_spawn_nocb_kthreads(struct rcu_state *rsp)
 
 	if (rcu_nocb_mask == NULL)
 		return;
-#ifdef CONFIG_NO_HZ_FULL
-	cpumask_or(rcu_nocb_mask, rcu_nocb_mask, tick_nohz_full_mask);
-#endif /* #ifdef CONFIG_NO_HZ_FULL */
+#if defined(CONFIG_NO_HZ_FULL) && !defined(CONFIG_NO_HZ_FULL_ALL)
+	if (tick_nohz_full_running)
+		cpumask_or(rcu_nocb_mask, rcu_nocb_mask, tick_nohz_full_mask);
+#endif /* #if defined(CONFIG_NO_HZ_FULL) && !defined(CONFIG_NO_HZ_FULL_ALL) */
 	if (ls == -1) {
 		ls = int_sqrt(nr_cpu_ids);
 		rcu_nocb_leader_stride = ls;


  parent reply	other threads:[~2014-07-18  0:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 10:06 [PATCH RFC tip/core/rcu 0/2] NOCB kthread economization patches Paul E. McKenney
2014-07-14 10:06 ` [PATCH RFC tip/core/rcu 1/2] rcu: Rationalize kthread spawning Paul E. McKenney
2014-07-14 10:06   ` [PATCH RFC tip/core/rcu 2/2] rcu: Create rcuo kthreads only for onlined CPUs Paul E. McKenney
2014-07-14 16:48     ` Pranith Kumar
2014-07-16 12:02       ` Paul E. McKenney
2014-07-18 11:17     ` Sasha Levin
2014-07-18 12:55       ` Paul E. McKenney
2014-07-18 13:10         ` Sasha Levin
2014-07-17  2:57   ` [PATCH RFC tip/core/rcu 1/2] rcu: Rationalize kthread spawning Sasha Levin
2014-07-17  4:02     ` Pranith Kumar
2014-07-17  5:33     ` Paul E. McKenney
     [not found]       ` <53C7F37D.1060100@oracle.com>
2014-07-18  0:04         ` Paul E. McKenney [this message]
2014-07-14 11:21 ` [PATCH RFC tip/core/rcu 0/2] NOCB kthread economization patches Josh Triplett

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=20140718000413.GF8690@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=niv@us.ibm.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sasha.levin@oracle.com \
    --cc=sbw@mit.edu \
    --cc=tglx@linutronix.de \
    /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).