On Wed, Jun 24, 2015 at 09:50:50AM -0700, Dave Hansen wrote: > On 06/22/2015 05:26 PM, Paul E. McKenney wrote: > > OK, here is an experimental patch that provides a fast-readers variant > > of RCU, forward-ported from v3.3. Because we didn't have call_srcu() > > and srcu_barrier() back then, it is not a drop-in replacement for SRCU, > > so you need to adapt the code to the API, which means putting an "fr" > > in front of the "srcu" in the API members. > > > > Understood on the overhead of the memory-barrier instruction showing > > up consistently. My point was instead that getting rid of this > > memory-barrier instruction does not come for free, as it greatly > > increases the latency of synchronize_frsrcu(). In a real workload, > > it is entirely possible that the savings from eliminating the memory > > barrier are overwhelmed by the increased grace-period latency. > > > > Anyway, the patch is below. Very lightly tested. > > This does give a very similar performance boost as the other > optimization I posted. I measured this patch to boost the writes/second > by 11.0% while my previous optimization did 10.8%. > > I don't think this workload will see any of the overhead of the > synchronize_frsrcu(), though, but this helps confirm the source of the > overhead.
Thank you for testing it! I agree that your patch is much simpler than adding another flavor of RCU, so I prefer your patch, but the confirmation is nevertheless valuable. Thanx, Paul -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/