[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 2/8] qspinlock, x86: Enable x86-64 to use queue spinlock



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.