Re: [PATCH] remove volatile from nmi.c

From: Steven Rostedt
Date: Fri Jul 14 2006 - 12:59:11 EST


On Fri, 2006-07-14 at 09:47 -0700, Linus Torvalds wrote:

>
> So I'd argue that it's actually _worse_ to do a "mindless" conversion away
> from volatile, than it is to just remove them outright. Removing them
> outright may show a bug that the volatile hid (and at that point, people
> may see what the _deeper_ problem was), but at least it won't add a memory
> barrier that isn't necessary and will potentially just confuse people.

Perfectly agree, and that is why in my post I said this was a learning
experience for me and to please review. Thinking, at worst you guys
just tell me I'm completely wrong. At best I find a real bug and have a
fix for it. Seems I'm in between the two ;)

I believe I did find a real bug (just luck that it worked) but as you
say, my fix is wrong and if applied would hide the bug. So this was to
bring attention to would be bugs, and in the mean time, I learn exactly
how to use memory barriers and how to get rid of volatiles. Yes, this
was more of a blind change, and I should have looked more into exactly
what the code was doing. But this was more to bring attention to a
problem area than really to solve it.

Thanks for responding and giving me a lesson :)

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/