[Sheepdog] [PACH, RFC] sheep: use atomic for the vnode_info refcount outside the main thread

Liu Yuan namei.unix at gmail.com
Tue May 8 09:48:53 CEST 2012


On 05/07/2012 11:33 PM, Christoph Hellwig wrote:

> This is the minimally tested patch to use atomics to refcount
> the vnode_info structure.  Because the GCC built-in are too ugly to live
> I added a minimal Linux Kernel style atomic.h wrapper around them.  this
> was thrown together really quickly, so careful review is welcome, as
> are pointers to readily available userspace atomic_t implementations.


I am going to introduce URCU to sheepdog for lock-less queue in highly
concurrent IO threads, which issues read requests in "sheepfs". There is
a well implemented atomic operation header file located in
urcu/uatomic.h from URCU library. So I think this duplicate the atomic
code a lot.

So should we include URCU in now to avoid duplicate code?

Thanks,
Yuan



More information about the sheepdog mailing list