From: Borislav Petkov <bp@alien8.de>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, lv.zheng@intel.com,
stan.kain@gmail.com, waffolz@hotmail.com, josh@joshtriplett.org,
rostedt@goodmis.org, mathieu.desnoyers@efficios.com,
jiangshanlai@gmail.com, mingo@kernel.org,
torvalds@linux-foundation.org, rafael@kernel.org
Subject: Re: [PATCH] rcu: Narrow early boot window of illegal synchronous grace periods
Date: Fri, 13 Jan 2017 18:02:54 +0100 [thread overview]
Message-ID: <20170113170254.qtozzrewvoa6qct7@pd.tnic> (raw)
In-Reply-To: <20170113023807.GA27120@linux.vnet.ibm.com>
On Thu, Jan 12, 2017 at 06:38:07PM -0800, Paul E. McKenney wrote:
> The current preemptible RCU implementation goes through three phases
> during bootup. In the first phase, there is only one CPU that is running
> with preemption disabled, so that a no-op is a synchronous grace period.
> In the second mid-boot phase, the scheduler is running, but RCU has
> not yet gotten its kthreads spawned (and, for expedited grace periods,
> workqueues are not yet running. During this time, any attempt to do
> a synchronous grace period will hang the system (or complain bitterly,
> depending). In the third and final phase, RCU is fully operational and
> everything works normally.
>
> This has been OK for some time, but there has recently been some
> synchronous grace periods showing up during the second mid-boot phase.
> This commit therefore reworks RCU to permit synchronous grace periods
> to proceed during this mid-boot phase.
>
> This commit accomplishes this by setting a flag from the existing
> rcu_scheduler_starting() function which causes all synchronous grace
> periods to take the expedited path. The expedited path now checks this
> flag, using the requesting task to drive the expedited grace period
> forward during the mid-boot phase. Finally, this flag is updated by a
> core_initcall() function named rcu_exp_runtime_mode(), which causes the
> runtime codepaths to be used.
>
> Note that this arrangement assumes that tasks are not sent POSIX signals
> (or anything similar) from the time that the first task is spawned
> through core_initcall() time.
>
> Reported-by: "Zheng, Lv" <lv.zheng@intel.com>
> Reported-by: Borislav Petkov <bp@alien8.de>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested on a bunch of boxes I have access to, looks good.
Tested-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
prev parent reply other threads:[~2017-01-13 17:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 2:38 [PATCH] rcu: Narrow early boot window of illegal synchronous grace periods Paul E. McKenney
2017-01-13 11:25 ` Borislav Petkov
2017-01-14 8:00 ` Paul E. McKenney
2017-01-14 10:35 ` Borislav Petkov
2017-01-14 12:27 ` Rafael J. Wysocki
2017-01-14 12:50 ` Borislav Petkov
2017-01-16 1:57 ` Zheng, Lv
2017-01-16 4:56 ` Paul E. McKenney
2017-01-15 5:24 ` Paul E. McKenney
2017-01-15 10:09 ` Borislav Petkov
2017-01-15 20:33 ` Paul E. McKenney
2017-01-13 17:02 ` Borislav Petkov [this message]
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=20170113170254.qtozzrewvoa6qct7@pd.tnic \
--to=bp@alien8.de \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stan.kain@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=waffolz@hotmail.com \
/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).