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

2013-07-15 Thread Waiman Long
On 07/15/2013 07:47 PM, Thomas Gleixner wrote: On Mon, 15 Jul 2013, Waiman Long wrote: On 07/15/2013 10:41 AM, Thomas Gleixner wrote: On Mon, 8 Jul 2013, Waiman Long wrote: Sigh. GENERIC means, that you use the generic implementation, ARCH means the architecture has a private implementation of

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

2013-07-15 Thread Thomas Gleixner
On Mon, 15 Jul 2013, Waiman Long wrote: > On 07/15/2013 10:41 AM, Thomas Gleixner wrote: > > On Mon, 8 Jul 2013, Waiman Long wrote: > > Sigh. GENERIC means, that you use the generic implementation, ARCH > > means the architecture has a private implementation of that code. > > > > The generic

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

2013-07-15 Thread Waiman Long
On 07/15/2013 10:41 AM, Thomas Gleixner wrote: On Mon, 8 Jul 2013, Waiman Long wrote: On 07/05/2013 02:59 PM, Thomas Gleixner wrote: On Fri, 5 Jul 2013, Waiman Long wrote: I think it is OK to add the GENERIC option, but I would like to make available a slightly different set of options: 1)

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

2013-07-15 Thread Thomas Gleixner
On Mon, 8 Jul 2013, Waiman Long wrote: > On 07/05/2013 02:59 PM, Thomas Gleixner wrote: > > On Fri, 5 Jul 2013, Waiman Long wrote: > I think it is OK to add the GENERIC option, but I would like to make available > a slightly different set of options: > 1) Always take the lock > 2) Use the generic

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

2013-07-15 Thread Thomas Gleixner
On Mon, 8 Jul 2013, Waiman Long wrote: On 07/05/2013 02:59 PM, Thomas Gleixner wrote: On Fri, 5 Jul 2013, Waiman Long wrote: I think it is OK to add the GENERIC option, but I would like to make available a slightly different set of options: 1) Always take the lock 2) Use the generic

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

2013-07-15 Thread Waiman Long
On 07/15/2013 10:41 AM, Thomas Gleixner wrote: On Mon, 8 Jul 2013, Waiman Long wrote: On 07/05/2013 02:59 PM, Thomas Gleixner wrote: On Fri, 5 Jul 2013, Waiman Long wrote: I think it is OK to add the GENERIC option, but I would like to make available a slightly different set of options: 1)

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

2013-07-15 Thread Thomas Gleixner
On Mon, 15 Jul 2013, Waiman Long wrote: On 07/15/2013 10:41 AM, Thomas Gleixner wrote: On Mon, 8 Jul 2013, Waiman Long wrote: Sigh. GENERIC means, that you use the generic implementation, ARCH means the architecture has a private implementation of that code. The generic implementation

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

2013-07-15 Thread Waiman Long
On 07/15/2013 07:47 PM, Thomas Gleixner wrote: On Mon, 15 Jul 2013, Waiman Long wrote: On 07/15/2013 10:41 AM, Thomas Gleixner wrote: On Mon, 8 Jul 2013, Waiman Long wrote: Sigh. GENERIC means, that you use the generic implementation, ARCH means the architecture has a private implementation of

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

2013-07-08 Thread Waiman Long
On 07/05/2013 02:59 PM, Thomas Gleixner wrote: On Fri, 5 Jul 2013, Waiman Long wrote: + * If the spinlock& reference count optimization feature is disabled, + * the spinlock and reference count are accessed separately on its own. + */ +struct lockref { + unsigned int refcnt;/*

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

2013-07-08 Thread Waiman Long
On 07/05/2013 02:59 PM, Thomas Gleixner wrote: On Fri, 5 Jul 2013, Waiman Long wrote: + * If the spinlock reference count optimization feature is disabled, + * the spinlock and reference count are accessed separately on its own. + */ +struct lockref { + unsigned int refcnt;/*

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

2013-07-05 Thread Thomas Gleixner
On Fri, 5 Jul 2013, Waiman Long wrote: > + * If the spinlock & reference count optimization feature is disabled, > + * the spinlock and reference count are accessed separately on its own. > + */ > +struct lockref { > + unsigned int refcnt;/* Reference count */ > + spinlock_t lock; >

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

2013-07-05 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

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

2013-07-05 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

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

2013-07-05 Thread Thomas Gleixner
On Fri, 5 Jul 2013, Waiman Long wrote: + * If the spinlock reference count optimization feature is disabled, + * the spinlock and reference count are accessed separately on its own. + */ +struct lockref { + unsigned int refcnt;/* Reference count */ + spinlock_t lock; +}; +