summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-05-21 19:40:31 +0000
committeremaste <emaste@FreeBSD.org>2015-05-21 19:40:31 +0000
commit60bdd635db486cdaf2b92710aec25841bc4c60d6 (patch)
treedaa8151159d5dfc645e40805520131df294d2819
parenta071e4290a81cb63f83074be202b5ace6eb49b6b (diff)
downloadFreeBSD-src-60bdd635db486cdaf2b92710aec25841bc4c60d6.zip
FreeBSD-src-60bdd635db486cdaf2b92710aec25841bc4c60d6.tar.gz
MFC r258431: 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. Relnotes: Yes Reviewed by: jhb, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1544
-rw-r--r--sys/amd64/amd64/machdep.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 0c6f4df..51f5988 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1590,13 +1590,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);
/*
OpenPOWER on IntegriCloud