Re: [PATCH] rwsem: fix missed wakeup due to reordering of load

From: Peter Zijlstra
Date: Thu Jul 27 2017 - 12:59:46 EST


On Thu, Jul 27, 2017 at 11:48:53AM -0400, Waiman Long wrote:
> atomic_long_sub_return_release() is implmented.

I've not had time to really thing about the problem at hand, but this I
can answer:

TSO (x86, s390, sparc): fully serialized
PPC: lwsync; ll/sc (RCpc)
ARM64: ll/sc-release (RCsc)
other: smp_mb(); atomic_sub_return_relaxed();