From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org,
dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com,
fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com
Subject: Re: [PATCH tip/core/rcu 09/12] rcu: Make call_rcu_tasks() tolerate first call with irqs disabled
Date: Wed, 15 Jun 2016 15:58:13 -0700 [thread overview]
Message-ID: <20160615225813.GC3923@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160615221604.GC30921@twins.programming.kicks-ass.net>
On Thu, Jun 16, 2016 at 12:16:04AM +0200, Peter Zijlstra wrote:
> On Wed, Jun 15, 2016 at 02:46:10PM -0700, Paul E. McKenney wrote:
> > Currently, if the very first call to call_rcu_tasks() has irqs disabled,
> > it will create the rcu_tasks_kthread with irqs disabled, which will
> > result in a splat in the memory allocator, which kthread_run() invokes
> > with the expectation that irqs are enabled.
> >
> > This commit fixes this problem by deferring kthread creation if called
> > with irqs disabled. The first call to call_rcu_tasks() that has irqs
> > enabled will create the kthread.
> >
> > This bug was detected by rcutorture changes that were motivated by
> > Iftekhar Ahmed's mutation-testing efforts.
>
> Seems fragile. What if someone manages to only use call_rcu_tasks() with
> IRQs disabled?
It would have to have users before that could possibly happen. :-/
And it would not be hard to remove the fragility if needed by setting
up a workqueue, possibly mediated by a timer or whatever. But it is
hard to motivate myself to do so in advance of users. For that matter...
Steven, is call_rcu_tasks() needed, or should I just rip it out?
Thanx, Paul
next prev parent reply other threads:[~2016-06-15 22:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 21:45 [PATCH tip/core/rcu 0/12] Miscellaneous RCU fixes for 4.8 Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 01/12] rcu: Fix outdated rcu_scheduler_active comment Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 02/12] rcu: Fix outdated hotplug-exclusion comment in rcu_gp_init() Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 03/12] rcu: Remove some superfluous lines Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 04/12] rcu: Move expedited code from tree.c to tree_exp.h Paul E. McKenney
2016-06-15 22:05 ` Peter Zijlstra
2016-06-15 22:16 ` Paul E. McKenney
2016-06-17 15:48 ` Pranith Kumar
2016-06-17 17:46 ` Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 05/12] rcu: Move expedited code from tree_plugin.h " Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 06/12] rcu: Document RCU_NONIDLE() restrictions in comment header Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 07/12] rcu: No ordering for rcu_assign_pointer() of NULL Paul E. McKenney
2016-06-15 22:03 ` Peter Zijlstra
2016-06-15 22:12 ` Peter Zijlstra
2016-06-15 22:41 ` Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 08/12] rcu: Disable TASKS_RCU for usermode Linux Paul E. McKenney
2016-06-15 21:47 ` Richard Weinberger
2016-06-15 21:46 ` [PATCH tip/core/rcu 09/12] rcu: Make call_rcu_tasks() tolerate first call with irqs disabled Paul E. McKenney
2016-06-15 22:15 ` Peter Zijlstra
2016-06-15 22:54 ` Paul E. McKenney
2016-06-15 22:16 ` Peter Zijlstra
2016-06-15 22:58 ` Paul E. McKenney [this message]
2016-06-15 21:46 ` [PATCH tip/core/rcu 10/12] rcu: Fix a typo in a comment Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 11/12] rcu: sysctl: Panic on RCU Stall Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 12/12] rcu: Correctly handle sparse possible cpus Paul E. McKenney
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=20160615225813.GC3923@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=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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