Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

From: Paul E. McKenney
Date: Thu Aug 16 2007 - 16:08:23 EST


On Thu, Aug 16, 2007 at 11:54:54AM -0700, Christoph Lameter wrote:
> On Thu, 16 Aug 2007, Paul Mackerras wrote:
> > 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
-
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/