From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 16 19:04:51 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4522C106564A for ; Thu, 16 Feb 2012 19:04:51 +0000 (UTC) (envelope-from prvs=139337f927=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id C43BA8FC16 for ; Thu, 16 Feb 2012 19:04:50 +0000 (UTC) X-Spam-Processed: mail1.multiplay.co.uk, Thu, 16 Feb 2012 18:36:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50018097106.msg for ; Thu, 16 Feb 2012 18:35:59 +0000 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=139337f927=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: <3C638A871829485CB0A9B3285CA23352@multiplay.co.uk> From: "Steven Hartland" To: "Alex Goncharov" , References: Date: Thu, 16 Feb 2012 18:23:15 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_06ED_01CCECD8.0CB76B60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: Subject: Re: 8 to 9: A longer wait early in the boot of a (damaged) CompaqPresario X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2012 19:04:51 -0000 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" > 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--