From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Friesen <chris.friesen@windriver.com>,
rt-users <linux-rt-users@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: semantics of reader/writer semaphores in rt patch
Date: Sun, 26 Oct 2014 08:42:57 +0100 [thread overview]
Message-ID: <20141026074257.GC10501@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.11.1410260019280.5308@nanos>
On Sun, Oct 26, 2014 at 12:21:31AM +0200, Thomas Gleixner wrote:
> On Sun, 26 Oct 2014, Thomas Gleixner wrote:
> > On Thu, 23 Oct 2014, Chris Friesen wrote:
> > > Does the RT kernel just disallow this sort of algorithm?
> >
> > Yes. For a good reason. Let's add thread C
> >
> > A B C
> > down_read(X)
> > down_write(X)
> > lock(Y)
> > modify data
> > unlock(Y)
> > wake(B)
> > down_read(X)
> >
> > Due to the mainline rwsem fairness semantics:
> >
> > A holds X, C is blocked on A and B is blocked on A.
> >
> > Deadlock, without RT and the single reader restriction being involved.
> >
> > So RT does not violate ANY of the existing mainline semantics, it just
> > imposes a performance impact of not allowing multiple readers.
>
> @peterz: It might be worthwhile to have a CONFIG_LOCKDEP=y dependent
> mode which restricts concurrent readers to 1 in mainline to catch this
> kind of stuff. Hmm?
There were patches by ego that fix lockdep's read side tracking. I need
to find a few spare days to look at those :/
next prev parent reply other threads:[~2014-10-26 7:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <544956B8.2000406@windriver.com>
2014-10-25 22:19 ` semantics of reader/writer semaphores in rt patch Thomas Gleixner
2014-10-25 22:21 ` Thomas Gleixner
2014-10-26 7:42 ` Peter Zijlstra [this message]
2014-10-26 8:47 ` Peter Zijlstra
2014-10-27 15:02 ` Chris Friesen
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=20141026074257.GC10501@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=chris.friesen@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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