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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Oct 2013 14:45:47 +0000 (07:45 -0700)
commitab63bc97faaa8e26cef944eda370cf83ca818ca5
tree68993c916542750508c50d68bf2db69fd5d909ad
parent0824e44c3f0aa0d5dc3d06910a09b9bbaa53d2f6
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>
include/linux/sem.h
ipc/sem.c