@@ -15,14 +15,14 @@ Address Dependency: When the address of a later memory access is computed
1515 3 do_something(p->a);
1616 4 rcu_read_unlock();
1717
18- In this case, because the address of "p->a" on line 3 is computed
19- from the value returned by the rcu_dereference() on line 2, the
20- address dependency extends from that rcu_dereference() to that
21- "p->a". In rare cases, optimizing compilers can destroy address
22- dependencies. Please see Documentation/RCU/rcu_dereference.rst
23- for more information.
18+ In this case, because the address of "p->a" on line 3 is computed
19+ from the value returned by the rcu_dereference() on line 2, the
20+ address dependency extends from that rcu_dereference() to that
21+ "p->a". In rare cases, optimizing compilers can destroy address
22+ dependencies. Please see Documentation/RCU/rcu_dereference.rst
23+ for more information.
2424
25- See also "Control Dependency" and "Data Dependency".
25+ See also "Control Dependency" and "Data Dependency".
2626
2727Acquire: With respect to a lock, acquiring that lock, for example,
2828 using spin_lock(). With respect to a non-lock shared variable,
@@ -59,23 +59,23 @@ Control Dependency: When a later store's execution depends on a test
5959 1 if (READ_ONCE(x))
6060 2 WRITE_ONCE(y, 1);
6161
62- Here, the control dependency extends from the READ_ONCE() on
63- line 1 to the WRITE_ONCE() on line 2. Control dependencies are
64- fragile, and can be easily destroyed by optimizing compilers.
65- Please see control-dependencies.txt for more information.
62+ Here, the control dependency extends from the READ_ONCE() on
63+ line 1 to the WRITE_ONCE() on line 2. Control dependencies are
64+ fragile, and can be easily destroyed by optimizing compilers.
65+ Please see control-dependencies.txt for more information.
6666
67- See also "Address Dependency" and "Data Dependency".
67+ See also "Address Dependency" and "Data Dependency".
6868
6969Cycle: Memory-barrier pairing is restricted to a pair of CPUs, as the
7070 name suggests. And in a great many cases, a pair of CPUs is all
7171 that is required. In other cases, the notion of pairing must be
7272 extended to additional CPUs, and the result is called a "cycle".
7373 In a cycle, each CPU's ordering interacts with that of the next:
7474
75- CPU 0 CPU 1 CPU 2
76- WRITE_ONCE(x, 1); WRITE_ONCE(y, 1); WRITE_ONCE(z, 1);
77- smp_mb(); smp_mb(); smp_mb();
78- r0 = READ_ONCE(y); r1 = READ_ONCE(z); r2 = READ_ONCE(x);
75+ CPU 0 CPU 1 CPU 2
76+ WRITE_ONCE(x, 1); WRITE_ONCE(y, 1); WRITE_ONCE(z, 1);
77+ smp_mb(); smp_mb(); smp_mb();
78+ r0 = READ_ONCE(y); r1 = READ_ONCE(z); r2 = READ_ONCE(x);
7979
8080 CPU 0's smp_mb() interacts with that of CPU 1, which interacts
8181 with that of CPU 2, which in turn interacts with that of CPU 0
0 commit comments