[lttng-dev] [PATCH 5/8] urcu-mb/signal/membarrier: move quiescent threads to separate list
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Mon Nov 19 10:16:53 EST 2012
* Lai Jiangshan (laijs at cn.fujitsu.com) wrote:
> On 11/18/2012 12:16 AM, Mathieu Desnoyers wrote:
> > Accelerate 2-phase grace period by not having to iterate twice on
> > threads not nested within a RCU read-side lock.
>
> You almost gain nothing.
> The first wait_for_readers() waits none very likely.
I agree with you that the speedup will probably be small, but as we
start having more and more readers, most of which are outside of RCU
read-side critical sections, iterating only once, rather than twice, on
the list of readers seems to be a saving worth doing.
Actually, when I implemented grace periods based on list move/splicing,
it was my original intent to only touch threads as many times as we
needed to observe them become quiescent. The "move quiescent threads to
separate list" patches are completing that modification.
>
> > @@ -341,7 +361,12 @@ void synchronize_rcu(void)
> > /*
> > * Wait for readers to observe new parity or be quiescent.
> > */
> > - wait_for_readers();
> > + wait_for_readers(®istry, NULL, &qsreaders);
>
> wait_for_readers(&cur_snap_readers, NULL, &qsreaders);
Good catch, fixed in my dev branch.
Thanks!
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list