From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 18 17:13:37 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D3A816A401 for ; Wed, 18 Jul 2007 17:13:37 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.179]) by mx1.freebsd.org (Postfix) with ESMTP id A788813C471 for ; Wed, 18 Jul 2007 17:13:36 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so295241ika for ; Wed, 18 Jul 2007 10:13:35 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=hjvNgo1B9XsmXto7UyUSXtJSmOKKVpFSGCzg4HgwY5kIHPDseApveji82gnLUl4Ugd97vx5fLczVD0St7bVbkAp0C0xoN+8Gmzuliuc1f2gufEwN/2I+3L6Ixci3FjaDUK7iMLg0O2i797DIDNeb8MHmFs9WIwpQlgedKLwC6K8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=HD7hfJ962Z6uXhJK4p6pts/N07fQyJ011i0fXhlHq6XbPj09vFxfPkZmG1SnaNHrlkYvz7YLoOVb2G86Z4aKQOi27+2t+MzDoRadwOgBcsxoyHqSsf/e2EotinYtbZq7BZFkjwy0Vn3MDWhQCBQx8geDRaeazJQoFPOGPWkxsHE= Received: by 10.86.58.3 with SMTP id g3mr1269125fga.1184778815252; Wed, 18 Jul 2007 10:13:35 -0700 (PDT) Received: from roadrunner.q.local ( [85.180.173.101]) by mx.google.com with ESMTPS id g8sm3555248muf.2007.07.18.10.13.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2007 10:13:34 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.14.1/8.14.1) with ESMTP id l6IHDST3002474; Wed, 18 Jul 2007 19:13:28 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.14.1/8.14.1/Submit) id l6IHDSHg002473; Wed, 18 Jul 2007 19:13:28 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Wed, 18 Jul 2007 19:13:28 +0200 From: Ulrich Spoerlein To: Matthew Dillon Message-ID: <20070718171328.GA1413@roadrunner.q.local> Mail-Followup-To: Matthew Dillon , Tim Kientzle , hackers@freebsd.org References: <46992FFF.7010906@kientzle.com> <20070714223853.GF16579@britannica.bec.de> <469992CA.6000104@freebsd.org> <4699BE75.2090808@freebsd.org> <20070715184703.GK2819@roadrunner.q.local> <469A8F91.7090509@freebsd.org> <7ad7ddd90707152356v6034352uf1f7a42ddb9c1166@mail.gmail.com> <469B8EF2.3010002@freebsd.org> <200707172000.l6HK0KeS041974@apollo.backplane.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707172000.l6HK0KeS041974@apollo.backplane.com> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: hackers@freebsd.org, Tim Kientzle Subject: Re: Tar output mode for installworld 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: Wed, 18 Jul 2007 17:13:37 -0000 On Tue, 17.07.2007 at 13:00:20 -0700, Matthew Dillon wrote: > Probably the best way to do this is to pre-cache the data with an > /etc/rc.d script. Write a little program to do it or build it as a > script. Inode numbers for files on a CD tend to reflect the location That is an interesting project in itself. This could be used to speed up the boot process on any FreeBSD installation and I think MacOS' new init system is where I got the idea from. What I envisioned (quick n dirty): - Init runs rc inside a ktrace session - after the rc scripts have finished, you turn off ktrace - kdump and read all files which were read during rc[2] - do some magic to sort the list based on their hard disk location - put this list in /var/db/precache.db - /etc/rc.d/precache (which will run very early[1]): (for file; cat $file >/dev/null)&; sleep 3 yes, it will be run in the background Problems with this naive approach: It reads entire files, not blocks. The filelist has to be kept small and only "small" files should appear in the list. With direct kernel support one could do a lot more, I guess. I'm running on a fast laptop with a crappy 4800RPM hard disk which is dog slow. I have the feeling my bootup time could be reduced drastically by this approach. Perhaps some day I get around to prototyping it. [1] I know this is hard to decide. [2] To make this self-tuning, the output of the precache script must not appear in the ktrace/kdump list. Cheers, Ulrich Spoerlein -- "The trouble with the dictionary is you have to know how the word is spelled before you can look it up to see how it is spelled." -- Will Cuppy