From owner-freebsd-current@FreeBSD.ORG Sun Dec 14 14:58:01 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 6E43E357 for ; Sun, 14 Dec 2014 14:58:01 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41A3230C for ; Sun, 14 Dec 2014 14:58:00 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y0AcM-000218-HA; Sun, 14 Dec 2014 14:57:54 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBEEvrWX021688; Sun, 14 Dec 2014 07:57:53 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18BA+ihE95ucMulrJgJjoBm Message-ID: <1418568731.935.8.camel@freebsd.org> Subject: Re: simple task to speed up booting From: Ian Lepore To: Poul-Henning Kamp In-Reply-To: <43445.1418553160@critter.freebsd.dk> References: <43445.1418553160@critter.freebsd.dk> Content-Type: multipart/mixed; boundary="=-PxMyjFLnRMWIs9bYXqP4" Date: Sun, 14 Dec 2014 07:52:11 -0700 Mime-Version: 1.0 X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Cc: 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 14:58:01 -0000 --=-PxMyjFLnRMWIs9bYXqP4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. > > 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. > 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. 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. -- Ian --=-PxMyjFLnRMWIs9bYXqP4 Content-Disposition: inline; filename="libstand_twiddle.diff" Content-Type: text/x-patch; name="libstand_twiddle.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: lib/libstand/twiddle.c =================================================================== --- lib/libstand/twiddle.c (revision 274850) +++ lib/libstand/twiddle.c (working copy) @@ -46,7 +46,11 @@ void twiddle() { static int pos; + static int divisor; - putchar("|/-\\"[pos++ & 3]); - putchar('\b'); + if (divisor-- == 0) { + divisor = 32; + putchar("|/-\\"[pos++ & 3]); + putchar('\b'); + } } --=-PxMyjFLnRMWIs9bYXqP4--