From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] RCU fix
Date: Tue, 31 May 2011 11:11:17 -0700 [thread overview]
Message-ID: <20110531181116.GI2393@linux.vnet.ibm.com> (raw)
In-Reply-To: <BANLkTimapK+1vDwB-Akw0eVimM4gHBdqaw@mail.gmail.com>
On Wed, Jun 01, 2011 at 02:52:59AM +0900, Linus Torvalds wrote:
> On Wed, Jun 1, 2011 at 2:44 AM, Paul E. McKenney
> <paulmck@linux.vnet.ibm.com> wrote:
> >
> > The reason for the switch is to allow threads blocked in TREE_PREEMPT_RCU
> > and TINY_PREEMPT_RCU RCU read-side critical sections to have their
> > priority boosted in order to avoid OOM. People have made these OOMs
> > happen, so this is not longer just a theoretical concern.
>
> Quite frankly, that doesn't make much sense.
>
> First off, the default for priority boosting is off (and you cannot
> even select it unless you have RT_MUTEX and PREEMPT_RCU), so why the
> heck do we still use the threads even when we don't support the
> boosting at all?
I considered using softirq in the !RCU_BOOST case, but that makes the
code larger and just makes the failure cases we saw less likely. And
some of the failure cases could be made to happen from userspace with
real-time threads, not just from RCU priority boosting.
But I could of course switch to the dual softirq/kthread approach
if needed.
> Secondly, if a process is in danger of exhausting the RCU resources,
> and it is preemptable, why doesn't the rcu_read_unlock() logic just
> try to force a reschedule and thus an rcu idle period? Using processes
> and process priorities for this seems to be just stupid.
This approach does work (and is used) for TINY_RCU and TREE_RCU,
but it unfortunately simply does not work for TINY_PREEMPT_RCU and
TREE_PREEMPT_RCU. The reason for this is that for the preemptible
variants of RCU, a reschedule in not guaranteed to be an RCU quiescent
state. Which is why RCU_BOOST depends on PREEMPT_RCU (which is either
TINY_PREEMPT_RCU or TREE_PREEMPT_RCU.
> I dunno. After RCU_TINY showed how fragile it was to use kernel
> threads for this, and after this subtle issue just re-inforced that
> conclusion, I just cannot begin to believe that using a thread was the
> right thing to do. It just seems stupid.
Again, at least some of these were things that could be made to happen
from userspace with the standard APIs, so those at least did need to
be fixed.
Thanx, Paul
next prev parent reply other threads:[~2011-05-31 18:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 16:27 [GIT PULL] RCU fix Ingo Molnar
2011-05-31 17:05 ` Linus Torvalds
2011-05-31 17:44 ` Paul E. McKenney
2011-05-31 17:52 ` Linus Torvalds
2011-05-31 18:11 ` Paul E. McKenney [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-09-17 7:50 Ingo Molnar
2015-05-06 12:48 Ingo Molnar
2015-02-20 13:31 Ingo Molnar
2014-09-07 17:43 Ingo Molnar
2012-12-01 11:26 Ingo Molnar
2012-07-14 7:43 Ingo Molnar
2012-06-29 15:27 Ingo Molnar
2012-04-27 8:07 Ingo Molnar
2009-03-06 18:38 [git pull] " Ingo Molnar
2009-03-03 21:09 Ingo Molnar
2008-07-01 19:59 [git pull] rcu fix Ingo Molnar
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=20110531181116.GI2393@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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.