From owner-freebsd-current@FreeBSD.ORG Mon Dec 22 23:53:16 2014 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4395421C for ; Mon, 22 Dec 2014 23:53:16 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (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 18CA964F1F for ; Mon, 22 Dec 2014 23:53:15 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y3Cmo-000O6J-Ck; Mon, 22 Dec 2014 23:53:14 +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 sBMNrCYZ032134; Mon, 22 Dec 2014 16:53:12 -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: U2FsdGVkX19Ml8B+ufztve11aqVvGQD0 Message-ID: <1419292392.1018.132.camel@freebsd.org> Subject: Re: simple task to speed up booting From: Ian Lepore To: Poul-Henning Kamp Date: Mon, 22 Dec 2014 16:53:12 -0700 In-Reply-To: <22181.1419261352@critter.freebsd.dk> References: <43445.1418553160@critter.freebsd.dk> <1419224743.1018.108.camel@freebsd.org> <22181.1419261352@critter.freebsd.dk> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Mon, 22 Dec 2014 23:53:16 -0000 On Mon, 2014-12-22 at 15:15 +0000, Poul-Henning Kamp wrote: > -------- > In message <1419224743.1018.108.camel@freebsd.org>, Ian Lepore writes: > > >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 investigated this a bit today. I instrumented the loader on arm to > >count how many times twiddle() is called while loading a 5.5MB kernel. > >When loading over NFS it was called 5580 times. When loading from an > >sdcard it was called 284 times. > > It would be plenty if it twiddled once per second, in fact it would > probably be much better if it *only* twiddled once per second, because > the at least people could count the steps and gain some idea where > in the process the problem is. > Unfortunately we can't count on the availability of a useful clock in a libstand environment. > >So all in all it seems like different kinds of IO need different > >throttling, something like the attached (which also still has some stats > >output in it). I can't decide if it's worth committing... it'll have a > >lot of value to someone with slow serial and netbooting, is that common? > > How about a compile time "global" divisor so people can reduce it > even further ? > Rather than compile-time I made it a run-time setting by adding a twiddle_divisor variable to loader(8). r276079 and r276087. -- Ian