Sunday, February 1, 2015

Presentation on RCU

Here's a nice presentation on RCU by Paul E. McKenney
http://www.efficios.com/pub/linuxcon-europe-2013/mdesnoyers-userspace-rcu-tutorial-linuxcon-2013.pdf

The cool thing about it is that it shows some benchmarks when RCU is applied to different data structures.
I find RCU interesting because its usage is semantically very similar to the Left-Right pattern and they do very similar things, with the disadvantage of Left-Right being blocking for mutations while RCU is not. The problem with RCU is that it's pretty much a Linux-only thing, and although there are user-space implementations of RCU, they're not easily (if at all) portable to other Unix flavors or Windows or OSX, or even to a the JVM running inside Linux (unless you use JNI.... maybe).

The area of applicability for RCU is also similar to Left-Right:


Obviously, if you can use RCU (i.e. you're app is a native Linux build) then by all means go ahead and use it instead of the Left-Right pattern. But if you need portable code and your app is not just for Linux, then RCU won't be an option, and you should take a look at Left-Right to see if suits your needs.

No comments:

Post a Comment