Messages in this thread | | | Date | Sat, 6 Nov 2004 08:42:19 +0100 | From | Ingo Molnar <> | Subject | Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1 |
| |
* Scott Wood <scott@timesys.com> wrote:
> > is the order of locks in the dependency chain really unpredictable? If > > two chain walkers get two locks in opposite order, doesnt that mean that > > the lock ordering (as attempted by the blocked tasks) is deadlock-prone > > already? I.e. this scenario should not happen. > > It *shouldn't*, but bugs do happen, and it'd be nice if a mutex > deadlock didn't get promoted into a less debuggable spinlock deadlock. > [...]
well, deadlock detection happens at lock-acquire time, so the deadlock will be detected _first_, any PI spinlock-locking will happen on already blocked (== no deadlock detected) tasks. This would also serve as a nice secondary check for the deadlock detector.
> [...] Plus, if there's any intention of ever exporting this priority > inheritance mechanism to userspace locks, we don't want to promote a > userspace deadlock into a kernel one.
agreed.
> Given how rarely contention should occur, I don't think that a single > lock would be a bottleneck except for obscenely large SMP machines.
well, blocking on a mutex happens quite frequently. But i dont have a problem with the big lock other than the usual "if we can do better then we should do better" attitude :-)
Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |