404 Subj : Re: full-blown experiential smr-based reference counted pointer impl... To : comp.programming.threads From : Chris Thomasson Date : Fri Apr 01 2005 12:27 pm > Yes. Though with classical RCU the quiesent states aren't so near the > critical > regions and the membars are around the quiesent state itself, so they're > not > near the critical regions either. But the RCU implementation I did uses > membars like your example shows. Yeah. So does mine, I basically have it down to something like this: // Acquire RCU 1. store 1 into per-thread rcu_quiescent 2. ( acquire barrier ) 3. increment per-thread rcu_generation // gc region // Release RCU 4. ( release barrier ) 5. store 0 into per-thread rcu_quiescent As long as step 3 is made visible before step 5 is made visible, everything rocks. Plus, its loop-less and requires fewer memory barriers. Sure seems there would be a lot less overhead when protecting the increments of a single-word reference count... . 0