Re: br_read_lock SMP race fix

From: Andrea Arcangeli (andrea@suse.de)
Date: Thu Jul 27 2000 - 19:36:34 EST


On Thu, 27 Jul 2000, David S. Miller wrote:

>Here is one reason. Without the memory barrier nothing guarentees the
>store of the counter decrement will leave the local cpu store buffer
>in finite time (and thus be visible to the writer). [..]

Hmmm, are you really sure? I thought there was always a finite deadline
for a dirty buffer to be flushed to memory and to be made visible to all
other CPUs.

If you're right then we definitely need wmb() there ;).

BTW, what about the official semantics of the common code rmb() macro? Are
they the counterpart of wmb() or it have magic semantics? Is my definition
below the right one?

        RMB guarantees that reads to memory-like regions that precede the
        RMB are ordered before reads to memory-like regions that follow
        the RMB.

Andrea

-
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/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:25 EST