Re: Tar output mode for installworld

看板FB_hackers作者時間18年前 (2007/07/24 11:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串23/23 (看更多)
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 _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16fMoM00 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #16fMoM00 (FB_hackers)