@@ -223,7 +223,7 @@ The Linux kernel's compiler barrier is barrier(). This primitive
223223prohibits compiler code-motion optimizations that might move memory
224224references across the point in the code containing the barrier(), but
225225does not constrain hardware memory ordering. For example, this can be
226- used to prevent to compiler from moving code across an infinite loop:
226+ used to prevent the compiler from moving code across an infinite loop:
227227
228228 WRITE_ONCE(x, 1);
229229 while (dontstop)
@@ -274,7 +274,7 @@ different pieces of the concurrent algorithm. The variable stored to
274274by the smp_store_release(), in this case "y", will normally be used in
275275an acquire operation in other parts of the concurrent algorithm.
276276
277- To see the performance advantages, suppose that the above example read
277+ To see the performance advantages, suppose that the above example reads
278278from "x" instead of writing to it. Then an smp_wmb() could not guarantee
279279ordering, and an smp_mb() would be needed instead:
280280
@@ -394,17 +394,17 @@ from the value returned by the rcu_dereference() or srcu_dereference()
394394to that subsequent memory access.
395395
396396A call to rcu_dereference() for a given RCU-protected pointer is
397- usually paired with a call to a call to rcu_assign_pointer() for that
398- same pointer in much the same way that a call to smp_load_acquire() is
399- paired with a call to smp_store_release(). Calls to rcu_dereference()
400- and rcu_assign_pointer are often buried in other APIs, for example,
397+ usually paired with a call to rcu_assign_pointer() for that same pointer
398+ in much the same way that a call to smp_load_acquire() is paired with
399+ a call to smp_store_release(). Calls to rcu_dereference() and
400+ rcu_assign_pointer() are often buried in other APIs, for example,
401401the RCU list API members defined in include/linux/rculist.h. For more
402402information, please see the docbook headers in that file, the most
403- recent LWN article on the RCU API (https://lwn.net/Articles/777036 /),
403+ recent LWN article on the RCU API (https://lwn.net/Articles/988638 /),
404404and of course the material in Documentation/RCU.
405405
406406If the pointer value is manipulated between the rcu_dereference()
407- that returned it and a later dereference (), please read
407+ that returned it and a later rcu_dereference (), please read
408408Documentation/RCU/rcu_dereference.rst. It can also be quite helpful to
409409review uses in the Linux kernel.
410410
@@ -457,15 +457,15 @@ described earlier in this document.
457457These operations come in three categories:
458458
459459o Marked writes, such as WRITE_ONCE() and atomic_set(). These
460- primitives required the compiler to emit the corresponding store
460+ primitives require the compiler to emit the corresponding store
461461 instructions in the expected execution order, thus suppressing
462462 a number of destructive optimizations. However, they provide no
463463 hardware ordering guarantees, and in fact many CPUs will happily
464464 reorder marked writes with each other or with other unordered
465465 operations, unless these operations are to the same variable.
466466
467467o Marked reads, such as READ_ONCE() and atomic_read(). These
468- primitives required the compiler to emit the corresponding load
468+ primitives require the compiler to emit the corresponding load
469469 instructions in the expected execution order, thus suppressing
470470 a number of destructive optimizations. However, they provide no
471471 hardware ordering guarantees, and in fact many CPUs will happily
@@ -506,7 +506,7 @@ of the old value and the new value.
506506
507507Unmarked C-language accesses are unordered, and are also subject to
508508any number of compiler optimizations, many of which can break your
509- concurrent code. It is possible to used unmarked C-language accesses for
509+ concurrent code. It is possible to use unmarked C-language accesses for
510510shared variables that are subject to concurrent access, but great care
511511is required on an ongoing basis. The compiler-constraining barrier()
512512primitive can be helpful, as can the various ordering primitives discussed
0 commit comments