On Thu, 27 Jul 2023 at 12:10, Nadav Amit <nadav.amit@xxxxxxxxx> wrote: > > Interesting. I wonder if you considered adding to READ_ONCE() something > like: > > asm volatile("" : "+g" (x) ); > > So later loads (such as baz = *ptr) would reload the updated value. Not necessarily a bad idea. Although I suspect you'd want to add *two* of them - on either side - to make sure any previous loads wouldn't be moved around it either. Linus