Re: [PATCH 1/2] kthread: add barriers to set_kthread_struct() and to_kthread()

From: Tejun Heo
Date: Thu Mar 16 2017 - 12:09:56 EST


On Thu, Mar 16, 2017 at 04:55:34PM +0100, Peter Zijlstra wrote:
> > Oops, as for adding lockless_assign_pointer(), wouldn't smp_wmb() be a
> > better match for smp_read_barrier_depends()? ISTR acquire/release
> > pairs being more expensive on some archs.
>
> 88c1863066cc ("rcu: Define rcu_assign_pointer() in terms of smp_store_release()")

Hmmm, nice, can we always prefer store_release over wmb from now on?

Thanks.

--
tejun