]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
locking/Documentation: Move locking related docs into Documentation/locking/
authorDavidlohr Bueso <davidlohr@hp.com>
Wed, 30 Jul 2014 20:41:55 +0000 (13:41 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Aug 2014 08:32:03 +0000 (10:32 +0200)
Specifically:
  Documentation/locking/lockdep-design.txt
  Documentation/locking/lockstat.txt
  Documentation/locking/mutex-design.txt
  Documentation/locking/rt-mutex-design.txt
  Documentation/locking/rt-mutex.txt
  Documentation/locking/spinlocks.txt
  Documentation/locking/ww-mutex-design.txt

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: jason.low2@hp.com
Cc: aswin@hp.com
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Mason <clm@fb.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Josef Bacik <jbacik@fusionio.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: fengguang.wu@intel.com
Link: http://lkml.kernel.org/r/1406752916-3341-6-git-send-email-davidlohr@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
17 files changed:
Documentation/00-INDEX
Documentation/DocBook/kernel-locking.tmpl
Documentation/locking/lockdep-design.txt [moved from Documentation/lockdep-design.txt with 100% similarity]
Documentation/locking/lockstat.txt [moved from Documentation/lockstat.txt with 99% similarity]
Documentation/locking/mutex-design.txt [moved from Documentation/mutex-design.txt with 100% similarity]
Documentation/locking/rt-mutex-design.txt [moved from Documentation/rt-mutex-design.txt with 100% similarity]
Documentation/locking/rt-mutex.txt [moved from Documentation/rt-mutex.txt with 100% similarity]
Documentation/locking/spinlocks.txt [moved from Documentation/spinlocks.txt with 98% similarity]
Documentation/locking/ww-mutex-design.txt [moved from Documentation/ww-mutex-design.txt with 100% similarity]
MAINTAINERS
drivers/gpu/drm/drm_modeset_lock.c
include/linux/lockdep.h
include/linux/mutex.h
include/linux/rwsem.h
kernel/locking/mutex.c
kernel/locking/rtmutex.c
lib/Kconfig.debug

index 27e67a98b7be21c8457daef9e6921e6a7d17e7a4..1750fcef1ab4d524dfc126ab50874dde2e03a21b 100644 (file)
@@ -287,6 +287,8 @@ local_ops.txt
        - semantics and behavior of local atomic operations.
 lockdep-design.txt
        - documentation on the runtime locking correctness validator.
+locking/
+       - directory with info about kernel locking primitives
 lockstat.txt
        - info on collecting statistics on locks (and contention).
 lockup-watchdogs.txt
index e584ee12a1e76fc3242711eb0407c32b12f2fef3..7c9cc4846cb67144c9d5f864f018cfd8b3efb9b6 100644 (file)
@@ -1972,7 +1972,7 @@ machines due to caching.
    <itemizedlist>
     <listitem>
      <para>
-       <filename>Documentation/spinlocks.txt</filename>: 
+       <filename>Documentation/locking/spinlocks.txt</filename>:
        Linus Torvalds' spinlocking tutorial in the kernel sources.
      </para>
     </listitem>
similarity index 99%
rename from Documentation/lockstat.txt
rename to Documentation/locking/lockstat.txt
index 72d010689751b3cc7c60349342ede7cd3f8faf49..7428773a1e695b4d5c0accab5b3b2d248923bbe0 100644 (file)
@@ -12,7 +12,7 @@ Because things like lock contention can severely impact performance.
 - HOW
 
 Lockdep already has hooks in the lock functions and maps lock instances to
-lock classes. We build on that (see Documentation/lockdep-design.txt).
+lock classes. We build on that (see Documentation/lokcing/lockdep-design.txt).
 The graph below shows the relation between the lock functions and the various
 hooks therein.
 
similarity index 98%
rename from Documentation/spinlocks.txt
rename to Documentation/locking/spinlocks.txt
index 97eaf5727178f3b04dea397f0805ab2509d14635..ff35e40bdf5b542e33aa855c341306c7123473ed 100644 (file)
@@ -105,9 +105,9 @@ never used in interrupt handlers, you can use the non-irq versions:
        spin_unlock(&lock);
 
 (and the equivalent read-write versions too, of course). The spinlock will
-guarantee the same kind of exclusive access, and it will be much faster. 
+guarantee the same kind of exclusive access, and it will be much faster.
 This is useful if you know that the data in question is only ever
-manipulated from a "process context", ie no interrupts involved. 
+manipulated from a "process context", ie no interrupts involved.
 
 The reasons you mustn't use these versions if you have interrupts that
 play with the spinlock is that you can get deadlocks:
@@ -122,21 +122,21 @@ the other interrupt happens on another CPU, but it is _not_ ok if the
 interrupt happens on the same CPU that already holds the lock, because the
 lock will obviously never be released (because the interrupt is waiting
 for the lock, and the lock-holder is interrupted by the interrupt and will
-not continue until the interrupt has been processed). 
+not continue until the interrupt has been processed).
 
 (This is also the reason why the irq-versions of the spinlocks only need
 to disable the _local_ interrupts - it's ok to use spinlocks in interrupts
 on other CPU's, because an interrupt on another CPU doesn't interrupt the
 CPU that holds the lock, so the lock-holder can continue and eventually
-releases the lock). 
+releases the lock).
 
 Note that you can be clever with read-write locks and interrupts. For
 example, if you know that the interrupt only ever gets a read-lock, then
 you can use a non-irq version of read locks everywhere - because they
