Re: [PATCH 5/5] ipc/sem.c: alternatives to preempt_disable()
From: Manfred Spraul
Date: Sat Jan 28 2012 - 14:01:15 EST
This is a multi-part message in MIME format.Hi,
On 01/24/2012 03:51 PM, Peter Zijlstra wrote:
Yes I think it should work, and I'm afraid I have to agree with not
being able to make the spinlock thing work properly. Even if you were
to use arch_spin_* primitives you can still run into the 256 limit --
although not from the preempt_count in that case. Nor would arch_spin_
do what we need on -rt.
I've attached an updated patch, with the spinlock version removed.
But: I think the patch belongs into the -RT tree, not into mainline:
CONFIG_PREEMPT_RT_BASE does not exist in mainline.
Additionally, I'm not sure if the completion-scheme is also necessary
for CONFIG_PREEMPT_RT_FULL
Just to keep everything in perspective:
- if one thread is woken up, the duration of the preempt_disable() block
is 2.5 microseconds on my 2 GHz Phenom.
- the scaling is nearly linear, i.e. if 256 threads are woken up, then
the duration is something like 0.5 milliseconds.
But: I'm not aware of any application that uses sysv sem for bulk
wakeups.
--
Manfred