Re: [PATCH] Fix WARN_ON / WARN_ON_ONCE regression

Jeremy Fitzhardinge
2006-10-10T22:59:43Z

Steven Rostedt wrote:
> In todays world, SMP is becoming more and more common (still waiting to
> get that DualCore cell phone). So that means that writing to a variable
> is going to carry more weight than it use to, and gcc needs to take note
> of this. So, to avoid a short condition jump by adding a write to
> memory, is not going to save anying.
>

In general shared variables are going to be pretty rare, and its
reasonable for gcc to assume they aren't. But it would be nice to have
a good way to solve cases like this (though it seems like (condition) &&
__warn_once is the right way to go here anyway).

J