9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: G. David Butler gdb@dbSystems.com
Subject: calling sleep() while holding lock()
Date: Thu,  8 May 1997 09:04:18 -0500	[thread overview]
Message-ID: <19970508140418.t9oqmgXxYG0Yf-kAfstNIEIG2sLDNecuofoCiffTxtQ@z> (raw)

It would seem to me that a process should not call sleep() holding
a spinlock, even though that seems to be happening.

I changed taslock to increment and decrement the hasspin flag instead of just
setting it and clearing it.  It is reasonable to have many locks.
(There is also a problem with the lock being dropped before the hasspin
was modified that I fixed.  I also temporarly removed the hasspin clear
from clock.c)

I then added a print in sleep to print the pid and hasspin counter if
hasspin > 0.  It happens alot and pretty early in the boot phase.

I'm doing this trying to find the cause of my earlier message about
checksum errors on the ethernet.  I am looking for places where spinlocks
are being held for long times and next where interrupts are masked
too long.

Before I go much further, I wanted to check on this behavior.

Thanks for any info.

David Butler
gdb@dbSystems.com




             reply	other threads:[~1997-05-08 14:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-08 14:04 G.David [this message]
1997-05-08 16:53 David
1997-05-08 18:32 beto
1997-05-09  7:22 G.David
1997-05-09  8:00 Lucio
1997-05-09 13:41 G.David
1997-05-09 16:16 Paul

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=19970508140418.t9oqmgXxYG0Yf-kAfstNIEIG2sLDNecuofoCiffTxtQ@z \
    --to=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).