# Re: \[PATCH 18/18\] arm64: lto: Strengthen READ\_ONCE() to acquire when CLANG\_LTO=y

- From: Peter Zijlstra \<peterz@infradead.org\>
- Date: 2020-06-30 20:21:46 
- List: virtualization
- Page: https://ratatoskr.run/virtualization/2020/06/6020829
- Thread: https://ratatoskr.run/linux-arm-kernel/2020/06/6020640/t.md

```text
On Tue, Jun 30, 2020 at 09:47:30PM +0200, Marco Elver wrote:
> I do wonder, though, if there is some way to make the compiler do
> something better for us. Clearly, implementing real
> memory_order_consume hasn't worked out until today. But maybe the
> compiler could promote dependent loads to acquires if it recognizes it
> lost dependencies during optimizations. Just thinking out loud, it
> probably still has some weird corner case that will break. ;-)

I'd be very hesitant to let the compiler upgrade the ordering for us,
specifically because we're not using C11 crud and are using a lot of
inline asm.
```
