From: "Van Maren, Kevin" <kevin.vanmaren@unisys.com>
To: linux-ia64@vger.kernel.org
Subject: RE: [Linux-ia64] Linux kernel deadlock caused by spinlock bug
Date: Mon, 29 Jul 2002 21:29:09 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905847@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905843@msgid-missing>
> On Mon, Jul 29, 2002 at 04:05:35PM -0500, Van Maren, Kevin wrote:
> > Recursive read locks certainly make it more difficult to fix the
> > problem. Placing a band-aid on gettimeofday will fix the symptom
> > in one location, but will not fix the general problem, which is
> > writer starvation with heavy read lock load. The only way to fix
> > that is to make writer locks fair or to eliminate them (make them
> > _all_ stateless).
>
> The basic principle is that if you see contention on a spinlock, you
> should eliminate the spinlock somehow. making spinlocks
> `fair' doesn't
> help that you're spending lots of time spinning on a lock.
Yes, but that isn't the point: unless you eliminate all rw locks,
it is conceptually possible to cause a kernel deadlock by forcing
contention on the locks you didn't remove, if the user can force
the kernel to acquire a reader lock and if something else needs to
acquire the writer lock. Correctness is the issue, not performance.
You have locks because there _could_ be contention, and locks handle
that contention _correctly_. If you can eliminate the contention,
you can eliminate the locks, but if there is a chance for contention,
the locks have to remain, _and_ they have to handle contention
_correctly_, which does not occur with the current reader/writer
lock code, which can hang the kernel just as dead as a writer
between recursive reader lock calls with my code.
Kevin
next prev parent reply other threads:[~2002-07-29 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-29 20:37 [Linux-ia64] Linux kernel deadlock caused by spinlock bug Van Maren, Kevin
2002-07-29 20:46 ` Matthew Wilcox
2002-07-29 21:05 ` Van Maren, Kevin
2002-07-29 21:18 ` Matthew Wilcox
2002-07-29 21:29 ` Van Maren, Kevin [this message]
2002-07-29 21:48 ` David Mosberger
2002-07-30 15:58 ` Russell Lewis
2002-07-30 16:56 ` Richard B. Johnson
2002-07-30 22:48 ` Sean Griffin
2002-07-31 17:37 ` Russell Lewis
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=marc-linux-ia64-105590701905847@msgid-missing \
--to=kevin.vanmaren@unisys.com \
--cc=linux-ia64@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