From owner-freebsd-current@FreeBSD.ORG Sun Dec 14 17:42:58 2014 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E42517CA; Sun, 14 Dec 2014 17:42:58 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id D168397B; Sun, 14 Dec 2014 17:42:58 +0000 (UTC) Received: from [10.0.1.20] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 254A7341F84F; Sun, 14 Dec 2014 09:42:58 -0800 (PST) Subject: Re: simple task to speed up booting Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Alfred Perlstein In-Reply-To: <1418568731.935.8.camel@freebsd.org> Date: Sun, 14 Dec 2014 09:43:00 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <5764B4CA-A65B-4617-90E0-AA48C51310A0@mu.org> References: <43445.1418553160@critter.freebsd.dk> <1418568731.935.8.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1283) Cc: Poul-Henning Kamp , current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2014 17:42:59 -0000 On Dec 14, 2014, at 6:52 AM, Ian Lepore wrote: > On Sun, 2014-12-14 at 10:32 +0000, Poul-Henning Kamp wrote: >> The rotating swirlie ('-/|\') in the loader accounts for a = surprisingly >> large part of our boot time on systems with slow-ish serial consoles. >>=20 >> I think right now it takes a step for each 512 byte read, reducing = that >> to once every 64kB or even 1MB would be an improvement with the kind = of >> kernel sizes we have today. >>=20 >=20 > I experimented with that a while ago using the attached patch and was > disappointed with the results. As I vaguely remember it, a divisor of = 8 > looked fine, but had no significant speedup. With a divisor of 32 the > difference was measureable (only like 1.5 seconds or so faster), but = it > gave the impression that something was wrong, and the overall = perception > was that it was slower rather than faster, despite what a stopwatch > said. >=20 > I was testing at 115kbps, maybe at 9600 it would be significant. I > don't understand why anything these days is still defaulting to 9600. > It's the 21st century, but we never got the George Jetson flying cars = we > were promised, and apparently we're never going to break loose from = the > standards set by accoustic-coupled modems. >=20 > -- Ian >=20 > Index: lib/libstand/twiddle.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lib/libstand/twiddle.c (revision 274850) > +++ lib/libstand/twiddle.c (working copy) > @@ -46,7 +46,11 @@ void > twiddle() > { > static int pos; > + static int divisor; >=20 > - putchar("|/-\\"[pos++ & 3]); > - putchar('\b'); > + if (divisor-- =3D=3D 0) { > + divisor =3D 32; > + putchar("|/-\\"[pos++ & 3]); > + putchar('\b'); > + } > } Ian, can "divisor" be exposed so that it can be set based on the = loader's output device? =20 That was we can preserve it for video consoles, but other things such as = serial at <=3D 9600 could throttle it (or even shut it off=85 = twiddle_divisor =3D TWIDDLE_SHUT_OFF). -Alfred -Alfred