From owner-freebsd-current@FreeBSD.ORG Wed Mar 22 18:24:11 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A82A16A426; Wed, 22 Mar 2006 18:24:11 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from lh.synack.net (lh.synack.net [204.152.188.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F98043D75; Wed, 22 Mar 2006 18:24:09 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: by lh.synack.net (Postfix, from userid 100) id 056EF5E4900; Wed, 22 Mar 2006 10:24:09 -0800 (PST) Received: from [192.168.168.201] (moscow-cuda-gen2-68-64-60-20.losaca.adelphia.net [68.64.60.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lh.synack.net (Postfix) with ESMTP id 99DD45E4900; Wed, 22 Mar 2006 10:24:08 -0800 (PST) Message-ID: <44219647.8010602@FreeBSD.org> Date: Wed, 22 Mar 2006 10:24:07 -0800 From: Jason Evans User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <20060321184019.GX35129@funkthat.com> <1EB2EEE3-855C-4B76-81A6-1880526797CE@freebsd.org> <44215B1B.1080104@mac.com> <200603221019.43713.jhb@freebsd.org> In-Reply-To: <200603221019.43713.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.5 (2005-11-28) on lh.synack.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.5 Cc: John-Mark Gurney , freebsd-current@freebsd.org Subject: Re: core dumps are HUGE... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 18:24:11 -0000 John Baldwin wrote: > I think the better path is to provide sparse coredumps. I.e., when dumping a > core, leave the parts of the process map that are mapped but have no backing > store yet (b/c the pages haven't been touched) sparse by not writing to them, > but just seeking past them. This doesn't require complicating the malloc > implementation just for the sake of a core dump on a CF device. I like this solution too. I'm sure there are people who could make this change with much less effort than me though. =) It looks like the necessary changes are in sys/kern/imgact_elf.c:coredump(). That code writes a segment at a time, but it would need to be modified to look at the process's page map and write segments piecemeal. Jason