All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arjan van de Ven <arjan@infradead.org>,
	Dave Jones <davej@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: RFC: Put printk buffer in video ram
Date: Mon, 23 Nov 2009 12:55:00 -0600	[thread overview]
Message-ID: <4B0ADA84.5050300@nortel.com> (raw)
In-Reply-To: <20091123183220.GB24482@elte.hu>

On 11/23/2009 12:32 PM, Ingo Molnar wrote:
> 
> * Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> 
>> On Sun, 2009-11-22 at 14:15 +0200, Maxim Levitsky wrote: 
>>> On Sun, 2009-11-22 at 09:25 +0100, Ingo Molnar wrote: 
>>>> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
>>>>
>>>>> On Sun, Nov 22, 2009 at 04:05:06AM +0200, Maxim Levitsky wrote:
>>>>>> After doing some successful debugging by placing printk buffer in video
>>>>>> ram, here I publish cleaned version of it.
>>>>>>
>>>>>> I discovered that on my system video ram isn't cleared on reboot, and I
>>>>>> took advantage of that by placing printk buffer directly there.
>>>>>> This allows to capture oopses/panicks almost from everywhere.
>>>>>> It is also very simple to setup.
>>
>> Few more thoughts:
>>
>> First of all, if I implement this as a console driver, I won't be able
>> to capture all kernel log, but only from the point I register the
>> console.
> 
> Adding an early console driver would solve this, right?

We've had a mechanism sort of like this for quite a while.  Hasn't been
pushed to mainline because it used board-specific hardware and we're
usually multiple kernel versions behind mainline.

Anyways, a couple things that we've found to be useful are:
1) The ability to allocate a chunk of this persistent memory area for a
special purpose.  This allows things like memory-mapped circular buffers
for per-cpu binary data.
2) An API to log just to this persistent area and bypass the normal
console completely.  This can be useful when debugging issues where the
normal logging paths result in a hang.

Chris

  reply	other threads:[~2009-11-23 18:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-22  2:05 RFC: Put printk buffer in video ram Maxim Levitsky
2009-11-22  2:32 ` Frederic Weisbecker
2009-11-22  8:25   ` Ingo Molnar
2009-11-22 12:15     ` Maxim Levitsky
2009-11-23  1:01       ` Maxim Levitsky
2009-11-23 18:32         ` Ingo Molnar
2009-11-23 18:55           ` Chris Friesen [this message]
2009-11-23 19:03             ` Arnd Bergmann
2009-11-23 19:03               ` Arnd Bergmann
2009-11-22 12:07   ` Maxim Levitsky

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=4B0ADA84.5050300@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=davej@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.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 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.