3 ms·
That is in fact how crash dump works on illumos systems. Once you enter a kernel panic, interrupts are disabled, all other CPUs are brought to rest, etc. Then
by jclulow 3y ago
That is in fact how crash dump works on illumos systems. Once you enter a kernel panic, interrupts are disabled, all other CPUs are brought to rest, etc. Then the panic code takes the pages to write to the dump and passes them to a special routine in the driver for the dump device: usually either a slice on a disk or a zvol). That driver is responsible for getting the device into a state where polled I/O can be performed, and to write the pages out. At the end the system reboots, and on the next boot a program called savecore inspects the dump device to see if there is a new dump, and if there is it transfers it into a new file.
- deleted 3y ago[deleted]
- loeg 3y agoFreeBSD does the same thing (probably some shared 80s BSD heritage?). One challenge is actually providing that special routine for the dump device in a way that is safe at crash time. You don't know how bad a state your crashed kernel is in, and some buses may not have a polled IO mode (USB?). The Linux kexec process kind of elegantly restarts into a known state, with the known drawback of hogging some memory. It's definitely a different set of tradeoffs and both seem vaguely reasonable.