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

Re: [Xen-devel] [PATCH v7 6/9] spinlock: Introduce spin_lock_cb()



>>
>> +#define spin_lock_kick(l)                       \
>> +({                                              \to understand why
>> you need a stronger one here
>> +    smp_mb();                                   \
>
> arch_lock_signal() has already a barrier for ARM. So we have a double
> barrier now.
>
> However, the barrier is slightly weaker (smp_wmb()). I am not sure why
> you need to use a stronger barrier here. What you care is the write to
> be done before signaling, read does not much matter. Did I miss anything?

Yes, smp_wmb() should be sufficient.

Should I then add arch_lock_signal_wmb() --- defined as
arch_lock_signal() for ARM and smp_wmb() for x86?


-boris

>
> Cheers,
>
>> +    arch_lock_signal();                         \
>> +})
>> +
>>  /* Ensure a lock is quiescent between two critical operations. */
>>  #define spin_barrier(l)               _spin_barrier(l)
>>
>>
>


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

 


Rackspace

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