From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
josht@linux.vnet.ibm.com, dvhltc@us.ibm.com, niv@us.ibm.com,
tglx@linutronix.de, rostedt@goodmis.org
Subject: Re: [PATCH RFC -tip 0/4] v3 RCU cleanups and simplified preemptable RCU
Date: Mon, 24 Aug 2009 08:59:10 -0700 [thread overview]
Message-ID: <20090824155910.GF6677@linux.vnet.ibm.com> (raw)
In-Reply-To: <1251098519.7538.139.camel@twins>
On Mon, Aug 24, 2009 at 09:21:59AM +0200, Peter Zijlstra wrote:
> On Sat, 2009-08-22 at 13:52 -0700, Paul E. McKenney wrote:
> >
> > o Rename variables and functions so that RCU-sched is an
> > underlying definition, along with RCU-bh and (when so
> > configured) RCU-preempt. RCU then maps to either RCU-sched
> > or RCU-preempt, depending on configuration.
>
> Nice, but we're not quite there yet it seems, since RCU-preempt isn't
> available outside of TREE_PREEMPT_RCU afaiks.
>
> That is, I'm still hoping for the day that generic code can do:
>
> rcu_preempt_read_lock();
>
>
> call_rcu_preempt(&my_rcu_thing);
> rcu_preempt_read_unlock();
>
> And have it work like expected, this would, I think, remove much of the
> need for SRCU.
Longer term, CONFIG_PREEMPT will imply CONFIG_TREE_PREEMPT_RCU and
!CONFIG_PREEMPT will imply CONFIG_TREE_RCU. This will reduce the
number of combinations in need of testing. So then the question is
"what does call_rcu_preempt() mean in !CONFIG_PREEMPT"?
If we permit things like mutex_lock(), we have the possibility of
indefinitely extended RCU read-side critical sections, which leads us to:
> The thing I've talked about earlier is an extension of this where you
> can create multiple RCU domains along the lines of:
>
> struct rcu_preempt_domain my_domain;
>
> rcu_preempt_init(&my_domain);
>
>
> and
>
> rcu_preempt_read_lock(&my_domain);
>
> call_rcu_preempt(&my_domain, &my_rcu_head);
> rcu_preempt_read_unlock(&my_domain);
This is in fact what SRCU does. Of course, it also requires
that the return value from rcu_preempt_read_lock() be passed into
rcu_preempt_read_unlock() (AKA srcu_read_lock() and srcu_read_unlock()),
in order to handle the case where there are a number of nested SRCU
read-side critical sections with different domains. I suppose that we
could instead dynamically allocate space for this information, but...
> Which would allow you to create smaller RCU domains for when you want
> faster grace periods due to less interference of other rcu users.
The other thing in -tip for this purpose is synchronize_rcu_expedited().
> Anyway, enough rambling, the patch-set does look very nice, and if time
> permits I'll try and go through the preempt-tree-rcu thing.
I would very much appreciate that!!! My next patch set (hopefully later
today Pacific time) will fix CPU hotplug for the single-node-tree case,
with full support later this week.
Thanx, Paul
prev parent reply other threads:[~2009-08-24 15:59 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 18:14 [PATCH RFC -tip 0/4] v2 RCU cleanups and simplified preemptable RCU Paul E. McKenney
2009-07-27 18:16 ` [PATCH RFC -tip 1/4] v2 Move private definitions from include/linux/rcutree.h to kernel/rcutree.h Paul E. McKenney
2009-07-27 18:16 ` [PATCH RFC -tip 2/4] v2 Renamings to increase RCU clarity Paul E. McKenney
2009-07-27 18:16 ` [PATCH RFC -tip 3/4] v2 Consolidate sparse and lockdep declarations in include/linux/rcupdate.h Paul E. McKenney
2009-07-27 18:16 ` [PATCH RFC -tip 4/4] v2 Merge preemptable-RCU functionality into hierarchical RCU Paul E. McKenney
2009-08-03 8:20 ` [PATCH RFC -tip 0/4] v2 RCU cleanups and simplified preemptable RCU Ingo Molnar
2009-08-03 13:03 ` Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Move private definitions from include/linux/rcutree.h to kernel/rcutree.h Paul E. McKenney
2009-08-23 9:01 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Renamings to increase RCU clarity Paul E. McKenney
2009-08-23 9:01 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-24 7:17 ` [PATCH -tip] v3 " Lai Jiangshan
2009-08-24 15:36 ` Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Consolidate sparse and lockdep declarations in include/linux/rcupdate.h Paul E. McKenney
2009-08-23 9:02 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-23 18:42 ` Ingo Molnar
2009-08-23 19:33 ` Paul E. McKenney
2009-08-23 22:53 ` Paul E. McKenney
2009-08-24 9:28 ` Ingo Molnar
2009-08-24 16:07 ` Paul E. McKenney
2009-08-24 7:34 ` [PATCH -tip] v3 " Lai Jiangshan
2009-08-24 9:00 ` Ingo Molnar
2009-08-24 16:03 ` Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Fix online/offline indication for rcudata.csv trace file Paul E. McKenney
2009-08-23 9:02 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Merge per-RCU-flavor initialization into pre-existing macro Paul E. McKenney
2009-08-23 9:02 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Use debugfs_remove_recursive() simplify code Paul E. McKenney
2009-08-23 9:02 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Simplify rcu_pending()/rcu_check_callbacks() API Paul E. McKenney
2009-08-23 9:02 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-24 7:10 ` [PATCH -tip] v3 " Peter Zijlstra
2009-08-24 15:42 ` Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Merge preemptable-RCU functionality into hierarchical RCU Paul E. McKenney
2009-08-23 9:03 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-22 20:56 ` [PATCH -tip] v3 Remove CONFIG_PREEMPT_RCU Paul E. McKenney
2009-08-23 9:03 ` [tip:core/rcu] rcu: " tip-bot for Paul E. McKenney
2009-08-24 7:21 ` [PATCH RFC -tip 0/4] v3 RCU cleanups and simplified preemptable RCU Peter Zijlstra
2009-08-24 15:59 ` Paul E. McKenney [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=20090824155910.GF6677@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=josht@linux.vnet.ibm.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.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