public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: garbled oopsen
Date: Mon, 19 May 2003 17:20:06 +1000	[thread overview]
Message-ID: <20628.1053328806@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Wed, 07 May 2003 18:05:30 MST." <20030507180530.23d0e780.rddunlap@osdl.org>

On Wed, 7 May 2003 18:05:30 -0700, 
"Randy.Dunlap" <rddunlap@osdl.org> wrote:
>I have several oopses that are garbled.  Part of the problem is that
>page fault code (x86: arch/i386/mm/fault.c) does not attempt to
>serialize the "Unable to handle kernel ... at virtual address ..."
>messages, since it's considered better to get _some_ messages out
>than no messages.  (and serialize it with what?)
>
>However, after untwisting these, I can tell you that unraveling
>them is not fun.
>
>Can these be cleaned up in any reasonable way?
>Any suggestions?

kdb_printf() has this:

        /* Serialize kdb_printf if multiple cpus try to write at once.
         * But if any cpu goes recursive in kdb, just print the output,
         * even if it is interleaved with any other text.
         */
        if (!KDB_STATE(PRINTF_LOCK)) {
                KDB_STATE_SET(PRINTF_LOCK);
                spin_lock(&kdb_printf_lock);
        }
	....
        if (KDB_STATE(PRINTF_LOCK)) {
                spin_unlock(&kdb_printf_lock);
                KDB_STATE_CLEAR(PRINTF_LOCK);
        }

KDB_STATE() is a per-cpu set of flags, PRINTF_LOCK indicates if this
cpu has got or is trying to get the kdb_printf_lock.  I get no
interleave problems, except when somebody prints a line in multiple
calls to kdb_printf(), the fragments are printed as one chunk but the
individual fragments can be interleaved.


  parent reply	other threads:[~2003-05-19  7:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-08  1:05 garbled oopsen Randy.Dunlap
2003-05-08  1:40 ` Andrew Morton
2003-05-08  0:06   ` Martin J. Bligh
2003-05-08  4:34   ` Randy.Dunlap
2003-05-19  7:20 ` Keith Owens [this message]
     [not found] <20030508011013$3d80@gated-at.bofh.it>
     [not found] ` <20030508015008$481c@gated-at.bofh.it>
2003-05-08  2:49   ` Andi Kleen
2003-05-08  3:32     ` Martin J. Bligh
2003-05-08  5:53       ` Andrew Morton
2003-05-08  7:29         ` Andi Kleen
2003-05-08  6:44       ` Andi Kleen

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=20628.1053328806@kao2.melbourne.sgi.com \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.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