public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <andrewm@uow.edu.au>
To: George Anzinger <george@mvista.com>
Cc: Keith Owens <kaos@ocs.com.au>, John Kacur <jkacur@home.com>,
	linux-kernel@vger.kernel.org
Subject: Re: test11-pre2 compile error undefined reference to `bust_spinlocks'  WHAT?!
Date: Sat, 11 Nov 2000 11:21:17 +1100	[thread overview]
Message-ID: <3A0C90FD.CB645430@uow.edu.au> (raw)
In-Reply-To: <23569.973832900@kao2.melbourne.sgi.com> <3A0C2D4A.83C75D4B@mvista.com>

George Anzinger wrote:
> 
> The notion of releasing a spin lock by initializing it seems IMHO, on
> the face of it, way off.  Firstly the protected area is no longer
> protected which could lead to undefined errors/ crashes and secondly,
> any future use of spinlocks to control preemption could have a lot of
> trouble with this, principally because the locker is unknown.
> 
> In the case at hand, it would seem that an unlocked path to the console
> is a more correct answer that gives the system a far better chance of
> actually remaining viable.
> 

Does bust_spinlocks() muck up the preemptive kernel's spinlock
counting?  Would you prefer spin_trylock()/spin_unlock()?
It doesn't matter - if we call bust_spinlocks() the kernel is
known to be dead meat and there is a fsck in your near future.

We are still trying to find out why kumon@fujitsu's 8-way is
crashing on the test10-pre5 sched.c.  Looks like it's fixed
in test11-pre2 but we want to know _why_ it's fixed.  And at
present each time he hits the bug, his printk() deadlocks.

So bust_spinlocks() is a RAS feature :)  A very important one -
it's terrible when your one-in-a-trillion bug happens and there
are no diagnostics.

It's a work-in-progress.  There are a lot of things which
can cause printk to deadlock:

- console_lock
- timerlist_lock
- global_irq_lock (console code does global_cli)
- log_wait.lock
- tasklist_lock (printk does wake_up) (*)
- runqueue_lock (printk does wake_up)

I'll be proposing a better patch for this in a few days.

(*) Keith: this explains why you can't do a printk() in
__wake_up_common: printk calls wake_up().  Duh.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-11  0:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-10  5:32 test11-pre2 compile error undefined reference to `bust_spinlocks' John Kacur
2000-11-10  4:57 ` Keith Owens
2000-11-10  5:07   ` Jeff Garzik
2000-11-10  5:08 ` Keith Owens
2000-11-10 17:15   ` test11-pre2 compile error undefined reference to `bust_spinlocks' WHAT?! George Anzinger
2000-11-10 17:34     ` Keith Owens
2000-11-11  0:21     ` Andrew Morton [this message]
2000-11-11  8:50       ` Eric W. Biederman
2000-11-13 17:47       ` George Anzinger
2000-11-10  5:18 ` [patch] Re: test11-pre2 compile error undefined reference to `bust_spinlocks' Andrew Morton

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=3A0C90FD.CB645430@uow.edu.au \
    --to=andrewm@uow.edu.au \
    --cc=george@mvista.com \
    --cc=jkacur@home.com \
    --cc=kaos@ocs.com.au \
    --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