[lttng-dev] SPMC Queue in URCU

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Jun 6 20:08:46 UTC 2016


----- On Jun 6, 2016, at 2:48 PM, Mark E. Dawson, Jr. <medawsonjr at yahoo.com> wrote: 

> All,

> Is there a data structure offered by Userspace RCU that provides a bounded
> single producer multiple consumer queue? Or are we better off just using the
> linked list URCU data structure despite the cpu cache implications?

Hi, 

What we have in URCU is an unbounded SPMC queue (wfcqueue.h). 
You could theoretically use it with a counter to make it bounded, but 
it might not be as efficient as a bounded SPMC queue, since we use 
a linked list rather than a circular buffer. It would be interesting to 
compare the performance of the two approaches. 

Note that wfcqueue is wait-free on the enqueue, blocking on the 
dequeue. It is used internally by URCU to implement the call_rcu 
scheme. 

Thanks, 

Mathieu 

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20160606/f5f22df3/attachment.html>


More information about the lttng-dev mailing list