lkml.org 
[lkml]   [2012]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectsemaphore and mutex in current Linux kernel (3.2.2)
Date
Documentation/mutex-design.txt:

"- 'struct mutex' is smaller on most architectures: E.g. on x86,
'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes.
A smaller structure size means less RAM footprint, and better
CPU-cache utilization."
================================================================
Now in my x86-64 32-bit Linux environment, 'struct semaphone' is 16 bytes,
'struct mutex' is 20 bytes. So seems the RAM footprint advantages are not there...

For the performance advantages followed, I don't have the ./test-mutex and maybe the
testing environment, so haven't the 1st hand data for this item...






\
 
 \ /
  Last update: 2012-04-01 11:59    [W:0.078 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site