On Mon, Apr 18, 2022 at 08:33:06AM +0000, Visa Hankala wrote:
> I think the sanest solution is to add the release and acquire barriers
> in refcnt_rele().

Getting memory barriers right is too complicated for developers
doing MP stuff.  The existing locking and refcount primitives have
to implement that functionality.  I am on visa@'s side and would
prefer a memory barrier in refcount API instead of searching for
races in MP code.

Better waste some CPU cycles in some cases than having strange
behavior due to missing barries in other cases.

bluhm

Reply via email to