Re: [PATCH 4/4] locking: Introduce smp_cond_acquire()
From: Peter Zijlstra
Date: Mon Nov 02 2015 - 15:40:51 EST
On Mon, Nov 02, 2015 at 08:36:49PM +0000, David Howells wrote:
> Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > > + smp_read_barrier_depends(); /* ctrl */ \
> > > + smp_rmb(); /* ctrl + rmb := acquire */ \
>
> Doesn't smp_rmb() imply an smp_read_barrier_depends() anyway? In
> memory-barriers.txt, it says:
>
> Read memory barriers imply data dependency barriers, and so can
> substitute for them.
Yes, I noted that in a follow up email, Alpha implements both as MB. So
just the smp_rmb() is sufficient.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/