From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpagG-0000h1-Hy for qemu-devel@nongnu.org; Thu, 20 Jun 2013 04:57:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpagF-0000Ua-Fz for qemu-devel@nongnu.org; Thu, 20 Jun 2013 04:57:24 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:56918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpagF-0000UT-9l for qemu-devel@nongnu.org; Thu, 20 Jun 2013 04:57:23 -0400 Received: by mail-wi0-f176.google.com with SMTP id ey16so1540001wid.15 for ; Thu, 20 Jun 2013 01:57:22 -0700 (PDT) Date: Thu, 20 Jun 2013 10:57:19 +0200 From: Stefan Hajnoczi Message-ID: <20130620085719.GA15672@stefanha-thinkpad.redhat.com> References: <1369709437-24969-1-git-send-email-qiaonuohan@cn.fujitsu.com> <20130619134952.GE31475@stefanha-thinkpad.muc.redhat.com> <51C2667B.4030600@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51C2667B.4030600@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH v4 0/9] Make 'dump-guest-memory' dump in kdump-compressed format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qiao Nuohan Cc: zhangxh@cn.fujitsu.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, anderson@redhat.com, kumagai-atsushi@mxc.nes.nec.co.jp, afaerber@suse.de On Thu, Jun 20, 2013 at 10:18:35AM +0800, Qiao Nuohan wrote: > On 06/19/2013 09:49 PM, Stefan Hajnoczi wrote: > >Where does that code live that writes DISKDUMP files? I can see the > >diskdump.[ch] code. > > Sorry, I cannot catch what do you mean here. Please link to the code that writes DISKDUMP kdump files on a physical machine. I only see the crash utility code to read the DISKDUMP code but I haven't found anything in the Linux kernel, the crash utility, or the kexec-utils code to actually write a DISKDUMP file. > > > >The file format is pretty bad: we need 4 temporary files and a lot of > >data copying to write it out. > > > >Why not just compress an ELF file and teach the crash utility how to > >decompress while reading the ELF? > > > >Also, did you look into simply outputting the ELF file without zero > >pages? > > What I want is a dump file with smaller size. And compressed format and with > zero pages excluded can make it. I choose kdump-compressed format because it is > a standard format and it can realize what I want. > > Why 4 temporary files are need? dump-guest-memory may be called with a fd which > is supposed to send data of dump to. If fd is opened on a pipe or etc which is > unable to seek, then I need to cache the data. I understand why you need temporary files, but my questions stand: Have you looked at using ELF more efficiently instead of duplicating kdump code into QEMU? kdump is not a great format for the problem you're trying to solve - you're not filling in the Linux-specific metadata and it's a pain to write due to its layout. Why can't you simply omit zero pages from the ELF? Why can't you compress the entire ELF file and add straightforward decompression to the crash utility? Stefan