From owner-freebsd-arch@FreeBSD.ORG Sun Mar 27 04:20:54 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6054D106566B for ; Sun, 27 Mar 2011 04:20:54 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [65.120.238.197]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9F68FC08 for ; Sun, 27 Mar 2011 04:20:53 +0000 (UTC) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.4/8.14.1) with ESMTP id p2R49hq5081052 for ; Sat, 26 Mar 2011 21:09:43 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.4/8.13.4/Submit) id p2R49h9e081051; Sat, 26 Mar 2011 21:09:43 -0700 (PDT) Date: Sat, 26 Mar 2011 21:09:43 -0700 (PDT) From: Matthew Dillon Message-Id: <201103270409.p2R49h9e081051@apollo.backplane.com> To: freebsd-arch@freebsd.org References: <20110323200200.GA85810@freebsd.org> <201103232050.p2NKov4g017463@lurza.secnetix.de> <4D8A7976.5090103@freebsd.org> <20110323232209.GA15486@freebsd.org> <20110324083048.60862a0f@ernst.jennejohn.org> <20110324214320.K1149@besplex.bde.org> Subject: Re: kernel memory checks on boot vs. boot time X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2011 04:20:54 -0000 In DFly I just changed to code to check one word per 64KB instead of one word per 4KB, which cuts the time down by a factor of 16. At least some basic 'is this actually memory' test should probably still be done. Probing 64G of ram was really annoying before I made that change. Another solution would be to use a much larger mmu mapping, like a DMAP style mapping. Iterating the dram isn't going to be fast no matter what since each test requires a full RAS cycle anyway. I didn't try this approach but it would be easier to code (treating the page directory entry as a mapping cache for multiple tests). Adding programmable bells and whistles would be overkill, and high-end machines shouldn't require a tunable bypass to boot reasonably anyhow. -Matt