From owner-freebsd-current@FreeBSD.ORG Mon Dec 22 15:16: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 C73C7AE5; Mon, 22 Dec 2014 15:16:01 +0000 (UTC) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABFAA17; Mon, 22 Dec 2014 15:16:01 +0000 (UTC) Received: from critter.freebsd.dk (unknown [192.168.60.3]) by phk.freebsd.dk (Postfix) with ESMTP id B32B73B9D8; Mon, 22 Dec 2014 15:15:53 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.9/8.14.9) with ESMTP id sBMFFqem022182; Mon, 22 Dec 2014 15:15:53 GMT (envelope-from phk@phk.freebsd.dk) To: Ian Lepore Subject: Re: simple task to speed up booting In-reply-to: <1419224743.1018.108.camel@freebsd.org> From: "Poul-Henning Kamp" References: <43445.1418553160@critter.freebsd.dk> <1419224743.1018.108.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22180.1419261352.1@critter.freebsd.dk> Date: Mon, 22 Dec 2014 15:15:52 +0000 Message-ID: <22181.1419261352@critter.freebsd.dk> 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 15:16:01 -0000 -------- 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. >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 ? But even without that: Please commit -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.