diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2013-07-08 16:01:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-18 07:45:47 -0700 |
commit | ab63bc97faaa8e26cef944eda370cf83ca818ca5 (patch) | |
tree | 68993c916542750508c50d68bf2db69fd5d909ad /include | |
parent | 0824e44c3f0aa0d5dc3d06910a09b9bbaa53d2f6 (diff) | |
download | linux-3.10-ab63bc97faaa8e26cef944eda370cf83ca818ca5.tar.gz linux-3.10-ab63bc97faaa8e26cef944eda370cf83ca818ca5.tar.bz2 linux-3.10-ab63bc97faaa8e26cef944eda370cf83ca818ca5.zip |
ipc/sem: separate wait-for-zero and alter tasks into seperate queues
commit 1a82e9e1d0f1b45f47a97c9e2349020536ff8987 upstream.
Introduce separate queues for operations that do not modify the
semaphore values. Advantages:
- Simpler logic in check_restart().
- Faster update_queue(): Right now, all wait-for-zero operations are
always tested, even if the semaphore value is not 0.
- wait-for-zero gets again priority, as in linux <=3.0.9
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>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sem.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h index 53d42650b19..55e17f68d25 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h @@ -15,7 +15,10 @@ struct sem_array { 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 sem_pending; /* pending operations to be processed */ + struct list_head pending_alter; /* pending operations */ + /* that alter the array */ + struct list_head pending_const; /* pending complex operations */ + /* that do not alter semvals */ struct list_head list_id; /* undo requests on this array */ int sem_nsems; /* no. of semaphores in array */ int complex_count; /* pending complex operations */ |