From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 8 21:50:38 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 C396F16A4CE for ; Tue, 8 Mar 2005 21:50:38 +0000 (GMT) Received: from mgw-x2.nokia.com (mgw-x2.nokia.com [131.228.20.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78D0343D54 for ; Tue, 8 Mar 2005 21:50:37 +0000 (GMT) (envelope-from Vijay.Singh@nokia.com) Received: from esdks002.ntc.nokia.com (esdks002.ntc.nokia.com [172.21.138.121])j28LoZU08540; Tue, 8 Mar 2005 23:50:35 +0200 (EET) X-Scanned: Tue, 8 Mar 2005 23:49:31 +0200 Nokia Message Protector V1.3.34 2004121512 - RELEASE Received: (from root@localhost) by esdks002.ntc.nokia.com (8.12.9/8.12.9) id j28LnVoK009786; Tue, 8 Mar 2005 23:49:31 +0200 Received: from mgw-int1.ntc.nokia.com (172.21.143.96) by esdks002.ntc.nokia.com 00sbrI5e; Tue, 08 Mar 2005 23:49:30 EET Received: from daebh001.NOE.Nokia.com (daebh001.americas.nokia.com [10.241.35.121])j28LnTM09006; Tue, 8 Mar 2005 23:49:29 +0200 (EET) Received: from mvebe001.NOE.Nokia.com ([172.18.140.37]) by daebh001.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6881); Tue, 8 Mar 2005 15:49:25 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Tue, 8 Mar 2005 13:49:24 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: partial memory dump Thread-Index: AcUkJ4pDeXk3I7MfSYm/gGtIKoQ9tgAAD/Eg From: To: X-OriginalArrivalTime: 08 Mar 2005 21:49:25.0384 (UTC) FILETIME=[B2043880:01C52428] 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:50:38 -0000 Hi, thanks for the quick reply. I do indeed write the bitmap, which is a = part of the sysdump_hdr structure to the disk. The disk routine does not = currently report that it had to miss any block. Here is what I get from = dadump(). dumpsys() in machdep.c dumping to dev 20401, offset 0 dadump() dodump: 1 USRSTACK: 0xbfbfc000 to 0xe6fa5000 Maxmem: 524288, secsize: 512 dumplo: 0, num: 84872, size: 2097152 next block to write: 90640 @ 8 blocks/req Dumping bitmap at addr e6fa5000 to sec 16210, 88 sectors next block to write: 90776 @ 8 blocks/req Dumping 0x2960 pages of memory to sec 0x16298, 0x14b00 sectors This version of dadump() does not implement write combining yet. Do you = think savecore is not able to find the data blocks correctly in the = swap? br vijay -----Original Message----- From: ext Dan Nelson [mailto:dnelson@allantgroup.com] Sent: Tuesday, March 08, 2005 1:40 PM To: Singh Vijay (Nokia-NET/MtView) Cc: freebsd-hackers@freebsd.org Subject: Re: partial memory dump 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. >=20 > 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.=20 You want to end up a with a sparse file, with blank spots every place dadump skipped a block. --=20 Dan Nelson dnelson@allantgroup.com