public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan-Simon Pendry <jsp@ms.com>
To: Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	linux-kernel@vger.rutgers.edu
Subject: Re: [PATCH][2.3.0] Read-write locks instead semaphores on UTS structures
Date: Fri, 14 May 1999 15:36:40 +0100	[thread overview]
Message-ID: <373C34F8.5DE45537@ms.com> (raw)
In-Reply-To: 19990514123456.R3172@mff.cuni.cz

Jakub Jelinek wrote
> 
> Huh? His patch uses read-write locks and not normal spin-locks, so I don't
> understand what you find wrong on it.

read-write locks are a variant of spin locks.  you can deadlock
the system if you go to sleep holding holding any spin lock.
the only exception is the kernel lock which has special code
to deal with it in schedule().

ideally the spinlock code (spin_lock and read_lock et al)
would have debug versions that counted how many locks were
held (in some per-cpu data structure), and have schedule()
check that this number was zero before putting the process
to sleep.

jan-simon.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

      reply	other threads:[~1999-05-15  4:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-12 19:50 [PATCH][2.3.0] Read-write locks instead semaphores on UTS structures Marcelo Tosatti
     [not found] ` <373B07EF.58664F9B@ms.com>
1999-05-14 10:34   ` Jakub Jelinek
1999-05-14 14:36     ` Jan-Simon Pendry [this message]

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=373C34F8.5DE45537@ms.com \
    --to=jsp@ms.com \
    --cc=jj@sunsite.ms.mff.cuni.cz \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=marcelo@conectiva.com.br \
    /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