Date: Thu, 21 Nov 2013 12:42:43 -0500 From: Ed Maste <emaste@freebsd.org> To: Eitan Adler <lists@eitanadler.com> Cc: freebsd-current Current <freebsd-current@freebsd.org> Subject: Re: Slow boot with 256GB of RAM? Message-ID: <CAPyFy2D8r7p4joyotb6_WAQu9i0=VxopzqGXSDzvQO0__WMrFQ@mail.gmail.com> In-Reply-To: <CAF6rxgkht8ORmZZVOS8fSNgtN33MO4iYLuzwMH%2BTD4JtXuU-hA@mail.gmail.com> References: <5286F670.2050305@jrv.org> <5287071B.3020209@petermann-it.de> <528786C9.9070409@allanjude.com> <5287BB44.4020104@jrv.org> <5287D632.4010802@allanjude.com> <CAPnfw0cd41FG6-1V%2BLdcJCrkrrkEJmkXO4dw4PH3McQROoWbPw@mail.gmail.com> <CAF6rxgkht8ORmZZVOS8fSNgtN33MO4iYLuzwMH%2BTD4JtXuU-hA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16 November 2013 17:49, Eitan Adler <lists@eitanadler.com> wrote:
> On Sat, Nov 16, 2013 at 4:12 PM, Zach Crum <crum.zach@gmail.com> wrote:
>> This setting is not listed in /boot/defaults/loader.conf. Is it supposed to
>> be singular or plural?
>
> Plural.
>
> I will commit the patch.
The FAQ update patch looks fine.
> Does any know of cases where this memory test actually catches errors?
> How important is it?
The boot time test is primarily of historical significance, and
doesn't really provide value on contemporary systems. It's mainly a
workaround for ancient broken BIOSes that might return bogus memory
map data. I intend to commit the patch below that disables it by
default.
The variable name is "hw.memtest.tests" as it's intended to be
extended to a bitmap of tests to run at boot, with other bits
representing more comprehensive tests.
-Ed
commit 58f501f70427ce2aeb9c8b18d2b7bec543818dae
Author: Ed Maste <emaste@freebsd.org>
Date: Thu Nov 21 12:31:06 2013 -0500
Disable amd64 boot time memory test by default
The page presence memory test takes a long time on large memory systems
and has little value on contemporary amd64 hardware.
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 7f05d58..df03e55 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1476,13 +1476,15 @@ getmemsize(caddr_t kmdp, u_int64_t first)
Maxmem = atop(physmem_tunable);
/*
- * By default enable the memory test on real hardware, and disable
- * it if we appear to be running in a VM. This avoids touching all
- * pages unnecessarily, which doesn't matter on real hardware but is
- * bad for shared VM hosts. Use a general name so that
- * one could eventually do more with the code than just disable it.
+ * The boot memory test is disabled by default, as it takes a
+ * significant amount of time on large-memory systems, and is
+ * unfriendly to virtual machines as it unnecessarily touches all
+ * pages.
+ *
+ * A general name is used as the code may be extended to support
+ * additional tests beyond the current "page present" test.
*/
- memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1;
+ memtest = 0;
TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest);
/*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2D8r7p4joyotb6_WAQu9i0=VxopzqGXSDzvQO0__WMrFQ>
