On 07/12/2010 06:32 AM, Mathieu Desnoyers wrote:
So, I think I found a neat way to handle lock-free rcu queues with
reference counting instead. Note that the "dummy" node is really
needed, otherwise we end up in situations where the "empty" queue is
hard to deal with racelessly. FYI, the ABA problem is dealt with by
using rcu read locks. Comments on the code below are very welcome.

There is a problem with reference counting: the neat part of my implementation was that I only needed to do a grace period after a few thousands allocations. As it is now, the implementation of urcu_ref.h would synchronize on every allocation, which obviously kills performance.

So, maybe a page-slicing allocator can be bundled with URCU that layers my technique on top of some other allocator. Being on vacation I won't do that for a couple of weeks, but I can do that if there is interest.

Otherwise, it looks great.

Paolo

_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Reply via email to