Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261334AbUKFHld (ORCPT ); Sat, 6 Nov 2004 02:41:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261335AbUKFHld (ORCPT ); Sat, 6 Nov 2004 02:41:33 -0500 Received: from mx2.elte.hu ([157.181.151.9]:1240 "EHLO mx2.elte.hu") by vger.kernel.org with ESMTP id S261334AbUKFHlX (ORCPT ); Sat, 6 Nov 2004 02:41:23 -0500 Date: Sat, 6 Nov 2004 08:42:19 +0100 From: Ingo Molnar To: Scott Wood Cc: john cooper , Mark_H_Johnson@raytheon.com, Karsten Wiese , Bill Huey , Adam Heath , "K.R. Foley" , linux-kernel@vger.kernel.org, Florian Schmidt , Fernando Pablo Lopez-Lezcano , Lee Revell , Rui Nuno Capela , Thomas Gleixner , Michal Schmidt Subject: Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1 Message-ID: <20041106074219.GD8285@elte.hu> References: <20041104163012.GA3498@elte.hu> <20041104163254.GA3810@elte.hu> <418A7BFB.6020501@timesys.com> <20041104194416.GC10107@elte.hu> <20041105214238.GA11075@yoda.timesys> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041105214238.GA11075@yoda.timesys> User-Agent: Mutt/1.4.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1496 Lines: 36 * Scott Wood 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/