public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Linux kernel deadlock caused by spinlock bug
Date: Tue, 30 Jul 2002 16:56:36 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590701905857@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905843@msgid-missing>

On Tue, 30 Jul 2002, Russell Lewis wrote:

> IDEA: Implement a read/write "bias" field that can show if a lock has 
> been gained many  times in succession for either read or write.  When 
> locks of the opposite type are attempting (and failing) to get the lock, 
> back off the other users until starvation is relieved.
> 

You need to gain a lock just to read the bias field. You can't read
something that somebody else will change while you are deciding
upon what you read. It just can't work.

If we presume that it did work. What problem are you attempting
to fix?  FYI, there are no known 'lock-hogs'. Unlike a wait on
a semaphore, where a task waiting will sleep (give up the CPU), a
deadlock on a spin-lock isn't possible. A task will eventually
get the resource. Because of the well-known phenomena of "locality",
every possible 'attack' on the spin-lock variable will become
ordered and the code waiting on the locked resource will get
it in a first-come-first-served basis. This, of course, assumes
that the code isn't broken by attempts to change the natural
order.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
The US military has given us many words, FUBAR, SNAFU, now ENRON.
Yes, top management were graduates of West Point and Annapolis.



  parent reply	other threads:[~2002-07-30 16:56 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
2002-07-29 21:48 ` David Mosberger
2002-07-30 15:58 ` Russell Lewis
2002-07-30 16:56 ` Richard B. Johnson [this message]
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-105590701905857@msgid-missing \
    --to=root@chaos.analogic.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