]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/sem.c: alternatives to preempt_disable()
authorManfred Spraul <manfred@colorfullife.com>
Mon, 24 Oct 2011 15:00:07 +0000 (02:00 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Oct 2011 09:08:18 +0000 (20:08 +1100)
commit11673f9c255384420a3e7bc73b2f57a1106fdcd5
treedaca89ec6a1a445dddbf44253bcbc306e925f09e
parent5cee85b22f88b113e21a4f0755f6969dd396a25a
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