Commit 0a7cbf9a authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Ingo Molnar

locking/Documentation: Update locking/mutex-design.txt disadvantages

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: default avatarDavidlohr Bueso <davidlohr@hp.com>
Acked-by: default avatarJason Low <jason.low2@hp.com>
Signed-off-by: default avatarPeter 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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 214e0aed
...@@ -145,9 +145,9 @@ Disadvantages ...@@ -145,9 +145,9 @@ Disadvantages
Unlike its original design and purpose, 'struct mutex' is larger than 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 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 as large as 'struct semaphore' (24 bytes) and tied, along with rwsems,
'struct rw_semaphore' variant. Larger structure sizes mean more CPU for the largest lock in the kernel. Larger structure sizes mean more
cache and memory footprint. CPU cache and memory footprint.
When to use mutexes When to use mutexes
------------------- -------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment