lkml.org 
[lkml]   [2009]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: Put printk buffer in video ram
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


\
 
 \ /
  Last update: 2009-11-23 20:01    [from the cache]
©2003-2011 Jasper Spaans