Re: [patch 1/3] rtmutex: Add missing deadlock check

From: Thomas Gleixner
Date: Wed May 14 2014 - 02:54:42 EST




On Tue, 13 May 2014, Steven Rostedt wrote:

> On Tue, 13 May 2014 16:27:11 -0700
> "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> wrote:
>
> > On Tue, May 13, 2014 at 06:44:30PM -0400, Steven Rostedt wrote:
> > > On Tue, 13 May 2014 15:00:09 -0700
> > > "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> wrote:
> > >
> > >
> > > > Good points -- I was indeed thinking about stress testing instead of
> > > > algorithmic testing.
> > >
> > > But doesn't lockdep use algorithmic tests too?
> >
> > I suppose you could argue that there is no such thing as non-algorithmic
> > testing, given that all test code uses an algorithm of some sort. Perhaps
> > with the exception of letting your pet walk across the keyboard. ;-)
> >
> > Perhaps I should have instead said that I was thinking about random
> > testing instead of formal testing?
>
> Actually it still applies, but I was mistaken, it's not lockdep itself,
> it's the LOCKING_API_SELFTESTS. They are a form of formal testing as
> suppose to random testing.
>
> See lib/locking-selftest.c.
>
> That looks more like something we can do for the rtmutex code, or even
> add to it.

It's called from very early init. So no threads ...

Thinking about it with a bit more awake brain, we probably can do it
completely from user space via futex except for a single case, which
we handle in the futex code: recursive AA of a single task.

I want to look into ABBA et al detection for the futexes anyway, so
that might be sufficient. Need to do a few experiments.

Thanks,

tglx


--
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/