From owner-freebsd-arch@FreeBSD.ORG Wed Dec 22 02:09:44 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4598E16A4CF for ; Wed, 22 Dec 2004 02:09:44 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3F2E43D5A for ; Wed, 22 Dec 2004 02:09:43 +0000 (GMT) (envelope-from csujun@gmail.com) Received: by mproxy.gmail.com with SMTP id q44so92074cwc for ; Tue, 21 Dec 2004 18:09:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ZcJYgK8m4/AFHPbT4V+9rt+u1QvpjG7RjliOgE7cg3ncuHVn60QOZ1ozFc211O6WC1icZxFUvr3FM2ZnF8tCVgfs1rA72N/HdxGYU+u6ueX90VWr4Nig+2A/Ghgwmltgpr04NoVtTGRktbZzKJMWinbby+h4YRauCFmtHsp8xTA= Received: by 10.11.94.36 with SMTP id r36mr260892cwb; Tue, 21 Dec 2004 18:09:43 -0800 (PST) Received: by 10.11.118.39 with HTTP; Tue, 21 Dec 2004 18:09:43 -0800 (PST) Message-ID: Date: Wed, 22 Dec 2004 10:09:43 +0800 From: Jun Su To: Andrew Gallatin In-Reply-To: <16835.1939.301128.802993@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <16835.1939.301128.802993@grasshopper.cs.duke.edu> cc: alc@freebsd.org cc: arch@freebsd.org cc: tegge@freebsd.org cc: delphij@freebsd.org Subject: Re: Propose for Several Dump types X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jun Su List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 02:09:44 -0000 On Fri, 17 Dec 2004 11:21:39 -0500 (EST), Andrew Gallatin wrote: > > Jun Su writes: > > > Kernel-Only Dump > > ============== > > We now can use /dev/kmem as the core file. If we can generate a dump file with > > the same information with it, then we can enable kernel-only dump with > > very limit code changes. > > > > 1. Change KVM library to support a new type of file that only contains > > kernel memory. > > 2. Change kernel side to write only kernel memory when dumping. > > 3. Change dumpon utility to do the right checking on the partiction size. > > I think the kernel-only dump is an excellent idea. But I'm confused > as to how you would do it. > > To me, it seems like the most obvious way to do this would be walking > the kernel's vm maps. But that does not work on 64-bit platforms which > have a direct 1-1 physical/virtual address mapping. So how do you > quickly distinguish kernel memory from user memory in the dump > routine? I'm probably missing something simple.. My current draft idea is to traverse the vm_map structure. Then I can find out the vm_object list. Then dump those memory regions. I don't understand VM much. In this area, I need input from our VM guru... > > Thanks, > > Drew > > -- -- Jun Su