Re: [PATCH] arch: Introduce read_acquire()
From: Peter Zijlstra
Date: Wed Nov 12 2014 - 05:15:56 EST
On Tue, Nov 11, 2014 at 01:12:32PM -0800, Alexander Duyck wrote:
> >Minor nit on naming, but load_acquire would match what we do with barriers,
> >where you simply drop the smp_ prefix if you want the thing to work on UP
> >systems too.
>
> The problem is this is slightly different, load_acquire in my mind would use
> a mb() call, I only use a rmb(). That is why I chose read_acquire as the
> name.
acquire is not about rmb vs mb, do read up on
Documentation/memory-barriers.txt. Its a distinctly different semantic.
Some archs simply lack the means of implementing this semantics and have
to revert to mb (stronger is always allowed).
Using the read vs load to wreck the acquire semantics is just insane.
--
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/