>> Ideally, the kernel should keep information about various kernel data >> structures for the partial dump utility to access during crash dump >> instead of using a vmlinux image compiled with -g option. >> However, this approach would require modification to the kernel. >> >> I think a more practical approach would be to build a partial dump >> command which takes advantage of the crash source code. This way, it >> would be possible to which will have less dependency on the kernel mm >> structures and which could be run on second kernel at the same time. >> > >Are you planning to use debug vmlinux and gdb as backend? If yes then how >would you reduce the memory usage (in comparision to crash) so that this >utility can run in second kernel. If no then do you think hardcoding the >structure size and fields and not supporting NUMA machines is a sustainable >alternative. I think that hardcoding the structure size and fields isn't a good idea. I'm planning to use just the source code in gdb to get the structure size and fields. I think this should reduce the memory usage small enough to be run in second kernel.
>> >Looks like you are not regenerating the headers. Don't you have to >> >regenerate the headers after the filtering. After filtering, memory will >> >be much more fragmented and you require many more elf headers, with each >> >header describing one contiguous chunk of memory. >> There is no need to change the ELF header because the page that the >> program doesn't dump is changed into zero page with lseek(). >> > >How does that help in reducing the file size then? Your dump file size has not >reduced on disk. The moment you do lseek() and skip few pages and later >wrote data, gap will be filled with zeros. This basically defeats the >purpose of filtering. Am I missing something? By using lseek, disk blocks aren't allocated and the dump file size can be reduced. The dump file must be treated carefully not to expand the holes in the file with zero-filled blocks. The advantage of this method is that crash can be used without any modification. If elf headers are regenerated, crash will recognize the skipped pages as memory holes. Thanks Ken'ichi Ohmichi
_______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
