From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH][RFC]: mutex: adaptive spin Date: Tue, 6 Jan 2009 18:02:04 +0100 Message-ID: <20090106170204.GB32608@elte.hu> References: <87r63ljzox.fsf@basil.nowhere.org> <20090103191706.GA2002@parisc-linux.org> <1231093310.27690.5.camel@twins> <20090104184103.GE2002@parisc-linux.org> <1231242031.11687.97.camel@twins> <20090106121052.GA27232@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Zijlstra , Matthew Wilcox , Andi Kleen , Chris Mason , Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel , linux-btrfs , Thomas Gleixner , Steven Rostedt , Gregory Haskins , Nick Piggin To: Linus Torvalds Return-path: In-Reply-To: List-ID: * Linus Torvalds wrote: > On Tue, 6 Jan 2009, Linus Torvalds wrote: > > > > Right now, if some process deadlocks on a mutex, we get hung process, > > but with a nice backtrace and hopefully other things (that don't need > > that lock) still continue to work. > > Clarification: the "nice backtrace" we only get with something like > sysrq-W, of course. We don't get a backtrace _automatically_, but with > an otherwise live machine, there's a better chance that people do get > wchan or other info. IOW, it's at least a fairly debuggable situation. btw., the softlockup watchdog detects non-progressing uninterruptible tasks (regardless of whether they locked up due to mutexes or any other reason). This does occasionally help in debugging deadlocks: http://marc.info/?l=linux-mm&m=122889587725061&w=2 but it would indeed be also good to have the most common self-deadlock case checked unconditionally in the mutex slowpath. Ingo