[RFC PATCH 0/4] makedumpfile: cyclic processing to keep memory consumption.
Atsushi Kumagai
kumagai-atsushi at mxc.nes.nec.co.jp
Thu May 31 00:53:58 EDT 2012
Hello,
I made the prototype of cyclic processing to keep memory consumption.
I attache the patch set based on v1.4.4, I would like to get your advice.
Introduction:
- The basic idea of cyclic processing is represented as below.
- cyclic processing doesn't use temporary bitmap file, store partial bitmap data
in memory only for each cycle instead.
- The prototype only support compressed kdump format.
- The prototype worked for almost kernel version except some kernel disabled PAE
in my environment.
Basic idea (HATAYAMA-san wrote):
+------------------------------------------+
| main header (struct disk_dump_header) |
|------------------------------------------+
| sub header (struct kdump_sub_header) |
|------------------------------------------+
| | <-- 1st cycle
| - - - - - - - - - - - - - - |
| 1st-bitmap | <-- 2nd cycle
| - - - - - - - - - - - - - - |
| | <-- 3rd cycle
|------------------------------------------+
| | <-- 1st cycle
| - - - - - - - - - - - - - - |
| 2nd-bitmap | <-- 2nd cycle
| - - - - - - - - - - - - - - |
| | <-- 3rd cycle
|------------------------------------------+
| | <-- 1st cycle
| - - - - - - - - - - - - - - |
| page header | <-- 2nd cycle
| - - - - - - - - - - - - - - |
| | <-- 3rd cycle
|------------------------------------------|
| |
| page data | <-- 1st cycle
| |
| - - - - - - - - - - - - - - |
| page data | <-- 2nd cycle
| - - - - - - - - - - - - - - |
| |
| |
| page data | <-- 3rd cycle
| |
| |
+------------------------------------------+
How to use:
Specify 'K' option, then makedumpfile works cyclically.
Example:
a. normal processing:
$ makedumpfile -cd31 vmcore testdump.cd31
Copying data : [100 %]
The dumpfile is saved to testdump.cd31.
makedumpfile Completed.
b. cyclic processing (too many messages will be displayed):
$ makedumpfile -Kcd31 vmcore testdump.Kcd31
Copying data : [ 5 %]
Excluding free pages : [100 %]
...
Excluding free pages : [100 %]
Copying data : [100 %]
The dumpfile is saved to testdump.Kcd31.
makedumpfile Completed.
c. compare each dumpfiles:
$ cmp testdump.cd31 testdump.Kcd31
$
TODO:
- Optimize code for performance.
(e.g. initialize for compression is done every cycle, it's a waste.)
- Support ELF format.
- Consider suitable size of target region.
- Fix some messages.
- And something noticed by you.
Thanks
Atsushi Kumagai
More information about the kexec
mailing list