]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ipc/sem.c: alternatives to preempt_disable()
authorManfred Spraul <manfred@colorfullife.com>
Fri, 28 Sep 2012 00:22:18 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Oct 2012 04:38:09 +0000 (15:38 +1100)
commit1091262f1833e13a5650d72149ef5574ab0fd4fa
treeaac9d34554089000061aa694c83274631d0d9434
parent121b1614b148604187a00a8fa8c2c7090f37bd19
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