Re: [PATCH -next v2] locking/osq_lock: annotate a data race in osq_lock
From: Qian Cai
Date: Mon May 11 2020 - 13:10:32 EST
> On May 11, 2020, at 12:54 PM, Will Deacon <will@xxxxxxxxxx> wrote:
>
> Hmm, I don't see how it can remove the cmpxchg(). Do you have a link to that
> discussion, please?
lore.kernel.org/lkml/20200211124753.GP14914@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Correction â if compilers could prove âprev->next != nodeâ is always true, that cmpxchg() would not run. cpu_relax() should be sufficient to keep that âif statementâ been optimized away in any case.