]> git.baikalelectronics.ru Git - kernel.git/commit
ipc/sem.c: replace shared sem_otime with per-semaphore value
authorManfred Spraul <manfred@colorfullife.com>
Mon, 8 Jul 2013 23:01:25 +0000 (16:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:28 +0000 (10:33 -0700)
commit6b25ce22e1c3ce969537526d0c164ae7aba14f67
tree83b54585a883ee062353eb464d93944d08ab4a1c
parentb8b2ce70c2600ceb0d957d5e2673ad9c3f2ef98b
ipc/sem.c: replace shared sem_otime with per-semaphore value

sem_otime contains the time of the last semaphore operation that
completed successfully.  Every operation updates this value, thus access
from multiple cpus can cause thrashing.

Therefore the patch replaces the variable with a per-semaphore variable.
The per-array sem_otime is only calculated when required.

No performance improvement on a single-socket i3 - only important for
larger systems.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sem.h
ipc/sem.c