summaryrefslogtreecommitdiff
path: root/diskdump_mod.h
Commit message (Collapse)AuthorAge
* [PATCH V7] Exclude page structures of non-dumped pages.Cliff Wickman2015-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a -e option to makedumpfile. The -e option excludes kernel pages that contain nothing but kernel page structures for pages that are not being included in the dump. The -e option only works in non-cyclic mode, which its use implies. And only applies to the x86_64 architecture. The -e requires the use of --work-dir, as it will create a pfn file in that work directory. The --work-dir should probably be set up by the distro procedures which determine the mount point of the root device. This patch formerly applied after patch: [PATCH V2] makedumpfile: make --work-dir easier to use but now it stands alone. I have tested on large memory systems to demonstrate the importance of this feature to such systems. See some numbers below. The most dramatic demonstration was on a 32TB system where the patch reduced the process from 2 hours to 26 minutes. The size of the dump would probably have been over 30GB (but I ran out of disk space). It was reduced to 5.4GB. A page structure (56 bytes) exists for every 4096-byte page. This amounts to 3.67 million pages, or about 14GB, per terabyte of system memory! Without -e an idle 2-terabyte system can be dumped (compressed) to a file of about 3.6G. With -e that is reduced to about 456M. And the time and space savings multiply for each additional terabyte of memory in the system. Experimental time/size results: (basically idle systems) Memory Size With -e Without -e (sec.) (sec.) (using a sles11sp3 kernel that does not provide mmap of /proc/vmcore:) 1TB 52 244M 257 1.7G 2TB 128 456M 526 3.6G 8TB 780 1.6G 3400 13.8G 16TB 2600 3.1G 9800 (extrapolated, 2:40 is too long to wait) (using a sles11sp3 kernel that provides mmap of /proc/vmcore:) 16TB 900 3.8G not done 32TB 6000 5.4G not done (using a sles11sp3 kernel that provides mmap of /proc/vmcore:) 32TB 1600 5.4G 7300 (extrapolated) (ran out of 19G space before 1/2 done) The only disadvantage is that various options of the crash 'kmem' command (that walk lists of page structures) will not work. Version 7.0.9 of crash is already patched to issue a warning about such commands when the dump is flagged DUMP_DH_EXCLUDED_VMEMMAP. Sorry that this patch is large. The vmemmap page scan is done by some very large functions, and they are all interrelated. I didn't see any point to breaking them into several inter-dependent patches. Signed-off-by: Cliff Wickman <cpw@sgi.com>
* [PATCH v4 3/4] Implementation of dealing with kdump-compressed dumpfile with ↵Wang Xiao2014-10-20
| | | | | | | | | | ENOSPC error. kdump-compressed: Dump the bitmap before any page header and page data. This format use "status" of "disk_dump_header" to indicate that it has been modified. Signed-of-by: Wang Xiao <wangx.fnst@cn.fujitsu.com>
* [PATCH v4] Fix max_mapnr issue on system has over 44-bit addressing.Jingbai Ma2013-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will fix a bug of makedumpfile doesn't work correctly on system has over 44-bit addressing in compression dump mode. This bug was posted here: http://lists.infradead.org/pipermail/kexec/2013-September/009587.html This patch will add 3 new fields in struct kdump_sub_header. unsigned long long start_pfn_64; /* header_version 6 and later */ unsigned long long end_pfn_64; /* header_version 6 and later */ unsigned long long max_mapnr_64; /* header_version 6 and later */ And the old "unsigned int max_mapnr" in struct disk_dump_header will not be used anymore, but still be there for compatibility purpose. The max_mapnr_64 only exists in strcut kdump_sub_header, and that only for compressed kdump format, so for ELF format kdump files (non-compressed), only the max_mapnr is available, so it still may be truncated for addresses exceed 44bit (above 16TB). This patch will change the header_version to 6. The corresponding patch for crash utility can be found here: http://lists.infradead.org/pipermail/kexec/2013-October/009750.html This patch doesn't change sadump_header. Changelog: v4: - Do not change max_mapnr_64 in kdump_sub_header in memory for old kernel. v3: - Change notes for max_mapnr, start_pfn and end_pfn as obsolete. - Remove "(32bit)" from debug messages of max_mapnr, start_pfn and end_pfn. - Set the 32bit start_pfn and end_pfn to UINT_MAX. - Remove bitmap writting enhancement to another seperate patch. - Change type of len_bitmap in struct DumpInfo back to unsigned long. v2: - Rename max_mapnr in struct kdump_sub_header to max_mapnr_64. - Change type of max_mapnr_64 from unsigned long to unsigned long long. In x86 PAE mode on x86_32 kernel, the address may exceeds 44bit limit. - Add start_pfn_64, end_pfn_64 for struct kdump_sub_header. - Only print 64bit start_pfn_64, end_pfn_64 and max_mapnr_64 debug messages for disk dump header version >= 6. - Change type of bitmap_len in struct DumpInfo, from unsigned long to unsigned long long. - Enhance bitmap writting function in reassemble_kdump_header(). Prevent bitmap writting failure if the size of bitmap is too large to fit a sigle write. v1: - http://lists.infradead.org/pipermail/kexec/2013-September/009662.html Signed-off-by: Jingbai Ma <jingbai.ma@hp.com> Tested-by: Lisa Mitchell <lisa.mitchell@hp.com>
* [PATCH] Cleanup: Add a comment for unused diskdump flag.Atsushi Kumagai2013-10-04
| | | | Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
* [PATCH 1/9] Add dump header for snappy.HATAYAMA Daisuke2012-11-16
| | | | Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
* [PATCH v3 1/4] Add LZO Support.HATAYAMA Daisuke2012-05-11
| | | | | | | | Add -l option as one of the command-line options users can specify. If -l option is specified, then makedumpfile generates dumpfile in kdump-compressed format with lzo compression by each page. Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
* [PATCH] Cleanup: Convert multiple spaces to tabs.Atsushi Kumagai2012-01-05
| | | | Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
* [PATCH] Cleanup: Add including-gaurds to some header files.Ken'ichi Ohmichi2011-09-07
| | | | Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [PATCH] Cleanup: Add common.h file for shrinking makedumpfile.h.Ken'ichi Ohmichi2011-09-07
| | | | Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [PATCH v2 7/8] Add erased information in compressed kdump fileMahesh Salgaonkar2011-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include the erase information in the makedumpfile generated dumpfile. The erased information contains only effective lines from the filter configuration file. This patch supports inclusion of erase information in kdump compressed, flatten and split dumpfiles. On re-filtering, the erase information from input dumpfile (if any) will be carried over to resulting dumpfile. This patch introduces new members offset_eraseinfo, size_eraseinfo into the sub header in compressed kdump file. The erased information would contain *multiple* erased symbol names. For example, the following is based on your above example. struct S1 { int a; int b; int c; }; struct S2 { struct S1 *mystruct1; struct S1 *mystruct2; }; struct S2 mystruct2; #Filter command erase mystruct2.mystruct1.a erase mystruct2.mystruct1.c erase mystruct2.mystruct2.b #The erased information erase mystruct2.mystruct1.a 4 erase mystruct2.mystruct1.c 4 erase mystruct2.mystruct2.b 4 The dumpfile image : header dump data the erased information +------------------+-----------------------+-------------------------------+ | ................ | ..................... | erase mystruct2.mystruct1.a 4 | | offset_eraseinfo | ..................... | erase mystruct2.mystruct1.c 4 | | size_eraseinfo | ..................... | erase mystruct2.mystruct2.b 4 | +------------------+-------------------------------------------------------+ : offset_eraseinfo (offset in dumpfile) <------ size_eraseinfo -------> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> ---
* [PATCH] Add ELF note section to the kdump-compressed format.Ken'ichi Ohmichi2010-10-08
| | | | | | | | | | | | | | | | | | In case of s390x's DUMPFILE in the kdump-compressed format, the crash utility gets the register information using CPU lowcore symbol. All s390 dumps have the register information in memory on the lowcore pages. But in the future s390 could have a dump mechanism that does not store the register information in the lowcore pages in the memory and will only keep it on ELF note section. So DUMPFILE in the kdump-compressed format needs ELF note section for including the register information, and this patch adds new members "offset_note" and "size_note" into kdump sub header for representing the section. Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [v1.3.5-06] Cleanup: Fix the typo of DISKDUMP_HEADER_BLOCKS.Ken'ichi Ohmichi2009-11-11
| | | | Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [v1.3.5-04] Store vmcoreinfo data into a dumpfile in the kdump-compressed ↵Ken'ichi Ohmichi2009-11-11
| | | | | | | | | | | | format. By applying this patch, makedumpfile takes vmcoreinfo data from /proc/vmcore and stores the data into a dumpfile in the kdump- compressed fomat. By the next patch, makedumpfile takes the data from a dumpfile in the kdump-compressed format and uses the data for re-filtering. Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [v1.3.5-01] Cleanup: Set the calculated value to dh->sub_hdr_size.Ken'ichi Ohmichi2009-11-11
| | | | Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [v1.3.4-15] Cleanup: Use DISKDUMP_HDADER_BLOCKS for the readability.ken1_ohmichi2009-10-09
| | | | | | | | This patch adds DISKDUMP_HDADER_BLOCKS and KDUMP_SUB_HEADER_BLOCKS definitions, and they are used instead of values (1). Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [v1.3.3-09] Add a new option "--split" for dumping multiple dumpfiles.ken1_ohmichi2009-04-20
| | | | | | | | | | | | | | | | A new option "--split": Split the dump data to multiple dumpfiles in parallel. If specifying dumpfiles on different storage devices, a device can share I/O load with other devices and it reduces time for saving the dump data. The file size of each dumpfile is smaller than the system memory size which is divided by the number of dumpfiles. This feature supports only the kdump-compressed format. Example: # makedumpfile --split -d 31 -x vmlinux /proc/vmcore dumpfile1 dumpfile2 Signed-off-by: Takao Indoh <tindoh@redhat.com> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
* [v1.2.7-02] Cleanup: Remove trailing whitespaceken1_ohmichi2008-07-18
| | | | | | | This is just a cleanup patch that removes trailing whitespace from implementation files. Signed-off-by: Bernhard Walle <bwalle@suse.de>
* [v1.1.3-05]ken1_ohmichi2007-04-13
| | | | | | | | | | | - The descriptors of the excluded zero-filled pages are changed so that the crash utility (v4.0-3.22, or later) can distinguish between the excluded zero-filled pages and other excluded pages. If the crash utility accesses the excluded zero-filled page, it returns zero-filled page. If accessing other excluded page, it displays the error message and fails. - A member "dump_level" is added into struct kdump_sub_header so that the crash utility (v4.0-3.22, or later) can display the dump_level in case of kdump-compressed format.
* Add a new option '-F'.ken1_ohmichi2007-02-02
| | | | | | | | '-F' means "Flatten dump data instead of lseek()". For transporting dumpfile by SSH, there was one problem that lseek() cannot affect to a remote host. Instead of lseek(), makedumpfile outputs all dump data with a data header (fileoffset, data size). This format is named "flattened format".
* Initial revisionken1_ohmichi2006-10-19