[lttng-dev] Question about lock in synchronize_rcu implementation of URCU

Yuxin Ren ryx at gwmail.gwu.edu
Thu Apr 28 01:34:16 UTC 2016


Hi,

I am learning the URCU code.

Why do we need rcu_gp_lock in synchronize_rcu?
https://github.com/urcu/userspace-rcu/blob/master/urcu.c#L401

In the comment, it says this lock ensures mutual exclusion between
threads calling synchronize_rcu().
But only the first thread added to waiter queue can proceed to detect
grace period.
How can multiple threads currently perform the grace thread?

Thanks a lot!
Yuxin


More information about the lttng-dev mailing list