From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 8 21:39:39 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8F1716A4F3 for ; Tue, 8 Mar 2005 21:39:39 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 267F543D1D for ; Tue, 8 Mar 2005 21:39:39 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j28LdbXY033072; Tue, 8 Mar 2005 15:39:37 -0600 (CST) (envelope-from dan) Date: Tue, 8 Mar 2005 15:39:37 -0600 From: Dan Nelson To: Vijay.Singh@nokia.com Message-ID: <20050308213937.GF37452@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-hackers@freebsd.org Subject: Re: partial memory dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 21:39:39 -0000 In the last episode (Mar 08), Vijay.Singh@nokia.com said: > Hello all. I am trying to allow a FreeBSD based kernel to crash dump > even if configured swap is not enough to fill entire physical memory. > This is because there could be 2G RAM on the system. I assume that > most pages would not be mapped. > > The algorithm to do this is to have a bitmask, with bits set for > pages: from 0 to Maxmem, and then adding pages from USRSTACK to > vm_map_max(kmem_map). This is done in scsi_da.c, dadump() routine. I > am able to get the dump, and after savecore collects it from swap I > get the kernel and core files. However I am not able to get the stack > trace. I think you also need to write that bitmap to disk so that savecore can read it and put the data blocks in the right place in the vmcore file. You want to end up a with a sparse file, with blank spots every place dadump skipped a block. -- Dan Nelson dnelson@allantgroup.com