* Waiman Long waiman.l...@hp.com wrote:
Because the qspinlock needs to touch a second cacheline; add a pending
bit and allow a single in-word spinner before we punt to the second
cacheline.
Signed-off-by: Peter Zijlstra pet...@infradead.org
Signed-off-by: Waiman Long waiman.l...@hp.com
On Thu, Apr 17, 2014 at 05:20:31PM -0400, Waiman Long wrote:
+ while ((val = atomic_read(lock-val)) _Q_LOCKED_MASK)
+ arch_mutex_cpu_relax();
That was a cpu_relax().
Yes, but arch_mutex_cpu_relax() is the same as cpu_relax() for x86.
Yeah, so why bother typing more?
Let the
On 04/18/2014 03:42 AM, Ingo Molnar wrote:
* Waiman Longwaiman.l...@hp.com wrote:
Because the qspinlock needs to touch a second cacheline; add a pending
bit and allow a single in-word spinner before we punt to the second
cacheline.
Signed-off-by: Peter Zijlstrapet...@infradead.org
On Fri, Apr 18, 2014 at 12:23:29PM -0400, Waiman Long wrote:
On 04/18/2014 03:42 AM, Ingo Molnar wrote:
* Waiman Longwaiman.l...@hp.com wrote:
Because the qspinlock needs to touch a second cacheline; add a pending
bit and allow a single in-word spinner before we punt to the second
On 04/18/2014 04:13 AM, Peter Zijlstra wrote:
On Thu, Apr 17, 2014 at 05:20:31PM -0400, Waiman Long wrote:
+ while ((val = atomic_read(lock-val)) _Q_LOCKED_MASK)
+ arch_mutex_cpu_relax();
That was a cpu_relax().
Yes, but arch_mutex_cpu_relax() is the same as cpu_relax()
On 04/18/2014 12:35 PM, Konrad Rzeszutek Wilk wrote:
On Fri, Apr 18, 2014 at 12:23:29PM -0400, Waiman Long wrote:
On 04/18/2014 03:42 AM, Ingo Molnar wrote:
* Waiman Longwaiman.l...@hp.com wrote:
Because the qspinlock needs to touch a second cacheline; add a pending
bit and allow a single
Because the qspinlock needs to touch a second cacheline; add a pending
bit and allow a single in-word spinner before we punt to the second
cacheline.
Signed-off-by: Peter Zijlstra pet...@infradead.org
Signed-off-by: Waiman Long waiman.l...@hp.com
---
include/asm-generic/qspinlock_types.h | 12
On Thu, Apr 17, 2014 at 11:03:55AM -0400, Waiman Long wrote:
+/**
+ * trylock_pending - try to acquire queue spinlock using the pending bit
+ * @lock : Pointer to queue spinlock structure
+ * @pval : Pointer to value of the queue spinlock 32-bit word
+ * Return: 1 if lock acquired, 0
On 04/17/2014 11:42 AM, Peter Zijlstra wrote:
On Thu, Apr 17, 2014 at 11:03:55AM -0400, Waiman Long wrote:
+/**
+ * trylock_pending - try to acquire queue spinlock using the pending bit
+ * @lock : Pointer to queue spinlock structure
+ * @pval : Pointer to value of the queue spinlock 32-bit