From: Frederic Weisbecker <fweisbec@gmail.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: mathieu.desnoyers@efficios.com, dhowells@redhat.com,
loic.minier@linaro.org, dhaval.giani@gmail.com,
tglx@linutronix.de, peterz@infradead.org,
linux-kernel@vger.kernel.org, josh@joshtriplett.org
Subject: Re: dyntick-hpc and RCU
Date: Mon, 8 Nov 2010 15:10:40 +0100 [thread overview]
Message-ID: <20101108141035.GA5466@nowhere> (raw)
In-Reply-To: <20101105150435.GA2850@linux.vnet.ibm.com>
On Fri, Nov 05, 2010 at 08:04:36AM -0700, Paul E. McKenney wrote:
> On Fri, Nov 05, 2010 at 06:27:46AM +0100, Frederic Weisbecker wrote:
> > Yet another solution is to require users of bh and sched rcu flavours to
> > call a specific rcu_read_lock_sched()/bh, or something similar, that would
> > be only implemented in this new rcu config. We would only need to touch the
> > existing users and the future ones instead of adding an explicit call
> > to every implicit paths.
>
> This approach would be a much nicer solution, and I do wish I had required
> this to start with. Unfortunately, at that time, there was no preemptible
> RCU, CONFIG_PREEMPT, nor any RCU-bh, so there was no way to enforce this.
> Besides which, I was thinking in terms of maybe 100 occurrences of the RCU
> API in the kernel. ;-)
Ok, I'll continue the discussion about this specific point in the
non-timer based rcu patch thread.
> > > 4. Substitute an RCU implementation based on one of the
> > > user-level RCU implementations. This has roughly the same
> > > advantages and disadvantages as does #3 above.
> > >
> > > 5. Don't tell RCU about dyntick-hpc mode, but instead make RCU
> > > push processing through via some processor that is kept out
> > > of dyntick-hpc mode.
> >
> > I don't understand what you mean.
> > Do you mean that dyntick-hpc cpu would enqueue rcu callbacks to
> > another CPU? But how does that protect rcu critical sections
> > in our dyntick-hpc CPU?
>
> There is a large range of possible solutions, but any solution will need
> to check for RCU read-side critical sections on the dyntick-hpc CPU. I
> was thinking in terms of IPIing the dyntick-hpc CPUs, but very infrequently,
> say once per second.
Everytime we want to notify a quiescent state, right?
But I fear that forcing an IPI, even only once per second, breaks our
initial requirement.
> > > This requires that the rcutree RCU
> > > priority boosting be pushed further along so that RCU grace period
> > > and callback processing is done in kthread context, permitting
> > > remote forcing of grace periods.
> >
> >
> >
> > I should have a look at the rcu priority boosting to understand what you
> > mean here.
>
> The only thing that you really need to know about it is that I will be
> moving the current softirq processing to kthread context. The key point
> here is that we can wake up a kthread on some other CPU.
Ok.
> > > The RCU_JIFFIES_TILL_FORCE_QS
> > > macro is promoted to a config variable, retaining its value
> > > of 3 in absence of dyntick-hpc, but getting value of HZ
> > > (or thereabouts) for dyntick-hpc builds. In dyntick-hpc
> > > builds, force_quiescent_state() would push grace periods
> > > for CPUs lacking a scheduling-clock interrupt.
> > >
> > > + Relatively small changes to RCU, some of which is
> > > coming with RCU priority boosting anyway.
> > >
> > > + No need to inform RCU of user/kernel transitions.
> > >
> > > + No need to turn scheduling-clock interrupts on
> > > at each user/kernel transition.
> > >
> > > - Some IPIs to dyntick-hpc CPUs remain, but these
> > > are down in the every-second-or-so frequency,
> > > so hopefully are not a real problem.
> >
> >
> > Hmm, I hope we could avoid that, ideally the task in userspace shouldn't be
> > interrupted at all.
>
> Yep. But if we do need to interrupt it, let's do it as infrequently as
> we can!
If we have no other solution yeah, but I'm not sure that's a right way
to go.
> > I wonder if we shouldn't go back to #3 eventually.
>
> And there are variants of #3 that permit preemption of RCU read-side
> critical sections.
Ok.
> > At that time yeah.
> >
> > But now I don't know, I really need to dig deeper into it and really
> > understand how #5 works before picking that orientation :)
>
> This is probably true for all of us for all of the options. ;-)
Hehe ;-)
next prev parent reply other threads:[~2010-11-08 14:10 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-04 23:21 dyntick-hpc and RCU Paul E. McKenney
2010-11-05 5:27 ` Frederic Weisbecker
2010-11-05 5:38 ` Frederic Weisbecker
2010-11-05 15:06 ` Paul E. McKenney
2010-11-05 20:06 ` Dhaval Giani
2010-11-05 15:04 ` Paul E. McKenney
2010-11-08 14:10 ` Frederic Weisbecker [this message]
2010-11-05 21:00 ` [PATCH] a local-timer-free version of RCU Joe Korty
2010-11-06 19:28 ` Paul E. McKenney
2010-11-06 19:34 ` Mathieu Desnoyers
2010-11-06 19:42 ` Mathieu Desnoyers
2010-11-06 19:44 ` Paul E. McKenney
2010-11-08 2:11 ` Udo A. Steinberg
2010-11-08 2:19 ` Udo A. Steinberg
2010-11-08 2:54 ` Paul E. McKenney
2010-11-08 15:32 ` Frederic Weisbecker
2010-11-08 19:38 ` Paul E. McKenney
2010-11-08 20:40 ` Frederic Weisbecker
2010-11-10 18:08 ` Paul E. McKenney
2010-11-08 15:06 ` Frederic Weisbecker
2010-11-08 15:18 ` Joe Korty
2010-11-08 19:50 ` Paul E. McKenney
2010-11-08 19:49 ` Paul E. McKenney
2010-11-08 20:51 ` Frederic Weisbecker
2010-11-06 20:03 ` Mathieu Desnoyers
2010-11-09 9:22 ` Lai Jiangshan
2010-11-10 15:54 ` Frederic Weisbecker
2010-11-10 17:31 ` Peter Zijlstra
2010-11-10 17:45 ` Frederic Weisbecker
2010-11-11 4:19 ` Paul E. McKenney
2010-11-13 22:30 ` Frederic Weisbecker
2010-11-16 1:28 ` Paul E. McKenney
2010-11-16 13:52 ` Frederic Weisbecker
2010-11-16 15:51 ` Paul E. McKenney
2010-11-17 0:52 ` Frederic Weisbecker
2010-11-17 1:25 ` Paul E. McKenney
2011-03-07 20:31 ` [PATCH] An RCU for SMP with a single CPU garbage collector Joe Korty
[not found] ` <20110307210157.GG3104@linux.vnet.ibm.com>
2011-03-07 21:16 ` Joe Korty
2011-03-07 21:33 ` Joe Korty
2011-03-07 22:51 ` Joe Korty
2011-03-08 9:07 ` Paul E. McKenney
2011-03-08 15:57 ` Joe Korty
2011-03-08 22:53 ` Joe Korty
2011-03-10 0:30 ` Paul E. McKenney
2011-03-10 0:28 ` Paul E. McKenney
2011-03-09 22:29 ` Frederic Weisbecker
2011-03-09 22:15 ` [PATCH 2/4] jrcu: tap rcu_read_unlock Joe Korty
2011-03-10 0:34 ` Paul E. McKenney
2011-03-10 19:50 ` JRCU Theory of Operation Joe Korty
2011-03-12 14:36 ` Paul E. McKenney
2011-03-13 0:43 ` Joe Korty
2011-03-13 5:56 ` Paul E. McKenney
2011-03-13 23:53 ` Joe Korty
2011-03-14 0:50 ` Paul E. McKenney
2011-03-14 0:55 ` Josh Triplett
2011-03-09 22:16 ` [PATCH 3/4] jrcu: tap might_resched() Joe Korty
2011-03-09 22:17 ` [PATCH 4/4] jrcu: add new stat to /sys/kernel/debug/rcu/rcudata Joe Korty
2011-03-09 22:19 ` [PATCH 1/4] jrcu: remove preempt_enable() tap [resend] Joe Korty
2011-03-12 14:36 ` [PATCH] An RCU for SMP with a single CPU garbage collector Paul E. McKenney
2011-03-13 1:25 ` Joe Korty
2011-03-13 6:09 ` Paul E. McKenney
[not found] <1103753684.861128.1289015433137.JavaMail.root@sz0076a.westchester.pa.mail.comcast.net>
2010-11-06 4:01 ` dyntick-hpc and RCU houston.jim
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=20101108141035.GA5466@nowhere \
--to=fweisbec@gmail.com \
--cc=dhaval.giani@gmail.com \
--cc=dhowells@redhat.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.minier@linaro.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.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