Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2012 18:23:15 -0000
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "Alex Goncharov" <alex-goncharov@comcast.net>, <freebsd-hackers@freebsd.org>
Subject:   Re: 8 to 9: A longer wait early in the boot of a (damaged) CompaqPresario
Message-ID:  <3C638A871829485CB0A9B3285CA23352@multiplay.co.uk>
References:  <E1Ry5E4-000HRq-ED@hans3>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_06ED_01CCECD8.0CB76B60
Content-Type: text/plain; format=flowed; charset="Windows-1252";
	reply-type=original
Content-Transfer-Encoding: 7bit

----- Original Message ----- 
From: "Alex Goncharov" <alex-goncharov@comcast.net>

> About a week ago, I made a jump and upgraded the system's FreeBSD from
> version 8 to 9.  Everything is great (I am typing this message on that
> machine now) but the boot pause after the (looking new in 9) boot menu
> is *much* longer now -- it will show the '\' character and wait for,
> subjectively, half a minute before putting anything else on the
> screen.

Two things spring to mind which could help:
1. The reduce the slice sampling size in sys/boot/zfs/zfs.c which was
increased recently
2. disable boot time mem tests using the attached patch

Patches for both from 8.2-RELEASE attached. For #2 you also need the
following in /boot/loader.conf
hw.memtest.tests="0"

    Regards
    Steve



================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster@multiplay.co.uk.
------=_NextPart_000_06ED_01CCECD8.0CB76B60
Content-Type: text/plain; format=flowed; name="boot-memtest-tunable.txt";
	reply-type=original
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="boot-memtest-tunable.txt"

--- sys/amd64/amd64/machdep.c	2011/06/08 08:12:15	222853=0A=
+++ sys/amd64/amd64/machdep.c	2011/07/30 13:33:05	224516=0A=
@@ -1309,7 +1309,7 @@=0A=
 {=0A=
 	int i, physmap_idx, pa_indx, da_indx;=0A=
 	vm_paddr_t pa, physmap[PHYSMAP_SIZE];=0A=
-	u_long physmem_tunable;=0A=
+	u_long physmem_tunable, memtest, tmpul;=0A=
 	pt_entry_t *pte;=0A=
 	struct bios_smap *smapbase, *smap, *smapend;=0A=
 	u_int32_t smapsize;=0A=
@@ -1372,6 +1372,14 @@=0A=
 		Maxmem =3D atop(physmem_tunable);=0A=
 =0A=
 	/*=0A=
+	 * By default keep the memtest enabled.  Use a general name so that=0A=
+	 * one could eventually do more with the code than just disable it.=0A=
+	 */=0A=
+	memtest =3D 1;=0A=
+	if (TUNABLE_ULONG_FETCH("hw.memtest.tests", &tmpul))=0A=
+		memtest =3D tmpul;=0A=
+=0A=
+	/*=0A=
 	 * Don't allow MAXMEM or hw.physmem to extend the amount of memory=0A=
 	 * in the system.=0A=
 	 */=0A=
@@ -1433,6 +1441,8 @@=0A=
 				goto do_dump_avail;=0A=
 =0A=
 			page_bad =3D FALSE;=0A=
+			if (memtest =3D=3D 0)=0A=
+				goto skip_memtest;=0A=
 =0A=
 			/*=0A=
 			 * map page into kernel: valid, read/write,non-cacheable=0A=
@@ -1470,6 +1480,7 @@=0A=
 			 */=0A=
 			*(int *)ptr =3D tmp;=0A=
 =0A=
+skip_memtest:=0A=
 			/*=0A=
 			 * Adjust array of valid/good pages.=0A=
 			 */=0A=

------=_NextPart_000_06ED_01CCECD8.0CB76B60
Content-Type: text/plain; format=flowed; name="zfs-slice-boot.txt";
	reply-type=original
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="zfs-slice-boot.txt"

--- sys/boot/zfs/zfs.c.orig	2011-10-20 18:15:29.966685430 +0000=0A=
+++ sys/boot/zfs/zfs.c	2011-10-20 18:18:22.291033636 +0000=0A=
@@ -45,6 +45,12 @@=0A=
 =0A=
 #include "zfsimpl.c"=0A=
 =0A=
+/*=0A=
+ * For GPT this should be 128 but leads to 50+ second delay in BTX =
loader so=0A=
+ * we use the original 4 pre r198420 by default for the boot process=0A=
+ */=0A=
+#define ZFS_MAX_SLICES 4=0A=
+=0A=
 static int	zfs_open(const char *path, struct open_file *f);=0A=
 static int	zfs_write(struct open_file *f, void *buf, size_t size, =
size_t *resid);=0A=
 static int	zfs_close(struct open_file *f);=0A=
@@ -415,7 +421,7 @@=0A=
 		if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0))=0A=
 			close(fd);=0A=
 =0A=
-		for (slice =3D 1; slice <=3D 128; slice++) {=0A=
+		for (slice =3D 1; slice <=3D ZFS_MAX_SLICES; slice++) {=0A=
 			sprintf(devname, "disk%dp%d:", unit, slice);=0A=
 			fd =3D open(devname, O_RDONLY);=0A=
 			if (fd =3D=3D -1) {=0A=

------=_NextPart_000_06ED_01CCECD8.0CB76B60--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C638A871829485CB0A9B3285CA23352>