LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: overlaping printk
Date: Thu, 20 May 2004 16:53:11 +0200 [thread overview]
Message-ID: <m3lljnnoa0.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <1XWpp-zy-9@gated-at.bofh.it> (Ingo Molnar's message of "Thu, 20 May 2004 16:10:16 +0200")
Ingo Molnar <mingo@elte.hu> writes:
> * Ricky Beam <jfbeam@bluetronic.net> wrote:
>
>> It looks like somewhere in the path of release_console_sem() more than
>> one CPU is running the log. [...]
>
> the problem is this code in printk:
>
> if (oops_in_progress) {
> /* If a crash is occurring, make sure we can't deadlock */
> spin_lock_init(&logbuf_lock);
> /* And make sure that we print immediately */
> init_MUTEX(&console_sem);
> }
>
> so two crashes on two separate CPUs can go on in parallel. The problem
> is not constrained to the serial line - i've seen it on VGA too (albeit
> there it's much more rare).
One alternative way would be to use locks with timeouts for these two
locks (e.g. checking the TSC on x86, since the timer interrupt
may not be running anymore) and only break the lock when the
wait time is too long.
Of course serial lines can be quite slow so even that may not help
always (for unknown reasons far too many people use 9600 baud for
their serial line)
-Andi
next parent reply other threads:[~2004-05-21 23:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1XBEP-Mc-49@gated-at.bofh.it>
[not found] ` <1XBXw-13D-3@gated-at.bofh.it>
[not found] ` <1XWpp-zy-9@gated-at.bofh.it>
2004-05-20 14:53 ` Andi Kleen [this message]
2004-05-20 15:19 ` Ingo Molnar
2004-05-20 15:53 ` Ingo Molnar
2004-05-20 16:19 ` Andy Isaacson
2004-05-20 18:57 ` Ingo Molnar
2004-05-20 23:11 ` Andrew Morton
2004-05-21 7:00 ` Ingo Molnar
2004-05-19 15:55 Tuukka Toivonen
2004-05-19 16:03 ` Ricky Beam
2004-05-20 14:03 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2004-05-19 15:19 Ricky Beam
2004-05-19 15:26 ` Tigran Aivazian
2004-05-19 15:31 ` Ricky Beam
2004-05-19 15:39 ` Randy.Dunlap
2004-05-20 7:21 ` 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=m3lljnnoa0.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: overlaping printk' \
/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
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).