Re: [PATCH v6 01/14] spinlock: A new lockref structure for lockless update of refcount

2013-07-15 Thread Waiman Long
On 07/13/2013 12:58 PM, Masami Hiramatsu wrote: > Hi, > > (2013/07/09 10:09), Waiman Long wrote:> +/** >> + * lockref_put_or_lock - decrements count unless count <= 1 before decrement >> + * @lockcnt: pointer to lockref structure >> + * Return: 1 if count updated successfully or 0 if count <= 1 and

Re: [PATCH v6 01/14] spinlock: A new lockref structure for lockless update of refcount

2013-07-13 Thread Masami Hiramatsu
Hi, (2013/07/09 10:09), Waiman Long wrote:> +/** > + * lockref_put_or_lock - decrements count unless count <= 1 before decrement > + * @lockcnt: pointer to lockref structure > + * Return: 1 if count updated successfully or 0 if count <= 1 and lock taken > + * > + * The only difference between lock

[PATCH v6 01/14] spinlock: A new lockref structure for lockless update of refcount

2013-07-08 Thread Waiman Long
This patch introduces a new set of spinlock_refcount.h header files to be included by kernel codes that want to do a faster lockless update of reference count protected by a spinlock. The new lockref structure consists of just the spinlock and the reference count data. Helper functions are defined