diff options
author | Nick Piggin <npiggin@suse.de> | 2009-12-15 16:47:30 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 07:20:09 -0800 |
commit | d4212093dca95c1f52197017d969cc66d5d962aa (patch) | |
tree | f52484ae3c7b3034715b5745ae2b7db3906ab022 /kernel/sched_stats.h | |
parent | 9cad200c7686708b326520a45dd680a4147568a6 (diff) | |
download | kernel_samsung_espresso10-d4212093dca95c1f52197017d969cc66d5d962aa.tar.gz kernel_samsung_espresso10-d4212093dca95c1f52197017d969cc66d5d962aa.tar.bz2 kernel_samsung_espresso10-d4212093dca95c1f52197017d969cc66d5d962aa.zip |
ipc/sem.c: sem preempt improve
The strange sysv semaphore wakeup scheme has a kind of busy-wait lock
involved, which could deadlock if preemption is enabled during the "lock".
It is an implementation detail (due to a spinlock being held) that this is
actually the case. However if "spinlocks" are made preemptible, or if the
sem lock is changed to a sleeping lock for example, then the wakeup would
become buggy. So this might be a bugfix for -rt kernels.
Imagine waker being preempted by wakee and never clearing IN_WAKEUP -- if
wakee has higher RT priority then there is a priority inversion deadlock.
Even if there is not a priority inversion to cause a deadlock, then there
is still time wasted spinning.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Pierre Peiffer <peifferp@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched_stats.h')
0 files changed, 0 insertions, 0 deletions