Messages in this thread | | | From | Qian Cai <> | Subject | Re: [PATCH -next v2] locking/osq_lock: annotate a data race in osq_lock | Date | Mon, 11 May 2020 13:10:27 -0400 |
| |
> On May 11, 2020, at 12:54 PM, Will Deacon <will@kernel.org> 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@hirez.programming.kicks-ass.net
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.
| |