From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
RT <linux-rt-users@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Clark Williams <williams@redhat.com>
Subject: Re: [RFC][PATCH RT] rwsem_rt: Another (more sane) approach to mulit reader rt locks
Date: Tue, 15 May 2012 13:43:15 -0400 [thread overview]
Message-ID: <1337103795.14207.343.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1337103096.27694.94.camel@twins>
On Tue, 2012-05-15 at 19:31 +0200, Peter Zijlstra wrote:
> On Tue, 2012-05-15 at 13:25 -0400, Steven Rostedt wrote:
> > On Tue, 2012-05-15 at 11:42 -0400, Steven Rostedt wrote:
> > > On Tue, 2012-05-15 at 17:06 +0200, Peter Zijlstra wrote:
> > > > On Tue, 2012-05-15 at 10:03 -0400, Steven Rostedt wrote:
> > > > >
> > > > > where readers may nest (the same task may grab the same rwsem for
> > > > > read multiple times), but only one task may hold the rwsem at any
> > > > > given
> > > > > time (for read or write).
> > > >
> > > > Humm, that sounds iffy, rwsem isn't a recursive read lock only rwlock_t
> > > > is.
> > >
> > > In that case, current -rt is broken. As it has it being a recursive lock
> > > (without my patch).
>
> Nah not broken, just pointless. A recursive lock that's not used
> recursively is fine.
Heh, sure :-) But as -rt keeps it recursive, I didn't want to change
that.
>
> >
> > Why wouldn't it be recursive. If two different tasks are allowed to grab
> > a read lock at the same time, why can't the same task grab a read lock
> > twice? As long as it releases it the same amount of times.
> >
> > Now you can't grab a read lock if you have the write lock.
>
> rwsem is fifo-fair, if a writer comes in between the second read
> acquisition (even by the same task) would block and you'd be a deadlock
> since the write won't succeed since you're still holding a reader.
Yep agreed. And this patch didn't change that either.
-- Steve
next prev parent reply other threads:[~2012-05-15 17:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 14:03 [RFC][PATCH RT] rwsem_rt: Another (more sane) approach to mulit reader rt locks Steven Rostedt
2012-05-15 15:06 ` Peter Zijlstra
2012-05-15 15:42 ` Steven Rostedt
2012-05-15 17:25 ` Steven Rostedt
2012-05-15 17:31 ` Peter Zijlstra
2012-05-15 17:43 ` Steven Rostedt [this message]
2012-05-15 16:26 ` Steven Rostedt
2012-05-15 18:00 ` John Kacur
2012-05-15 18:14 ` Steven Rostedt
2012-05-17 15:18 ` Paul E. McKenney
2012-05-17 15:25 ` Paul E. McKenney
2012-05-17 15:32 ` Peter Zijlstra
2012-05-17 15:47 ` Paul E. McKenney
2012-05-17 16:17 ` Peter Zijlstra
2012-05-17 20:08 ` Paul E. McKenney
2012-05-17 20:20 ` Peter Zijlstra
2012-05-22 15:26 ` Thomas Gleixner
2012-05-22 15:50 ` Steven Rostedt
2012-05-22 16:40 ` Thomas Gleixner
2012-05-22 16:52 ` Steven Rostedt
2012-05-22 17:07 ` Thomas Gleixner
2012-05-22 17:50 ` Steven Rostedt
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=1337103795.14207.343.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).