Thread (37 messages) 37 messages, 7 authors, 2026-02-19

Re: [PATCH v3 3/3] arm64, compiler-context-analysis: Permit alias analysis through __READ_ONCE() with CONFIG_LTO=y

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2026-02-16 15:33:13
Also in: lkml, llvm

On Mon, 16 Feb 2026 at 03:09, David Laight [off-list ref] wrote:
volatile structure members are almost free
No, gcc does absolutely horrible things with volatiles. It disables a
lot of very basic stuff.

Try doing something as simple as a "var++" on a volatile, and cry.

We need to have explicit 'READ_ONCE()' etc atomic accesses, just to
make it very very clear that the compiler will generate shit code.

We do *not* hide them and make them implicit by marking data
structures volatile. I very much want those explicit
READ_ONCE/WRITE_ONCE cases.

           Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help