Messages in this thread | | | Date | Wed, 17 Jun 2015 18:58:02 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 11/18] seqcount: Introduce raw_write_seqcount_barrier() |
| |
On Wed, Jun 17, 2015 at 08:42:45AM -0700, Paul E. McKenney wrote: > > I would very much prefer a compiler switch that instructs the compiler > > to not do bloody stupid things like this instead of marking every other > > load/store in the kernel with volatile. > > I would of course be good with such a compiler switch, though my earlier > attempts to negotiate one were unsuccessful. But I don't believe that we > discussed a switch to specifically prohibit only use of to-be-stored-into > variables as temporary scratch space. The trick is finding restrictions > that are useful, but that don't imply -O0.
I would request on that disables all the 'stores from thin air' 'optimizations'. IOW assume everything is shared memory and concurrent unless you can prove its not so. For example a local stack variable that does not escape scope.
| |