Messages in this thread | | | Date | Fri, 28 Jul 2000 02:36:34 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: br_read_lock SMP race fix |
| |
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/
| |