* Direct writing to the IDE on panic?
@ 2006-04-13 13:55 Steven Rostedt
2006-04-14 14:28 ` Alan Cox
0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2006-04-13 13:55 UTC (permalink / raw)
To: LKML
Hi,
I was wondering if anyone has done some work to directly write and poll
to the IDE? This is to store data on a panic or oops. So it would need
to bypass pretty much all the normal Linux mechanisms to do low lever
IDE work.
So lets say we have a special partition on a hard drive to be reserved
for just this purpose. Even set it up to be a swap partition. So on a
system crash, turn off interrupts, stop all other processors, and then
through polling (to avoid interrupt handling), write as much data as
possible about the state of the machine to this special partition.
After a reboot, this data can then be retrieved for review to see why
the system crashed.
Obviously, this would be a slow process, but the system has crashed and
we care more about retrieving information than speed.
Has this already been done and what issues need to be addressed?
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Direct writing to the IDE on panic?
2006-04-13 13:55 Direct writing to the IDE on panic? Steven Rostedt
@ 2006-04-14 14:28 ` Alan Cox
2006-04-14 14:27 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2006-04-14 14:28 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML
On Iau, 2006-04-13 at 09:55 -0400, Steven Rostedt wrote:
> Hi,
>
> I was wondering if anyone has done some work to directly write and poll
> to the IDE? This is to store data on a panic or oops. So it would need
> to bypass pretty much all the normal Linux mechanisms to do low lever
> IDE work.
I've seen some 2.4 work here. For 2.6 the current focus is kexec of
course
> Obviously, this would be a slow process, but the system has crashed and
> we care more about retrieving information than speed.
>
> Has this already been done and what issues need to be addressed?
The big issue is 'how am I sure the partition data and code I run are
valid post crash'. You don't want the risk of dumping to the wrong part
of the disk and making a crash into a disaster.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Direct writing to the IDE on panic?
2006-04-14 14:28 ` Alan Cox
@ 2006-04-14 14:27 ` Steven Rostedt
2006-04-14 14:52 ` Alan Cox
0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2006-04-14 14:27 UTC (permalink / raw)
To: Alan Cox; +Cc: LKML
On Fri, 14 Apr 2006, Alan Cox wrote:
>
> The big issue is 'how am I sure the partition data and code I run are
> valid post crash'. You don't want the risk of dumping to the wrong part
> of the disk and making a crash into a disaster.
>
Nice point. But fortunately, this is for a custom application running on
an embedded device, such that the data that is on another part of the disk
(which btw is an IDE flash) is just the application and the rest of the
OS. So, although a bad write to the disk will cause much more work, it
wont destroy data that cant be replaced.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Direct writing to the IDE on panic?
2006-04-14 14:27 ` Steven Rostedt
@ 2006-04-14 14:52 ` Alan Cox
2006-04-14 14:54 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2006-04-14 14:52 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML
On Gwe, 2006-04-14 at 10:27 -0400, Steven Rostedt wrote:
> Nice point. But fortunately, this is for a custom application running on
> an embedded device, such that the data that is on another part of the disk
> (which btw is an IDE flash) is just the application and the rest of the
> OS. So, although a bad write to the disk will cause much more work, it
> wont destroy data that cant be replaced.
If you know the controller as well then you are correct in assuming the
code to do the dump is very simple indeed providing you stick to PIO,
especially if you know the set up is already done before crash
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Direct writing to the IDE on panic?
2006-04-14 14:52 ` Alan Cox
@ 2006-04-14 14:54 ` Steven Rostedt
2006-04-14 15:52 ` Randy.Dunlap
0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2006-04-14 14:54 UTC (permalink / raw)
To: Alan Cox; +Cc: LKML
On Fri, 14 Apr 2006, Alan Cox wrote:
> On Gwe, 2006-04-14 at 10:27 -0400, Steven Rostedt wrote:
> > Nice point. But fortunately, this is for a custom application running on
> > an embedded device, such that the data that is on another part of the disk
> > (which btw is an IDE flash) is just the application and the rest of the
> > OS. So, although a bad write to the disk will cause much more work, it
> > wont destroy data that cant be replaced.
>
> If you know the controller as well then you are correct in assuming the
> code to do the dump is very simple indeed providing you stick to PIO,
> especially if you know the set up is already done before crash
>
Thank you very much for your input Alan!
Now my strength in IDE is not that strong, hence the reason I was asking
if this was done before. I'd like to look at some examples before I go
ahead and figure it out on my own. I'm sure that I'm going to need to do
a rewrite for our specific configuration, but looking at others work might
make things easier.
Since this is all under GPL (my customer will give all the source to who
ever they distribute it to), I was hoping to take advantage of free
software here and not completely reinvent the wheel (and destroying it
along the way ;)
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Direct writing to the IDE on panic?
2006-04-14 14:54 ` Steven Rostedt
@ 2006-04-14 15:52 ` Randy.Dunlap
2006-04-15 15:05 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2006-04-14 15:52 UTC (permalink / raw)
To: Steven Rostedt; +Cc: alan, linux-kernel
On Fri, 14 Apr 2006 10:54:19 -0400 (EDT) Steven Rostedt wrote:
>
> On Fri, 14 Apr 2006, Alan Cox wrote:
>
> > On Gwe, 2006-04-14 at 10:27 -0400, Steven Rostedt wrote:
> > > Nice point. But fortunately, this is for a custom application running on
> > > an embedded device, such that the data that is on another part of the disk
> > > (which btw is an IDE flash) is just the application and the rest of the
> > > OS. So, although a bad write to the disk will cause much more work, it
> > > wont destroy data that cant be replaced.
> >
> > If you know the controller as well then you are correct in assuming the
> > code to do the dump is very simple indeed providing you stick to PIO,
> > especially if you know the set up is already done before crash
> >
>
> Thank you very much for your input Alan!
>
> Now my strength in IDE is not that strong, hence the reason I was asking
> if this was done before. I'd like to look at some examples before I go
> ahead and figure it out on my own. I'm sure that I'm going to need to do
> a rewrite for our specific configuration, but looking at others work might
> make things easier.
>
> Since this is all under GPL (my customer will give all the source to who
> ever they distribute it to), I was hoping to take advantage of free
> software here and not completely reinvent the wheel (and destroying it
> along the way ;)
Rusty Russell had an IDE block dump patch during the 2.4
timeframe IIRC. I don't know where it could be found now.
Maybe in old LKCD tarballs or archives?
---
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-04-15 16:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-13 13:55 Direct writing to the IDE on panic? Steven Rostedt
2006-04-14 14:28 ` Alan Cox
2006-04-14 14:27 ` Steven Rostedt
2006-04-14 14:52 ` Alan Cox
2006-04-14 14:54 ` Steven Rostedt
2006-04-14 15:52 ` Randy.Dunlap
2006-04-15 15:05 ` Steven Rostedt
2006-04-15 16:45 ` Randy.Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®