Re: ordered memory access

Jes Sorensen (Jes.Sorensen@cern.ch)
30 Sep 1999 17:12:02 +0200


>>>>> "Andrea" == Andrea Arcangeli <andrea@suse.de> writes:

Andrea> On 30 Sep 1999, Jes Sorensen wrote:
>> Aren't according to what architecture? Some architectures can only

Andrea> Yes, but as we was talking about common code so you can't
Andrea> assume that you are running on i386 (on i386 the lock on the
Andrea> bus alwyas enforce ordering).

Thats exactly my point, right now people tend to look at their
preferred architecture and say "thats what it does". Hence my request
for a decision and a small notice about it in the
documentation. Remember how many different oppinions we had on how
writel() behaves.

>> Intuitively I think it makes sense to do so, and I doubt it will be
>> a performance hit at all, but I am just guessing here.

Andrea> On alpha you'll avoid some mb/wmb additional asm instruction
Andrea> ;).

Andrea> If you don't test atomically the retval it make no sense to me
Andrea> to enforce ordering so the alpha implementation looks fine to
Andrea> me.

The case that Manfred brought up was perfectly valid - we could do
__raw_atomic_foo() functions to do it if there is a need. We could
also just decide that atomic_foo() does not guarantee ordering.

Jes

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