[lttng-dev] RCU consistency guarantees
Paul E. McKenney
paulmck at kernel.org
Fri Dec 6 11:30:52 EST 2019
On Fri, Dec 06, 2019 at 10:59:05AM -0500, Mathieu Desnoyers wrote:
> ----- On Dec 6, 2019, at 3:51 PM, Yuxin Ren <ryx at gwmail.gwu.edu> wrote:
> > On Fri, Dec 6, 2019 at 5:49 AM Mathieu Desnoyers < [
> > mailto:mathieu.desnoyers at efficios.com | mathieu.desnoyers at efficios.com ] >
> > wrote:
> >> ----- On Dec 5, 2019, at 8:17 PM, Yuxin Ren < [ mailto:ryx at gwmail.gwu.edu |
> >> ryx at gwmail.gwu.edu ] > wrote:
> >>> Hi,
> >>> I am a student, and learning RCU now, but still know very little about it.
> >>> Are there any documents/papers/materials which (in)formally define and explain
> >>> RCU consistency guarantees?
> >> You may want to have a look at
> >> User-Level Implementations of Read-Copy Update
> >> Article in IEEE Transactions on Parallel and Distributed Systems 23(2):375 - 382
> >> · March 2012
> > Thanks for your info.
> > However, I do not think URCU talks about any consistency model formally.
> > From previous communication with Paul, he said RCU is not designed for
> > linearizability, and it is totally acceptable that RCU is not linearizable.
> > However, I am curious how to accurately/formally Characterize RCU consistency
> > model/guarantees
> Adding Paul E. McKenney in CC.
> I am referring to the section "Overview of RCU semantics" in the paper. Not sure it has the level of
> formality you are looking for though. Paul, do you have pointers to additional material ?
Indeed I do! The Linux kernel memory model (LKMM) includes RCU. It is
in tools/memory-model in recent kernel source trees, which includes
documentation. This is an executable model, which means that you
can create litmus tests and have the model formally and automatically
There are also a number of publications covering LKMM:
o A formal kernel memory-ordering model
These cover the release stores and dependency ordering that
provide RCU's publish-subscribe guarantees.
Backup material here:
With these two likely being of particular interest:
o Frightening Small Children and Disconcerting Grown-ups: Concurrency in the Linux Kernel
o Who's afraid of a big bad optimizing compiler?
o Calibrating your fear of big bad optimizing compilers
These last two justify use of normal C-language assignment
statements to initialize and access data referenced by
There is a large body of litmus tests (thousands of them) here:
Many of these litmus tests involve RCU, and these can be located by
search for files containing rcu_read_lock(), rcu_read_unlock(),
synchronize_rcu(), and so on.
Or were you looking for something else?
> >> as a starting point.
> >> Thanks,
> >> Mathieu
> >>> I know there are some consistency models in the database area (such as PRAM,
> >>> Read Uncommitted, etc) from [ https://jepsen.io/consistency |
> >>> https://jepsen.io/consistency ] and .
> >>> How does RCU related to those consistency models?
> >>> I also found some comments online (One key distinction is that both MVCC and RLU
> >>> provide much stronger consistency guarantees to readers than does RCU ...) ( [
> >>> https://lwn.net/Articles/777036/ | https://lwn.net/Articles/777036/ ] ).
> >>> I do not understand how we reason/dresibe/compare the consistency guarantees. (
> >>> I even do not know what consistency guarantees provided by RCU formally)
> >>> Could someone explain this to me?
> >>>  Bailis, P., Davidson, A., Fekete, A., Ghodsi, A., Hellerstein, J. M., &
> >>> Stoica, I. (2013). Highly available transactions: Virtues and limitations.
> >>> Proceedings of the VLDB Endowment, 7(3), 181-192.
> >>> Thanks
> >>> Yuxin
> >>> _______________________________________________
> >>> lttng-dev mailing list
> >>> [ mailto:lttng-dev at lists.lttng.org | lttng-dev at lists.lttng.org ]
> >>> [ https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev |
> >>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ]
> >> --
> >> Mathieu Desnoyers
> >> EfficiOS Inc.
> >> [ http://www.efficios.com/ | http://www.efficios.com ]
> Mathieu Desnoyers
> EfficiOS Inc.
More information about the lttng-dev