From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>,
Dave Jones <davej@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Darren Hart <darren@dvhart.com>,
Davidlohr Bueso <davidlohr@hp.com>,
Ingo Molnar <mingo@kernel.org>,
Clark Williams <williams@redhat.com>,
Roland McGrath <roland@hack.frob.com>,
Carlos ODonell <carlos@redhat.com>,
Jakub Jelinek <jakub@redhat.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [patch 1/3] rtmutex: Add missing deadlock check
Date: Tue, 13 May 2014 15:00:09 -0700 [thread overview]
Message-ID: <20140513220009.GW18164@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1405132301530.6261@ionos.tec.linutronix.de>
On Tue, May 13, 2014 at 11:27:16PM +0200, Thomas Gleixner wrote:
> On Tue, 13 May 2014, Paul E. McKenney wrote:
> > On Tue, May 13, 2014 at 04:20:41PM -0400, Steven Rostedt wrote:
> > > What about having a module that creates a bunch of threads and forces
> > > all the scenarios that we want to test? Wouldn't it be easier to do
> > > than to have a userspace interface to dictate commands to the kernel?
> >
> > I second this approach! The kernel environment makes it -much- easier
> > to force races and other conditions, which turns into much simpler and
> > more effective tests.
>
> The point of the rtmutex tester was NOT to force races and stuff, it
> was intended to be a formal test for certain static scenarios:
>
> - verify boosting / debosting
> - verify set_scheduler interaction
> - verify deadlock detection
>
> The latter was incomplete and therefor missed the futex wreckage :(
>
> Having a formal checker makes a lot of sense.
>
> Plastering the code with a gazillion of trace_printks, waiting several
> hours for each iteration and staring into several GB of traces just to
> figure out, that it is an algorithmic issue, is utter waste of time
> and nerves. And that stuff is definitely complex enough to justify a
> static checker.
>
> Back then when I wrote it, it unearthed quite some logic bugs. And I
> needed the schedule_rt_mutex() hack to verify the BKL interaction and
> the lock steal machinery, which made it impossible to be a module. It
> could have been done, but that'd have been even more ugly hackery.
>
> So I made it a user space interface to add/modify test cases without
> recompiling the kernel. But now with BKL and the lock steal muck
> gone, we simply might kill it.
>
> Now that allows a module, but then I'm still not sure whether formal
> verification rules are fun to code in C. There are certainly better
> ways than the *.tst rules I defined back then. But yes, we could add a
> similar cryptic thing with static arrays of OP/Data pairs in C.
Good points -- I was indeed thinking about stress testing instead of
algorithmic testing.
Thanx, Paul
next prev parent reply other threads:[~2014-05-13 22:00 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 20:45 [patch 0/3] futex/rtmutex: Fix issues exposed by trinity Thomas Gleixner
2014-05-12 20:45 ` [patch 1/3] rtmutex: Add missing deadlock check Thomas Gleixner
2014-05-13 5:51 ` Lai Jiangshan
2014-05-13 8:45 ` Thomas Gleixner
2014-05-13 8:48 ` Peter Zijlstra
2014-05-13 16:12 ` Paul E. McKenney
2014-05-13 19:42 ` Thomas Gleixner
2014-05-13 20:20 ` Steven Rostedt
2014-05-13 20:36 ` Paul E. McKenney
2014-05-13 21:27 ` Thomas Gleixner
2014-05-13 22:00 ` Paul E. McKenney [this message]
2014-05-13 22:44 ` Steven Rostedt
2014-05-13 23:27 ` Paul E. McKenney
2014-05-13 23:53 ` Steven Rostedt
2014-05-14 0:12 ` Paul E. McKenney
2014-05-14 6:54 ` Thomas Gleixner
[not found] ` <CAGChsmO9GO1Z2VBbw7uLtTXpYowdoUQbK8C3=Dt2jtGAnc6D2A@mail.gmail.com>
2014-05-14 13:33 ` Thomas Gleixner
2014-05-14 6:42 ` Thomas Gleixner
2014-05-14 12:59 ` Thomas Gleixner
2014-05-12 20:45 ` [patch 2/3] futex: Add another early deadlock detection check Thomas Gleixner
2014-05-19 12:22 ` [tip:core/urgent] " tip-bot for Thomas Gleixner
2014-05-12 20:45 ` [patch 3/3] futex: Prevent attaching to kernel threads Thomas Gleixner
2014-05-12 20:54 ` Peter Zijlstra
2014-05-12 21:16 ` Thomas Gleixner
2014-05-12 21:59 ` Davidlohr Bueso
2014-05-12 22:18 ` Thomas Gleixner
2014-05-19 12:22 ` [tip:core/urgent] " tip-bot for Thomas Gleixner
2014-05-12 21:37 ` [patch 0/3] futex/rtmutex: Fix issues exposed by trinity Steven Rostedt
2014-05-12 21:52 ` Thomas Gleixner
2014-05-12 22:08 ` Steven Rostedt
2014-05-12 22:37 ` Thomas Gleixner
2014-05-12 23:18 ` Steven Rostedt
2014-05-13 6:37 ` Ingo Molnar
2014-05-13 3:54 ` Darren Hart
2014-05-13 9:08 ` Thomas Gleixner
2014-05-14 7:06 ` Carlos O'Donell
2014-05-14 10:26 ` Thomas Gleixner
2014-05-14 20:59 ` Carlos O'Donell
2014-05-14 22:54 ` Thomas Gleixner
2014-05-15 7:37 ` Peter Zijlstra
2014-05-15 8:25 ` Peter Zijlstra
2014-05-16 18:21 ` Carlos O'Donell
2014-05-14 6:58 ` Carlos O'Donell
2014-05-14 9:22 ` Peter Zijlstra
2014-05-14 21:17 ` Carlos O'Donell
2014-05-14 23:11 ` Thomas Gleixner
2014-05-16 17:54 ` Carlos O'Donell
2014-05-15 8:07 ` Peter Zijlstra
2014-05-16 18:14 ` Carlos O'Donell
2014-05-14 9:53 ` Thomas Gleixner
2014-05-14 10:07 ` Peter Zijlstra
2014-05-14 10:28 ` Thomas Gleixner
2014-05-16 17:55 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140513220009.GW18164@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=bigeasy@linutronix.de \
--cc=carlos@redhat.com \
--cc=darren@dvhart.com \
--cc=davej@redhat.com \
--cc=davidlohr@hp.com \
--cc=jakub@redhat.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=peterz@infradead.org \
--cc=roland@hack.frob.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox