lkcd
[Top] [All Lists]

Re: how to make kernel do system dump ?

To: Thiruvengada Govindan <thiruvengada.govindan@xxxxxxxxx>
Subject: Re: how to make kernel do system dump ?
From: Keith Owens <kaos@xxxxxxxxxx>
Date: Sun, 05 Nov 2000 18:17:37 +1100
Cc: lkcd@xxxxxxxxxxx
In-reply-to: Your message of "Sun, 05 Nov 2000 12:23:53 +0530." <3A050401.E8170339@xxxxxxxxx>
Sender: owner-lkcd@xxxxxxxxxxx
On Sun, 05 Nov 2000 12:23:53 +0530, 
Thiruvengada Govindan <thiruvengada.govindan@xxxxxxxxx> wrote:
>       A possibly useful feature would be for the Linux KDB to support a
>command to initiate a system dump (i haven't looked at the latest
>version though so please excuse if this is already supported). A lot of
>times when a system appears hung doing an insmod would just not be
>feasible and rather than tweak the kernel to panic and thereby force the
>system to dump it may just be better for KDB itself to support say a
>"sysdump" command that would take a dump of the system image before
>reboot.

kdb forces every cpu into kdb state and stops the entire kernel dead in
its tracks.  This is deliberate, one of kdb's design criteria is to
keep the kernel as static as possible while you debug it.  That means
no interrupts, not even the timer tick runs when kdb is in control.
Without interrupts, you cannot do I/O to disk unless your I/O subsystem
can run without any interrupt support.  You cannot even sleep, all work
must be busy wait.

If lkcd can run without interrupts then kdb could call lkcd directly.
Otherwise the only option is to exit kdb via 'go some_function_name'.
'go' will restart all the cpus and allow interrupts, it is then up to
the function to invoke lkcd.  The function must be defined as
void some_function_name(void) and must never return, the stack at that
point will not be in a fit state to return to anything.  It is up to
the lkcd group to define this interface function.


<Prev in Thread] Current Thread [Next in Thread>