-don't block on each other (and thus there is no dead-lock wrt interrupts. 
-But when you do the write-lock, you have to use the irq-safe version. 
+don't block on each other (and thus there is no dead-lock wrt interrupts.
+But when you do the write-lock, you have to use the irq-safe version.
 
-For an example of being clever with rw-locks, see the "waitqueue_lock" 
+For an example of being clever with rw-locks, see the "waitqueue_lock"
 handling in kernel/sched/core.c - nothing ever _changes_ a wait-queue from
 within an interrupt, they only read the queue in order to know whom to
 wake up. So read-locks are safe (which is good: they are very common
index 1acc624ecfd7f81b826664121b1f16713464f7d2..aac481fcbf5cc698bd8c48578869a6053e05ea24 100644 (file)
@@ -5523,8 +5523,8 @@ M:        Ingo Molnar <mingo@redhat.com>
 L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/locking
 S:     Maintained
-F:     Documentation/lockdep*.txt
-F:     Documentation/lockstat.txt
+F:     Documentation/locking/lockdep*.txt
+F:     Documentation/locking/lockstat.txt
 F:     include/linux/lockdep.h
 F:     kernel/locking/
 
index 0dc57d5ecd10d1e7e777c04817b0fd1a67df79e9..3a02e5e3e9f3b58f83923776773cedd3fafa7012 100644 (file)
@@ -35,7 +35,7 @@
  * of extra utility/tracking out of our acquire-ctx.  This is provided
  * by drm_modeset_lock / drm_modeset_acquire_ctx.
  *
- * For basic principles of ww_mutex, see: Documentation/ww-mutex-design.txt
+ * For basic principles of ww_mutex, see: Documentation/locking/ww-mutex-design.txt
  *
  * The basic usage pattern is to:
  *
index 008388f920d7e93e32ba388dd4b497f33d7bd49d..f388481201cd4848613c065fb24e915e0381d785 100644 (file)
@@ -4,7 +4,7 @@
  *  Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
  *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
  *
- * see Documentation/lockdep-design.txt for more details.
+ * see Documentation/locking/lockdep-design.txt for more details.
  */
 #ifndef __LINUX_LOCKDEP_H
 #define __LINUX_LOCKDEP_H
index e4c29418f4072c101adcc0bc5928d5798d5b0fcd..cc31498fc526d42788b6800105ba43d8a9d25c4a 100644 (file)
@@ -133,7 +133,7 @@ static inline int mutex_is_locked(struct mutex *lock)
 
 /*
  * See kernel/locking/mutex.c for detailed documentation of these APIs.
- * Also see Documentation/mutex-design.txt.
+ * Also see Documentation/locking/mutex-design.txt.
  */
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
index 035d3c57fc8a7147207c1d2cf4e532a355c9d8ae..8f498cdde2802e25667e3143eac3a6945554563c 100644 (file)
@@ -149,7 +149,7 @@ extern void downgrade_write(struct rw_semaphore *sem);
  * static then another method for expressing nested locking is
  * the explicit definition of lock class keys and the use of
  * lockdep_set_class() at lock initialization time.
- * See Documentation/lockdep-design.txt for more details.)
+ * See Documentation/locking/lockdep-design.txt for more details.)
  */
 extern void down_read_nested(struct rw_semaphore *sem, int subclass);
 extern void down_write_nested(struct rw_semaphore *sem, int subclass);
index 0d8b6ed938743c119e5193da1a245f1633a1ef2e..dadbf88c22c48cea044aac4e34fda9deec78636a 100644 (file)
@@ -15,7 +15,7 @@
  *    by Steven Rostedt, based on work by Gregory Haskins, Peter Morreale
  *    and Sven Dietrich.
  *
- * Also see Documentation/mutex-design.txt.
+ * Also see Documentation/locking/mutex-design.txt.
  */
 #include <linux/mutex.h>
 #include <linux/ww_mutex.h>
index a0ea2a141b3b0fff9614435559dc9e140f31ea69..7c98873a30777f131541a36889631c1efea79320 100644 (file)
@@ -8,7 +8,7 @@
  *  Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt
  *  Copyright (C) 2006 Esben Nielsen
  *
- *  See Documentation/rt-mutex-design.txt for details.
+ *  See Documentation/locking/rt-mutex-design.txt for details.
  */
 #include <linux/spinlock.h>
 #include <linux/export.h>
index 901096d31c66f666d0e47b5b8b886c34e2016bf6..9b94a063e26c2c8678aac7db9d003a9729bb490e 100644 (file)
@@ -924,7 +924,7 @@ config PROVE_LOCKING
         the proof of observed correctness is also maintained for an
         arbitrary combination of these separate locking variants.
 
-        For more details, see Documentation/lockdep-design.txt.
+        For more details, see Documentation/locking/lockdep-design.txt.
 
 config LOCKDEP
        bool
@@ -945,7 +945,7 @@ config LOCK_STAT
        help
         This feature enables tracking lock contention points
 
-        For more details, see Documentation/lockstat.txt
+        For more details, see Documentation/locking/lockstat.txt
 
         This also enables lock events required by "perf lock",
         subcommand of perf.