]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/sem.c: alternatives to preempt_disable()
authorManfred Spraul <manfred@colorfullife.com>
Fri, 12 Oct 2012 04:23:04 +0000 (15:23 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 16 Oct 2012 02:53:18 +0000 (13:53 +1100)
commit10005f482f5c8529b6cb7bfa3726f2729ddc6c0b
tree00ab27fe4688152f26db78535ad0a38ec3871e2a
parenta8ff4f20dbd604e96d72e3f16ca8c3f2d645ce08
ipc/sem.c: alternatives to preempt_disable()

ipc/sem.c uses a custom wakeup scheme that relies on preempt_disable().
On -RT, this causes increased latencies and debug warnings.

The patch adds two additional schemes:
- one built around a completion - could be better for -RT kernels
- one built around a spinlock - unfortunately it's broken
- and the current one

My preferred solution would be the spinlock implementation: RT would use
premptible spinlocks, mainline normal spinlocks.  Thus both get the
optimal implementation without any special code in ipc/sem.c.
Unfortunately, I don't see how it could be fixed.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/sem.c