Date: Sat, 8 Apr 2006 03:17:38 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Peter Wemm <peter@wemm.org> Cc: Paul Marciano <pm940@yahoo.com>, freebsd-questions@freebsd.org Subject: Re: Does FreeBSD support sparse kernel crash dumps? Message-ID: <20060408081737.GH5697@dan.emsphone.com> In-Reply-To: <200604072228.12452.peter@wemm.org> References: <20060407230152.57316.qmail@web54004.mail.yahoo.com> <200604072228.12452.peter@wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Apr 07), Peter Wemm said: > On Friday 07 April 2006 04:01 pm, Paul Marciano wrote: > > Do you compress the data stream at all (e.g. gzip)? > > No, but it could be done in theory.. if you were willing to set aside > some memory for the compression algorithm to use. Or just do some > sort of simple compression (run length encoding?) The problem is that > the dump code cannot allocate memory after the machine has crashed. > It has to be able to run as isolated from the rest of the kernel as > possible in order to give a true snapshot of the undisturbed state. This is pretty easy since zlib lets you pass in your own malloc/free functions. It's sufficient to pre-malloc (or simply statically declare) a 128k block of memory, then dole it out with a simple function that returns high_water+=asked_for_size until you get a request that would push highwater over 128k. A patch that does this for 5.* on x86 only is at http://www.allantgroup.com/FreeBSD/crashdump_compress.diff . -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060408081737.GH5697>