]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - Documentation/RCU/rcu_dereference.txt
Merge tag 'mac80211-for-davem-2017-05-23' of git://git.kernel.org/pub/scm/linux/kerne...
[karo-tx-linux.git] / Documentation / RCU / rcu_dereference.txt
index c0bf2441a2baf5f254ed64d6e4c117dda808fd2c..b2a613f16d747828e35fd182a0c9fe06c1107d0f 100644 (file)
@@ -138,6 +138,15 @@ o  Be very careful about comparing pointers obtained from
                This sort of comparison occurs frequently when scanning
                RCU-protected circular linked lists.
 
+               Note that if checks for being within an RCU read-side
+               critical section are not required and the pointer is never
+               dereferenced, rcu_access_pointer() should be used in place
+               of rcu_dereference(). The rcu_access_pointer() primitive
+               does not require an enclosing read-side critical section,
+               and also omits the smp_read_barrier_depends() included in
+               rcu_dereference(), which in turn should provide a small
+               performance gain in some CPUs (e.g., the DEC Alpha).
+
        o       The comparison is against a pointer that references memory
                that was initialized "a long time ago."  The reason
                this is safe is that even if misordering occurs, the