]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
locking/Documentation: Update locking/mutex-design.txt disadvantages
authorDavidlohr Bueso <davidlohr@hp.com>
Wed, 30 Jul 2014 20:41:56 +0000 (13:41 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Aug 2014 08:32:04 +0000 (10:32 +0200)
Fortunately Jason was able to reduce some of the overhead we
had introduced in the original rwsem optimistic spinning -
an it is now the same size as mutexes. Update the documentation
accordingly.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Jason Low <jason.low2@hp.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: aswin@hp.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Link: http://lkml.kernel.org/r/1406752916-3341-7-git-send-email-davidlohr@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Documentation/locking/mutex-design.txt

index ee231ed09ec6fd96bbc75f6b7a3a76272ffd9500..60c482df1a38db2b300952832095ef41e2b8e655 100644 (file)
@@ -145,9 +145,9 @@ Disadvantages
 
 Unlike its original design and purpose, 'struct mutex' is larger than
 most locks in the kernel. E.g: on x86-64 it is 40 bytes, almost twice
-as large as 'struct semaphore' (24 bytes) and 8 bytes shy of the
-'struct rw_semaphore' variant. Larger structure sizes mean more CPU
-cache and memory footprint.
+as large as 'struct semaphore' (24 bytes) and tied, along with rwsems,
+for the largest lock in the kernel. Larger structure sizes mean more
+CPU cache and memory footprint.
 
 When to use mutexes
 -------------------