Re: [PATCH v10 07/19] qspinlock: Use a simple write to grab the lock, if applicable

2014-05-09 Thread Waiman Long
On 05/08/2014 03:02 PM, Peter Zijlstra wrote: On Wed, May 07, 2014 at 11:01:35AM -0400, Waiman Long wrote: /** + * get_qlock - Set the lock bit and own the lock + * @lock: Pointer to queue spinlock structure + * + * This routine should only be called when the caller is the only one + * entitle

Re: [PATCH v10 07/19] qspinlock: Use a simple write to grab the lock, if applicable

2014-05-09 Thread Waiman Long
On 05/08/2014 03:00 PM, Peter Zijlstra wrote: On Wed, May 07, 2014 at 11:01:35AM -0400, Waiman Long wrote: @@ -94,23 +94,29 @@ static inline struct mcs_spinlock *decode_tail(u32 tail) * can allow better optimization of the lock acquisition for the pending * bit holder. */ -#if _Q_PENDIN

Re: [PATCH v10 07/19] qspinlock: Use a simple write to grab the lock, if applicable

2014-05-08 Thread Peter Zijlstra
On Wed, May 07, 2014 at 11:01:35AM -0400, Waiman Long wrote: > /** > + * get_qlock - Set the lock bit and own the lock > + * @lock: Pointer to queue spinlock structure > + * > + * This routine should only be called when the caller is the only one > + * entitled to acquire the lock. > + */ > +stati

Re: [PATCH v10 07/19] qspinlock: Use a simple write to grab the lock, if applicable

2014-05-08 Thread Peter Zijlstra
On Wed, May 07, 2014 at 11:01:35AM -0400, Waiman Long wrote: > @@ -94,23 +94,29 @@ static inline struct mcs_spinlock *decode_tail(u32 tail) > * can allow better optimization of the lock acquisition for the pending > * bit holder. > */ > -#if _Q_PENDING_BITS == 8 > - > struct __qspinlock { >