From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 08:02:10 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19DEC106566B; Tue, 9 Nov 2010 08:02:10 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh7.mail.rice.edu (mh7.mail.rice.edu [128.42.199.46]) by mx1.freebsd.org (Postfix) with ESMTP id D66E98FC13; Tue, 9 Nov 2010 08:02:09 +0000 (UTC) Received: from mh7.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh7.mail.rice.edu (Postfix) with ESMTP id CA29528F809; Tue, 9 Nov 2010 02:02:08 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh7.mail.rice.edu, auth channel Received: from mh7.mail.rice.edu ([127.0.0.1]) by mh7.mail.rice.edu (mh7.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 57apkCFrayfn; Tue, 9 Nov 2010 02:02:08 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh7.mail.rice.edu (Postfix) with ESMTPSA id 4970D28F800; Tue, 9 Nov 2010 02:02:08 -0600 (CST) Message-ID: <4CD8FFFF.3070106@rice.edu> Date: Tue, 09 Nov 2010 02:02:07 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100725) MIME-Version: 1.0 To: Andriy Gapon References: <4CA0DA49.2090006@freebsd.org> <4CA3A48A.5070300@freebsd.org> <4CA3BD1E.5070807@rice.edu> <4CA5911E.3000101@freebsd.org> <4CAE0060.7050607@freebsd.org> <4CAECC4D.90707@rice.edu> <4CD1AA45.7000504@freebsd.org> <4CD1AD80.2090903@rice.edu> <4CD1D4AA.3060309@freebsd.org> In-Reply-To: <4CD1D4AA.3060309@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 09 Nov 2010 13:44:13 +0000 Cc: Alan Cox , freebsd-current@freebsd.org Subject: Re: minidump size on amd64 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: Tue, 09 Nov 2010 08:02:10 -0000 Andriy Gapon wrote: > So, here is the next version of the patch: > http://people.freebsd.org/~avg/amd64-minidump.4.diff > > Changes since the last version: > 1. libkvm - try to support both the new and the previous formats/versions of > amd64 minidump. I am not entirely sure about style in which I handled handling > of version 1 minidump. Identifier names like pmapsize (for "page map size") and > page_map could also be improved, perhaps. > 2. kernel - implemented dumping of 1GB pages via "fake" 512 x 2MB pages per > Alan's suggestion. > > The change is only compile tested so far. Not sure if it's possible to test > handling 1GB pages yet :-) > > As always, reviews, testing and suggestions are very welcome. > The kernel portion of the patch looks correct. If I were to make one stylistic suggestion, it would be to make the control flow of the outer and inner loops as similar as possible, that is, for (... if ((pdp[i] & PG_V) == 0) { ... continue; } if ((pdp[i] & PG_PS) != 0) { ... continue; } for (... if ((pd[j] & PG_V) == 0) continue; if ((pd[j] & PG_PS) != 0) { ... continue; } for (... if ((pt[x] & PG_V) == 0) continue; ... I think this would make the code a little easier to follow. Alan