mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
f269f40ad5
commit
d12e1e50e4
2 changed files with 31 additions and 7 deletions
|
@ -12,7 +12,6 @@ struct task_struct;
|
|||
struct sem_array {
|
||||
struct kern_ipc_perm ____cacheline_aligned_in_smp
|
||||
sem_perm; /* permissions .. see ipc.h */
|
||||
time_t sem_otime; /* last semop time */
|
||||
time_t sem_ctime; /* last change time */
|
||||
struct sem *sem_base; /* ptr to first semaphore in array */
|
||||
struct list_head pending_alter; /* pending operations */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue