]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/sem.c: replace shared sem_otime with per-semaphore value
authorManfred Spraul <manfred@colorfullife.com>
Wed, 19 Jun 2013 00:08:32 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:47 +0000 (17:27 +1000)
commita9986a146c32f8a102bbcd2fa15cec32b13d99b5
treea57e08271ae6aa5ed5a450e73209b59c86e6347b
parent29395f3f6174ce4d9f297494ff6d3ff076c19b6b
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>
include/linux/sem.h
ipc/sem.c