ipc/sem: separate wait-for-zero and alter tasks into seperate queues
authorManfred Spraul <manfred@colorfullife.com>
Mon, 8 Jul 2013 23:01:23 +0000 (16:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:28 +0000 (10:33 -0700)
commit1a82e9e1d0f1b45f47a97c9e2349020536ff8987
tree956810c32e02f6ae1527db015c6ae622800bd720
parentf5c936c0f267ec58641451cf8b8d39b4c207ee4d
ipc/sem: separate wait-for-zero and alter tasks into seperate queues

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>
include/linux/sem.h
ipc/sem.c