On 03/02/2014 09:10 AM, Oleg Nesterov wrote:
On 02/26, Waiman Long wrote:
+#define _ARCH_SUPPORTS_ATOMIC_8_16_BITS_OPS
+
+/*
+ * x86-64 specific queue spinlock union structure
+ */
+union arch_qspinlock {
+       struct qspinlock slock;
+       u8               lock;  /* Lock bit     */
+};
And this enables the optimized version of queue_spin_setlock().

But why does it check ACCESS_ONCE(qlock->lock) == 0 ? This is called
right after queue_get_lock_qcode() returns 0, this locked should be
likely unlocked.

Oleg.


Yes, the read check in queue_spin_setlock is probably redundant. Will remove that.

-Longman
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to