Skip to content

Commit 628fd55

Browse files
committed
tools/memory-model: Remove smp_read_barrier_depends() from informal doc
smp_read_barrier_depends() has gone the way of mmiowb() and so many esoteric memory barriers before it. Drop the two mentions of this deceased barrier from the LKMM informal explanation document. Acked-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 9ce1b14 commit 628fd55

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

tools/memory-model/Documentation/explanation.txt

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,12 +1122,10 @@ maintain at least the appearance of FIFO order.
11221122
In practice, this difficulty is solved by inserting a special fence
11231123
between P1's two loads when the kernel is compiled for the Alpha
11241124
architecture. In fact, as of version 4.15, the kernel automatically
1125-
adds this fence (called smp_read_barrier_depends() and defined as
1126-
nothing at all on non-Alpha builds) after every READ_ONCE() and atomic
1127-
load. The effect of the fence is to cause the CPU not to execute any
1128-
po-later instructions until after the local cache has finished
1129-
processing all the stores it has already received. Thus, if the code
1130-
was changed to:
1125+
adds this fence after every READ_ONCE() and atomic load on Alpha. The
1126+
effect of the fence is to cause the CPU not to execute any po-later
1127+
instructions until after the local cache has finished processing all
1128+
the stores it has already received. Thus, if the code was changed to:
11311129

11321130
P1()
11331131
{
@@ -1146,14 +1144,14 @@ READ_ONCE() or another synchronization primitive rather than accessed
11461144
directly.
11471145

11481146
The LKMM requires that smp_rmb(), acquire fences, and strong fences
1149-
share this property with smp_read_barrier_depends(): They do not allow
1150-
the CPU to execute any po-later instructions (or po-later loads in the
1151-
case of smp_rmb()) until all outstanding stores have been processed by
1152-
the local cache. In the case of a strong fence, the CPU first has to
1153-
wait for all of its po-earlier stores to propagate to every other CPU
1154-
in the system; then it has to wait for the local cache to process all
1155-
the stores received as of that time -- not just the stores received
1156-
when the strong fence began.
1147+
share this property: They do not allow the CPU to execute any po-later
1148+
instructions (or po-later loads in the case of smp_rmb()) until all
1149+
outstanding stores have been processed by the local cache. In the
1150+
case of a strong fence, the CPU first has to wait for all of its
1151+
po-earlier stores to propagate to every other CPU in the system; then
1152+
it has to wait for the local cache to process all the stores received
1153+
as of that time -- not just the stores received when the strong fence
1154+
began.
11571155

11581156
And of course, none of this matters for any architecture other than
11591157
Alpha.

0 commit comments

Comments
 (0)