Re: 答复: [RFC] locking/rwsem: Avoid issuing wakeup before setting the reader waiter to nil

2018-11-30 Thread Peter Zijlstra
On Fri, Nov 30, 2018 at 09:34:19AM +, Liu,Qi(ACU-T1) wrote: > Is there a semantic divergence between x86 instruction "LOCK cmpxchg" > and the macro cmpxchg defined in linux kernel? The former guarantee > full barrier in any case, and the latter only imply barrier in case of > success? > So, we

答复: [RFC] locking/rwsem: Avoid issuing wakeup before setting the reader waiter to nil

2018-11-30 Thread Liu,Qi(ACU-T1)
Is there a semantic divergence between x86 instruction "LOCK cmpxchg" and the macro cmpxchg defined in linux kernel? The former guarantee full barrier in any case, and the latter only imply barrier in case of success? So, we use smp_mb__before_atomic() cmpxchg_relaxed() // no b