On Thu, Aug 16, 2007 at 11:54:54AM -0700, Christoph Lameter wrote:
On Thu, 16 Aug 2007, Paul Mackerras wrote:
quoted
So I don't see any good reason to make the atomic API more complex by
having "volatile" and "non-volatile" versions of atomic_read. It
should just have the "volatile" behaviour.
If you want to make it less complex then drop volatile which causes weird
side effects without solving any problems as you just pointed out.
The other set of problems are communication between process context
and interrupt/NMI handlers. Volatile does help here. And the performance
impact of volatile is pretty near zero, so why have the non-volatile
variant?
Thanx, Paul