From: Andi Kleen <ak@suse.de>
To: "Van Maren, Kevin" <kevin.vanmaren@unisys.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Linux-ia64] Linux kernel deadlock caused by spinlock bug
Date: 30 Jul 2002 15:32:08 +0200 [thread overview]
Message-ID: <p73vg6xs5nr.fsf@oldwotan.suse.de> (raw)
In-Reply-To: "Van Maren, Kevin"'s message of "29 Jul 2002 23:12:33 +0200"
"Van Maren, Kevin" <kevin.vanmaren@unisys.com> writes:
> There are ways of fixing the writer starvation and allowing recursive
> read locks, but that is more work (and heavier-weight than desirable).
One such way would be a variant of queued locks, like John Stultz's
http://oss.software.ibm.com/developer/opensource/linux/patches/?patch_id=218
These are usually needed for fairness even with plain spinlocks on NUMA
boxes in any case (so if your box is NUMA then you will need it anyways)
They only exist for plain spinlocks yet, but I guess they could be extended
to readlocks.
IIRC the benchmarks correctly they were about 3 times slower for the
uncontended case, but somewhat faster for contended locks. Of course
this is the wrong priority for linux - contended locks should be eliminated,
not optimized, but if there is no other choice for correctness it has to do.
> How pervasive are recursive reader locks? Should they be a special
> type of reader lock?
Not very common I hope, at least I cannot think of a case right now
(but then I don't claim to know all locks in linux)
Verifying that this case does not occur by code audit (or that
you have catched all instances if you made it a special case) would
be a lot of work: the 2.5.29 kernel has about 800 calls to read/write_lock
-Andi
next parent reply other threads:[~2002-07-30 13:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3FAD1088D4556046AEC48D80B47B478C0101F3AE@usslc-exch-4.slc.unisys.com.suse.lists.linux.kernel>
2002-07-30 13:32 ` Andi Kleen [this message]
2002-07-30 16:27 ` [Linux-ia64] Linux kernel deadlock caused by spinlock bug William Lee Irwin III
2002-07-30 21:15 Van Maren, Kevin
-- strict thread matches above, loose matches on Subject: below --
2002-07-30 17:06 Van Maren, Kevin
2002-07-30 17:44 ` William Lee Irwin III
2002-07-29 21:29 Van Maren, Kevin
2002-07-29 21:48 ` David Mosberger
2002-07-29 21:05 Van Maren, Kevin
2002-07-29 21:18 ` Matthew Wilcox
2002-07-30 15:58 ` Russell Lewis
2002-07-30 16:56 ` Richard B. Johnson
2002-07-30 17:02 ` Russell Lewis
2002-07-30 17:14 ` Richard B. Johnson
2002-07-30 22:48 ` Sean Griffin
2002-07-31 17:37 ` Russell Lewis
2002-07-29 20:37 Van Maren, Kevin
2002-07-29 20:46 ` [Linux-ia64] " Matthew Wilcox
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=p73vg6xs5nr.fsf@oldwotan.suse.de \
--to=ak@suse.de \
--cc=kevin.vanmaren@unisys.com \
--cc=linux-kernel@vger.kernel.org \
/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