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
Also in
linux-alpha, linux-arm-kernel, lkml
Reply to
Marco Elver, 2020-06-30
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.
Thread (58 messages) 58 messages, 12 authors, last reply 2020-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help