<div dir="ltr"><div><div><div><div><div><div><div><div>Hi Guys,<br><br></div>I recently started exploring RCU to build a lock free hash table. I have read quite a bit of literature from LWN on RCU, its usage, API etc. I have the following question for which I have had mixed answers online:<br><br></div>Does the user space implementation of RCU liburcu take care of preemptive v/s non-preemptive flavors of RCU. From what I understand RCU can be broadly divided into:<br><br></div>1. Classic RCU - High Performance but suitable for non-preemptive environments.<br></div>2. Preemptible RCU - Permits the reader to block on a resource or the read side critical sections to be preempted. But still does not allow any kind of sleep(). Moreover there seems to be some sort of limitation on the nature of blocking that can happen within RCU read side critical section.<br></div>3. Sleepable RCU - Seems to me an augmentation of preemptible RCU.<br><br></div>The paper that describes the user space implementation of RCU suggests 4 different flavors -- QSBR, Memory Barrier based, Bullet Proof, and Signal based. <br><br></div>I don't think so in my application I can afford to not have the readers block or even sleep. If the reader wants to take some orthogonal lock/latch on an entirely different resource, it might end waiting for it.<br><br></div>And because <br><div><div><div><div><div><div><div><div><div><br><br clear="all"></div></div></div></div></div></div></div></div></div></div>