From: Waiman Long <waiman.long@hp.com>
To: George Spelvin <linux@horizon.com>
Cc: JBeulich@novell.com, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org, mingo@kernel.org,
tglx@linutronix.de
Subject: Re: [PATCH RFC 1/2] qrwlock: A queue read/write lock implementation
Date: Fri, 19 Jul 2013 17:35:58 -0400 [thread overview]
Message-ID: <51E9B13E.5060602@hp.com> (raw)
In-Reply-To: <20130719211148.10251.qmail@science.horizon.com>
On 07/19/2013 05:11 PM, George Spelvin wrote:
>> What I have in mind is to have 2 separate rwlock initializers - one for
>> fair and one for reader-bias behavior. So the lock owners can decide
>> what behavior do they want with a one line change.
> That's definitely a nicer patch, if it will work. I was imagining that,
> even for a single (type of) lock, only a few uses require reader bias
> (because they might be recursive, or are in an interrupt), but you'd
> want most read_lock sites to be fair.
Yes, fair rwlock will be the default.
> Deciding on a per-lock basis means that one potentially recursive call
> means you can't use fair queueing anywhere.
>
> I was hoping that the number of necessary unfair calls would
> be small enough that making the read_lock default fair and
> only marking the unfair call sites would be enough.
>
> But I don't really know until doing a survey of the calls.
I think so. The queue read/write lock, if merged, will be an optional
feature for people to try out to see if they see any problem in any of
the existing rwlock. So far, I didn't encounter any problem in my testing.
BTW, I also tried my version of the rwlock without the waiting queue. In
high contention case, it performs slightly better than the
__read_lock_failed changes suggested by Ingo at least for the
reader-bias one. It is still not as good as the full version with the
waiting queue. I should be able to provide more performance data next week.
Regards,
Longman
next prev parent reply other threads:[~2013-07-19 21:36 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 12:55 [PATCH RFC 1/2] qrwlock: A queue read/write lock implementation George Spelvin
2013-07-18 13:43 ` Waiman Long
2013-07-18 18:46 ` George Spelvin
2013-07-19 15:43 ` Waiman Long
2013-07-19 21:11 ` George Spelvin
2013-07-19 21:35 ` Waiman Long [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-18 13:18 George Spelvin
2013-07-13 1:34 [PATCH RFC 0/2] qrwlock: Introducing a " Waiman Long
2013-07-13 1:34 ` [PATCH RFC 1/2] qrwlock: A " Waiman Long
2013-07-13 1:34 ` Waiman Long
2013-07-15 14:39 ` Steven Rostedt
2013-07-15 14:39 ` Steven Rostedt
2013-07-15 20:44 ` Waiman Long
2013-07-15 20:44 ` Waiman Long
2013-07-15 22:31 ` Thomas Gleixner
2013-07-15 22:31 ` Thomas Gleixner
2013-07-16 1:19 ` Waiman Long
2013-07-16 1:19 ` Waiman Long
2013-07-18 7:42 ` Ingo Molnar
2013-07-18 7:42 ` Ingo Molnar
2013-07-18 7:42 ` Ingo Molnar
2013-07-18 13:40 ` Waiman Long
2013-07-18 13:40 ` Waiman Long
2013-07-18 13:40 ` Waiman Long
2013-07-19 8:40 ` Ingo Molnar
2013-07-19 8:40 ` Ingo Molnar
2013-07-19 8:40 ` Ingo Molnar
2013-07-19 15:30 ` Waiman Long
2013-07-19 15:30 ` Waiman Long
2013-07-19 15:30 ` Waiman Long
2013-07-22 10:34 ` Ingo Molnar
2013-07-22 10:34 ` Ingo Molnar
2013-07-22 10:34 ` Ingo Molnar
2013-07-24 0:03 ` Waiman Long
2013-07-24 0:03 ` Waiman Long
2013-07-24 0:03 ` Waiman Long
2013-07-18 10:22 ` Thomas Gleixner
2013-07-18 10:22 ` Thomas Gleixner
2013-07-18 14:19 ` Waiman Long
2013-07-18 14:19 ` Waiman Long
2013-07-21 5:42 ` Raghavendra K T
2013-07-21 5:42 ` Raghavendra K T
2013-07-21 5:42 ` Raghavendra K T
2013-07-23 23:54 ` Waiman Long
2013-07-23 23:54 ` Waiman Long
2013-07-23 23:54 ` Waiman Long
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=51E9B13E.5060602@hp.com \
--to=waiman.long@hp.com \
--cc=JBeulich@novell.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=mingo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.