Date: Tue, 22 Mar 2011 15:43:22 -0400 From: George Neville-Neil <gnn@neville-neil.com> To: Bjoern A. Zeeb <bz@FreeBSD.org> Cc: arch@freebsd.org Subject: Re: kernel memory checks on boot vs. boot time Message-ID: <8E13F8D5-45E1-4A9D-9ACE-E1344B5F3686@neville-neil.com> In-Reply-To: <alpine.BSF.2.00.1103221634241.6104@ai.fobar.qr> References: <alpine.BSF.2.00.1103221634241.6104@ai.fobar.qr>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 22, 2011, at 13:30 , Bjoern A. Zeeb wrote: > Hi, >=20 > as part of the i386/pc98/amd64 boot process we are doing some basic > memory testing, mapping pages and running a couple of pattern > write/read tests on the first bytes (see getmemsize() implmentations). >=20 > Depending on the features enabled and boot -v or not you may notice > it as "nothing happens" booting from loader, after any of these > possible lines: > GDB: no debug ports present > KDB: debugger backends: ddb > KDB: current backend: ddb > SMAP type=3D... > but before the Copyright message. >=20 > With the growing number of memory this can lead to a significant > fraction of kernel startup time on amd64 (~40s delays observed with > 96G of RAM). Looping over the pages, but not mapping them and not > running the pattern tests reduces this significantly (to single digit > numbers of seconds). >=20 > As a first step I'd like to discuss how worth the actual memory tests > are these days, to figure out a sensible default. >=20 > Not wanting to remove them but maybe make more use of them in the > future (as we do not report any problems we find currently) I'd = suggest > to introduce a tunable to disable/enable them, say >=20 > hw.run_memtest >=20 > with the following values: >=20 > 0 do not map the page and do not run the pattern tests > 1 do run the pattern test on the beginning of the page > (current default). > and maybe add > 2 run the pattern tests on the entire pages? >=20 > I would further suggest to add a printf independently of boot -v > there, so that the user who would wait, will know what's (not) going = on. > Something along the lines of: > "Testing physical address space (%s)." > 0 "skipping extra pattern tests" > 1 "pattern tests on beginning of each page" > 2 "pattern tests on entire pages" >=20 >=20 > If this is something that makes sense, I'd suggest to factor things > out to sys/x86 and would provide a patch for further discussion and > improvements (like error reporting, etc). >=20 > Comments? Suggestions? I do not know how effective our memory tests on are on modern systems. I do think that having a tunable is a good idea for people who want faster boots. Best, George -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk2I+9oACgkQYdh2wUQKM9JZyACfaaPAbg2weBkZvi/gxM4JfKqV 3/IAoIFbwEpSo4Aix7TwRn7SNOmY6Syq =3DVKJG -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8E13F8D5-45E1-4A9D-9ACE-E1344B5F3686>