Sorry for the delay, was busy or away from keyboard for various reasons... On Tue, May 06, 2008 at 06:32:24AM -0700, Paul E. McKenney wrote: > On Tue, May 06, 2008 at 11:38:24AM +0200, Nick Piggin wrote: > > > > I'm wondering about this... and the problem does not only exist in > > memory ordering situations, but also just when using a single loaded > > value in a lot of times. > > > > I'd be slightly worried about requiring this of threaded code. Even > > the regular memory ordering bugs we even have in core mm code is kind of > > annoying (and it is by no means just this current bug). > > > > Is it such an improvement to refetch a pointer versus spilling to stack? > > Can we just ask gcc for a -multithreading-for-dummies mode? > > I have thus far not been successful on this one in the general case. > It would be nice to be able to tell gcc that you really mean it when > you assign to a local variable... Yes, exactly... > > In that case it isn't really an ordering issue between two variables, > > but an issue within a single variable. And I'm not exactly sure we want > > to go down the path of trying to handle this. At least it probably belongs > > in a different patch. > > Well, I have seen this sort of thing in real life with gcc, so I can't say > that I agree... I was quite surprised the first time around! I didn't intend to suggest that you are incorrect, or that ACCESS_ONCE is not technically required for correctness. But I question whether it is better to try fixing this throughout our source code, or in gcc's. -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html