All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Bird <tim.bird@am.sony.com>
To: David VomLehn <dvomlehn@cisco.com>
Cc: Robin Getz <rgetz@blackfin.uclinux.org>,
	Mike Frysinger <vapier@gentoo.org>,
	Greg Ungerer <gerg@snapgear.com>,
	Russell King <rmk@arm.linux.org.uk>,
	Paul Mundt <lethal@linux-sh.org>, Wolfgang Denk <wd@denx.de>,
	Grant Erickson <gerickson@nuovations.com>,
	linux-embedded <linux-embedded@vger.kernel.org>
Subject: Re: Kernel crashing and log buffers...
Date: Thu, 11 Jun 2009 11:22:57 -0700	[thread overview]
Message-ID: <4A314B81.7060401@am.sony.com> (raw)
In-Reply-To: <20090611175303.GA10058@cuplxvomd02.corp.sa.net>

David VomLehn wrote:
> Our kernel does crash, so we have to do this. I had submitted a patch a
> while ago that tweaks emit_log_char, but this was bounced, reasonably,
> because it would be interferring with the great majority of people who
> are not interested in capturing log output. The suggestion was made that
> we do this with a console driver. I've recently got a version working, as
> a module, but I've only started testing of the version integrated into the
> kernel tree.  Still, post early, post often, so I've appended a version
> of the patch here to see if this seems to be the right direction.
> 
> Regardless whether my particular patch seems like the right way to do this,
> we do need to solve this problem for the embedded world. It is one of the
> few areas where we have needs not shared by the rest of the kernel community.

In general, I like this approach to solve this problem.  I spend most of
my time in the lab with prototype boards that use a serial console, so my
terminal history has always been my crashdump repository. ;-)

This approach it unobtrusive to the rest of the log buffer system.  I never
did like the patches that introduced other ways to hack into the log
buffer.  The printk/log buffer code path is already convoluted enough,
and I didn't like the idea of adding additional hooks.  this approach
leverages an already existing hook.

I don't have much comment on the code specifics, but I have one nit
with the config help...

> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index 735bbe2..882ee57 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -684,6 +684,20 @@ config HVCS
>  	  which will also be compiled when this driver is built as a
>  	  module.
>  
> +config CONSLOGGER
> +	tristate "Pseudo-console for capturing console output"
> +	depends on PRINTK
> +	default n
> +	help
> +	  This contains a pseudo-console to record and divert kernel console
> +	  output, which is probably of most used to embedded systems. When
should be "most use" (no 'd')

> +	  a system crashes, it can divert printk output for logging information
> +	  about the failure in some persistent location. Then the output from
> +	  any function that uses printk() to display information, such as
> +	  dump_stack() can be stored in the failure log. It also stores
> +	  console output in a circular buffer so that that last <n> messages
> +	  can be added to the failure log.
> +
>  config IBM_BSR
>  	tristate "IBM POWER Barrier Synchronization Register support"
>  	depends on PPC_PSERIES

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================

  reply	other threads:[~2009-06-11 18:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11  1:26 Kernel crashing and log buffers Robin Getz
2009-06-11 17:53 ` David VomLehn
2009-06-11 18:22   ` Tim Bird [this message]
2009-06-11 22:46     ` David VomLehn
2009-06-11 18:52   ` Robin Getz
2009-06-11 19:35     ` David VomLehn
2009-06-11 22:57     ` Grant Erickson
2009-06-12  0:33       ` David VomLehn
2009-06-12  5:33         ` Wolfgang Denk
2009-06-11 23:27   ` Mike Frysinger
2009-06-12  1:07     ` David VomLehn
2009-06-12  4:54       ` Robin Getz
2009-06-13 16:49         ` Jamie Lokier
2009-06-26 14:39   ` Robin Getz
2009-06-26 17:42     ` David VomLehn
2009-06-26 17:50       ` Mike Frysinger
2009-06-26 17:59       ` Robin Getz
2009-06-13 10:26 ` Russell King
2009-06-13 18:59   ` Wolfgang Denk
2009-06-14 18:33     ` Robin Getz

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=4A314B81.7060401@am.sony.com \
    --to=tim.bird@am.sony.com \
    --cc=dvomlehn@cisco.com \
    --cc=gerg@snapgear.com \
    --cc=gerickson@nuovations.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=rgetz@blackfin.uclinux.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=vapier@gentoo.org \
    --cc=wd@denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.