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

Christoph Hellwig hch at infradead.org
Tue May 8 09:51:45 CEST 2012


On Tue, May 08, 2012 at 03:48:53PM +0800, Liu Yuan wrote:
> 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?

As said I'd love to take atomic from somewhere else.  I also thing using
RCU in an architecture like the sheep daemon is a bad idea, please
explain the use case for your queue, and why you think RCU is a good
fit.




More information about the sheepdog mailing list