Re: [PATCH 3/4] rhashtable: use bit_spin_locks to protect hash bucket.
From: Herbert Xu
Date: Tue Mar 26 2019 - 23:45:51 EST
On Wed, Mar 27, 2019 at 09:35:18AM +1100, NeilBrown wrote:
>
> The bit_spin_unlock(), which I am avoiding as unnecessary, would have
> provided release semantics.
> i.e. any write by this CPU that happened before the releasing write
> will be visible to other CPUs before (or when) they see the result of
> the releasing write.
> This is (as I understand it) exactly that rcu_assign_pointer() promises
> - even before acquire semantics were added as Paul just reported.
>
> So yes, I am sure (surer now that I've walked through it carefully).
Given that rcu_assign_pointer now does a store release it should
indeed be safe. Thanks!
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt