Patchwork Documentation: rw_lock lessons learned

login
register
mail settings
Submitter William Allen Simpson
Date Nov. 10, 2009, 6:23 p.m.
Message ID <4AF9AFB5.7080809@gmail.com>
Download mbox | patch
Permalink /patch/38084/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

William Allen Simpson - Nov. 10, 2009, 6:23 p.m.
In recent weeks, two different network projects erroneously
strayed down the rw_lock path.  Update the Documentation
based upon comments in those threads.
---
  Documentation/spinlocks.txt |   14 ++++++++++++++
  1 files changed, 14 insertions(+), 0 deletions(-)

Patch

diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 619699d..c112052 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -233,4 +233,18 @@  indeed), while write-locks need to protect themselves against interrupts.
 
 		Linus
 
+----
+
+The implications of spin_locks on memory are further described in:
+
+  Documentation/memory-barriers.txt
+    (5) LOCK operations.
+    (6) UNLOCK operations.
+
+----
+
+We are working hard to remove reader-writer spinlocks (rw_lock) from the
+network stack, so please don't add a new one.  Instead, see:
+
+  Documentation/RCU/rcu.txt