----- Original Message ----- From: "Alex Goncharov" <alex-goncha...@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 postmas...@multiplay.co.uk.
--- sys/amd64/amd64/machdep.c   2011/06/08 08:12:15     222853
+++ sys/amd64/amd64/machdep.c   2011/07/30 13:33:05     224516
@@ -1309,7 +1309,7 @@
{
        int i, physmap_idx, pa_indx, da_indx;
        vm_paddr_t pa, physmap[PHYSMAP_SIZE];
-       u_long physmem_tunable;
+       u_long physmem_tunable, memtest, tmpul;
        pt_entry_t *pte;
        struct bios_smap *smapbase, *smap, *smapend;
        u_int32_t smapsize;
@@ -1372,6 +1372,14 @@
                Maxmem = atop(physmem_tunable);

        /*
+        * By default keep the memtest enabled.  Use a general name so that
+        * one could eventually do more with the code than just disable it.
+        */
+       memtest = 1;
+       if (TUNABLE_ULONG_FETCH("hw.memtest.tests", &tmpul))
+               memtest = tmpul;
+
+       /*
         * Don't allow MAXMEM or hw.physmem to extend the amount of memory
         * in the system.
         */
@@ -1433,6 +1441,8 @@
                                goto do_dump_avail;

                        page_bad = FALSE;
+                       if (memtest == 0)
+                               goto skip_memtest;

                        /*
                         * map page into kernel: valid, read/write,non-cacheable
@@ -1470,6 +1480,7 @@
                         */
                        *(int *)ptr = tmp;

+skip_memtest:
                        /*
                         * Adjust array of valid/good pages.
                         */
--- sys/boot/zfs/zfs.c.orig     2011-10-20 18:15:29.966685430 +0000
+++ sys/boot/zfs/zfs.c  2011-10-20 18:18:22.291033636 +0000
@@ -45,6 +45,12 @@

#include "zfsimpl.c"

+/*
+ * For GPT this should be 128 but leads to 50+ second delay in BTX loader so
+ * we use the original 4 pre r198420 by default for the boot process
+ */
+#define ZFS_MAX_SLICES 4
+
static int      zfs_open(const char *path, struct open_file *f);
static int      zfs_write(struct open_file *f, void *buf, size_t size, size_t 
*resid);
static int      zfs_close(struct open_file *f);
@@ -415,7 +421,7 @@
                if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0))
                        close(fd);

-               for (slice = 1; slice <= 128; slice++) {
+               for (slice = 1; slice <= ZFS_MAX_SLICES; slice++) {
                        sprintf(devname, "disk%dp%d:", unit, slice);
                        fd = open(devname, O_RDONLY);
                        if (fd == -1) {
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to