Re: [PATCH, RFC] v4 scalable classic RCU implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Sunday, September 21, 2008 - 2:14 pm

On Sun, Sep 21, 2008 at 01:09:51PM +0200, Manfred Spraul wrote:

That has been one of my biggest questions about your approach, that and
the need to hit holdouts with resched IPI.  (Though perhaps you have
worked out another way around this.)


Agreed.  I could use this approach as well, having each CPU set and clear
its qsmaskinit bit on every exit from and entry to dynticks idle state,
but see below...

In your case, you would need to carefully keep state so that a CPU
entering dynticks idle mode would know whether or not it needed to
respond to the current grace period -- but you need this in any case,
so no added complexity as far as I can see.


Yep!  Hence my reluctance to add overhead to the dynticks side of the
algorithm.


Indeed, this is the easy case for both of our approaches.


I use an analogous algorithm, as the qsinitmask values might change while
setting up for the next quiescent state.  The tough part of this was
correctly handling races between setting up for the quiescent state and
onlining/offlining CPUs (and, in your case, CPUs entering/leaving dynticks
idle mode).  I chose to use a global lock that excludes online/offline
and starting a quiescent state (except in the case where there are so
few CPUs that there is but one rcu_node structure, in which case that
structure's lock suffices, so that onofflock need not be acquired).

But although acquiring a global lock is reasonable for CPU online/offline
(as there can be but one such operation at a time), it would be quite
painful for the dynticks case.

Of course, I might be able to avoid the need for this global lock if I
were willing to acquire the interior-node rcu_node locks when setting
up for the next grace period.  But this would require me to put in a
cleanup step after grace-period setup, as some set of dyntick operations
might otherwise end the grace period before it is fully initialized.
This could potentially result in two different CPUs setting up grace
periods concurrently (yuck!).  Worse yet, the grace period could end
while the initialization was only halfway through the leaves, so that
the CPU doing the initialization would need to recognize this and stop
further initialization -- and, again, clean up (yuck^2!).

Your two-phase approach might (or might not) avoid this issue.

							Thanx, Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Paul E. McKenney, (Fri Aug 22, 10:22 am)
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Paul E. McKenney, (Wed Aug 27, 11:28 am)
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Paul E. McKenney, (Wed Aug 27, 11:34 am)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sat Aug 30, 12:38 pm)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sun Aug 31, 10:20 am)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sun Aug 31, 10:55 am)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sun Aug 31, 12:23 pm)
[PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Fri Sep 5, 8:29 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Andrew Morton, (Fri Sep 5, 12:33 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Fri Sep 5, 4:04 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Andrew Morton, (Fri Sep 5, 4:52 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Fri Sep 5, 9:16 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Sat Sep 6, 9:37 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Sun Sep 7, 10:25 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Mon Sep 15, 9:02 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Tue Sep 16, 9:52 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Tue Sep 16, 10:30 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Tue Sep 16, 10:48 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Tue Sep 16, 11:22 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Sun Sep 21, 4:09 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Sun Sep 21, 2:14 pm)
[PATCH, RFC] v6 scalable classic RCU implementation, Paul E. McKenney, (Tue Sep 23, 4:53 pm)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Ingo Molnar, (Thu Sep 25, 12:26 am)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Ingo Molnar, (Thu Sep 25, 12:29 am)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Paul E. McKenney, (Thu Sep 25, 7:05 am)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Paul E. McKenney, (Thu Sep 25, 7:18 am)
[PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Fri Oct 10, 9:09 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Sun Oct 12, 8:52 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Sun Oct 12, 3:46 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Mon Oct 13, 11:03 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Tue Oct 14, 6:11 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Oct 15, 1:13 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Wed Oct 15, 8:26 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Gautham R Shenoy, (Fri Oct 17, 1:34 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Gautham R Shenoy, (Fri Oct 17, 8:35 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Fri Oct 17, 8:43 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Fri Oct 17, 8:46 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Oct 22, 11:41 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Wed Oct 22, 2:02 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Oct 22, 2:24 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Oct 27, 9:45 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Mon Oct 27, 12:48 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Oct 27, 4:52 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Mon Oct 27, 10:30 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Tue Oct 28, 8:17 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Tue Oct 28, 10:21 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Tue Oct 28, 10:35 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Sun Nov 2, 1:10 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Nov 3, 1:33 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Nov 5, 12:48 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Wed Nov 5, 2:27 pm)
[PATCH, RFC] v8 scalable classic RCU implementation, Paul E. McKenney, (Sat Nov 15, 4:20 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Dec 8, 11:42 am)