Skip to content

Commit ad94463

Browse files
paulmckrcuneeraju
authored andcommitted
doc: Clarify historical disclaimers in memory-barriers.txt
This commit makes it clear that the reason that these sections are historical is that smp_read_barrier_depends() is no more. It also removes the point about comparison operations, given that there are other optimizations that can break address dependencies. Suggested-by: Jonas Oberhauser <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: Alan Stern <[email protected]> Cc: Andrea Parri <[email protected]> Cc: Will Deacon <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: David Howells <[email protected]> Cc: Jade Alglave <[email protected]> Cc: Luc Maranget <[email protected]> Cc: Akira Yokosawa <[email protected]> Cc: Daniel Lustig <[email protected]> Cc: Joel Fernandes <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent c49956b commit ad94463

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Documentation/memory-barriers.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,11 @@ Memory barriers come in four basic varieties:
396396

397397

398398
(2) Address-dependency barriers (historical).
399-
[!] This section is marked as HISTORICAL: For more up-to-date
400-
information, including how compiler transformations related to pointer
401-
comparisons can sometimes cause problems, see
402-
Documentation/RCU/rcu_dereference.rst.
399+
[!] This section is marked as HISTORICAL: it covers the long-obsolete
400+
smp_read_barrier_depends() macro, the semantics of which are now
401+
implicit in all marked accesses. For more up-to-date information,
402+
including how compiler transformations can sometimes break address
403+
dependencies, see Documentation/RCU/rcu_dereference.rst.
403404

404405
An address-dependency barrier is a weaker form of read barrier. In the
405406
case where two loads are performed such that the second depends on the
@@ -560,9 +561,11 @@ There are certain things that the Linux kernel memory barriers do not guarantee:
560561

561562
ADDRESS-DEPENDENCY BARRIERS (HISTORICAL)
562563
----------------------------------------
563-
[!] This section is marked as HISTORICAL: For more up-to-date information,
564-
including how compiler transformations related to pointer comparisons can
565-
sometimes cause problems, see Documentation/RCU/rcu_dereference.rst.
564+
[!] This section is marked as HISTORICAL: it covers the long-obsolete
565+
smp_read_barrier_depends() macro, the semantics of which are now implicit
566+
in all marked accesses. For more up-to-date information, including
567+
how compiler transformations can sometimes break address dependencies,
568+
see Documentation/RCU/rcu_dereference.rst.
566569

567570
As of v4.15 of the Linux kernel, an smp_mb() was added to READ_ONCE() for
568571
DEC Alpha, which means that about the only people who need to pay attention

0 commit comments

Comments
 (0)