The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Brad Chapman <kakadu_croc@yahoo.com>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: brlock_is_locked()?
Date: Fri, 24 Aug 2001 07:11:03 -0700 (PDT)	[thread overview]
Message-ID: <20010824141103.16015.qmail@web10905.mail.yahoo.com> (raw)
In-Reply-To: <20010824084931.D4064@suse.de>

--- Jens Axboe <axboe@suse.de> wrote:
> On Wed, Aug 22 2001, Brad Chapman wrote:
> > >    (I checked the brlock code and didn't find any schedule()s; there's
> > >     probably a reason for that).
> > > 
> > > Ummm, this is SMP 101, you can't sleep with a lock held.
> > > The global kernel lock is special in this regard, but all
> > > other SMP locking primitives may not sleep.
> > 
> > 	Grrr....I read Rusty's Unreliable Guide to Kernel Locking (twice) and
> > still didn't remember that. Guess you have to schedule() yourself.
> 
> Errr, like Dave said, _you cannot sleep while holding a lock_. It's not
> just that the locking primitives themselves don't sleep, you must not
> call schedule() (or any other function that may block/sleep) while
> holding a lock. _That's_ SMP 101 :-)
> 
> -- 
> Jens Axboe

Mr. Axboe,

	Sorry, I was unclear in my statement. If we fail to grab the lock, 
_then_ we sleep. If we succeed, we work our butts off, give the lock up,
and then schedule(). No sleeping on the lock job ;-)

Brad 


=====
Brad Chapman

Permanent e-mail: kakadu_croc@yahoo.com
Current e-mail: kakadu@adelphia.net
Alternate e-mail: kakadu@netscape.net

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

      reply	other threads:[~2001-08-24 14:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-22 13:04 brlock_is_locked()? Brad Chapman
2001-08-22 16:33 ` brlock_is_locked()? Ben LaHaise
2001-08-22 18:00   ` brlock_is_locked()? Brad Chapman
2001-08-22 18:03     ` brlock_is_locked()? David S. Miller
2001-08-22 18:17       ` brlock_is_locked()? Brad Chapman
2001-08-22 18:26         ` brlock_is_locked()? David S. Miller
2001-08-22 18:33           ` brlock_is_locked()? Brad Chapman
2001-08-22 18:47             ` brlock_is_locked()? David S. Miller
2001-08-22 18:53               ` brlock_is_locked()? Brad Chapman
2001-08-22 19:00                 ` brlock_is_locked()? David S. Miller
2001-08-22 19:08                   ` brlock_is_locked()? Brad Chapman
2001-08-24  6:49                     ` brlock_is_locked()? Jens Axboe
2001-08-24 14:11                       ` Brad Chapman [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=20010824141103.16015.qmail@web10905.mail.yahoo.com \
    --to=kakadu_croc@yahoo.com \
    --cc=axboe@suse.de \
    --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