Re: [PATCH] x86: use WRITE_ONCE() when setting PTEs

From: Peter Zijlstra
Date: Thu Sep 06 2018 - 15:29:12 EST


On Thu, Sep 06, 2018 at 10:21:38AM -0700, Dave Hansen wrote:
> There's probably a massive number of things that would break if we
> assumed sane 64-bit writes can be observed piecemeal.

Do assume, it has been observed. WRITE_ONCE()/READ_ONCE() are _required_
if you cannot have load/store tearing.