Messages in this thread | | | Date | Mon, 9 Sep 2019 16:21:11 +1000 | From | Herbert Xu <> | Subject | Re: [PATCH 1/1] Fix: trace sched switch start/stop racy updates |
| |
Peter Zijlstra <peterz@infradead.org> wrote: > > Paulmck actually has an example of that somewhere; ISTR that particular > case actually got fixed by GCC, but I'd really _love_ for some compiler > people (both GCC and LLVM) to state that their respective compilers will > not do load/store tearing for machine word sized load/stores. > > Without this written guarantee (which supposedly was in older GCC > manuals but has since gone missing), I'm loathe to rely on it.
IIRC in that case gcc actually broke atomic writes even with a volatile keyword. So even WRITE_ONCE wouldn't have saved us.
Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
| |