Re: [PATCH][RFC]: mutex: adaptive spin

From: Ingo Molnar
Date: Tue Jan 06 2009 - 12:02:46 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/