public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Black box flight recorder for Linux
@ 2006-04-08 11:12 James Courtier-Dutton
  2006-04-08 13:41 ` Andi Kleen
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: James Courtier-Dutton @ 2006-04-08 11:12 UTC (permalink / raw)
  To: linux list

Hi,

I have had an idea for a black box flight recorder type feature for 
Linux. Before I try to implement it, I just wish to ask here if anyone 
has already tried it, and whether the idea works or not.

Description for feature:
Stamp the dmesg output on RAM somewhere, so that after a reset (reset 
button pressed, not power off), the RAM can be read and details of 
oopses etc. can be read.

Now, the question I have is, if I write values to RAM, do any of those 
values survive a reset? If any did survive, one could use them to store 
oops output in. I am currently only interested in Intel CPU and AMD CPU 
based motherboards. If only some values survived, one could use some 
sort of redundant encoding so the good values could be recovered.

The main advantage of something like this would be for newer 
motherboards that are around now that don't have a serial port.

If no one has tried this, I will spend some time testing.

James




^ permalink raw reply	[flat|nested] 29+ messages in thread
[parent not found: <5ZjEd-4ym-37@gated-at.bofh.it>]
* Re: Black box flight recorder for Linux
@ 2006-04-08 22:45 linux
  0 siblings, 0 replies; 29+ messages in thread
From: linux @ 2006-04-08 22:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: hancockr, James

> I wouldn't think most BIOSes these days would bother to clear system RAM 
> on a reboot. Certainly Microsoft was encouraging vendors not to do this 
> because it slowed down system boot time.

I don't think they explicitly clear it all, but they do write to it to
test how much RAM is installed and don't bother to put back what they
scribbled on.


Sufficient ECC techniques sould probably recover from the damage.  For a
first attempt, I'd take 4096-byte pages, not use the first and last 8
bytes at all, and divide the remaining 4080 bytes into 16 interleaved
255-byte ECC segments, each using a byte-wide Reed-Solomon code.
(The fraction of that 255 devoted to ECC is up to you; n-bit-wide
Reed-Solomon just requires that data + ECC <= (2^n - 1) bytes of n
bits each.)

For extra hack value, you could detect at boot what parts of your
log got corrupted and avoid using those parts when logging new data.
(There are complications...)

It is possible to update RS ECC incrementally, or perhaps it would be
better to store the tail of the log in some less efficient form (like
multiple replication) and then pack it into ECC when full.


The other thing that might be a problem is that I don't know how long
refresh stops during reset.  Again, ECC can be your friend.
(And code for it already exists in lib/reed_solomon/)

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2006-06-07 23:52 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-08 11:12 Black box flight recorder for Linux James Courtier-Dutton
2006-04-08 13:41 ` Andi Kleen
2006-04-08 19:42   ` Guennadi Liakhovetski
2006-04-08 16:40 ` Lee Revell
2006-04-08 17:30 ` Matti Aarnio
2006-04-09 19:23 ` Krzysztof Halasa
2006-04-10 12:01   ` Andy Green
2006-04-10 19:24     ` Krzysztof Halasa
2006-04-19 10:47       ` Krzysztof Halasa
2006-04-19 20:20         ` [lm-sensors] " Rudolf Marek
2006-04-19 23:02           ` Krzysztof Halasa
2006-06-06 17:42     ` Krzysztof Halasa
2006-06-07  8:03       ` Jean Delvare
2006-06-07 10:18         ` Andy Green
2006-06-07 23:52           ` Krzysztof Halasa
2006-04-11 11:21   ` Jan Engelhardt
2006-04-10  3:06 ` Russell Senior
     [not found] <5ZjEd-4ym-37@gated-at.bofh.it>
     [not found] ` <5ZlZk-7VF-13@gated-at.bofh.it>
2006-04-08 14:05   ` Robert Hancock
2006-04-08  7:17     ` Andi Kleen
2006-04-08 16:28       ` James Courtier-Dutton
2006-04-08 22:28         ` JustFillBug
2006-04-09 17:09           ` James Courtier-Dutton
2006-04-10 18:53             ` Ville Herva
2006-04-09 15:04         ` Andi Kleen
2006-04-09 19:25           ` Eric W. Biederman
2006-04-10 12:18       ` linux-os (Dick Johnson)
2006-04-10 19:44         ` Krzysztof Halasa
2006-04-10 20:07           ` linux-os (Dick Johnson)
  -- strict thread matches above, loose matches on Subject: below --
2006-04-08 22:45 linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox