NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/60607: /etc/rc does too much throw-away work and is needlessly slow on constrained systems



The following reply was made to PR bin/60607; it has been noted by GNATS.

From: Jason Thorpe <thorpej%me.com@localhost>
To: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Cc: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%NetBSD.org@localhost>,
 "netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%NetBSD.org@localhost>
Subject: Re: bin/60607: /etc/rc does too much throw-away work and is
 needlessly slow on constrained systems
Date: Mon, 17 Aug 2026 18:28:57 -0700

 > On Aug 17, 2026, at 6:42=E2=80=AFAM, Jason Thorpe <thorpej%me.com@localhost> =
 wrote:
 >=20
 > The cache can=E2=80=99t live on /var because /var might not be =
 available when the cache is required (this would especially be the case =
 for read-only roots).  The only path that=E2=80=99s currently guaranteed =
 to be available when /etc/rc starts processing the rc.d scripts is /etc. =
  It=E2=80=99s pretty straightforward to suppress any error messages that =
 might occur when writing out the cache (which happens as the last step =
 of the boot process).  And, yes, I can refactor the code that builds and =
 writes out the cache into rc.subr so that there can be a =E2=80=9Cnostart=E2=
 =80=9D rc.d script to rebuild it for those who wish to do that before =
 the next reboot.
 
 Updated patch: https://www.netbsd.org/~thorpej/rcorder-cache-diff-v2.txt
 
 Also ran it on my AlphaStation 200 4/233.  Even with a few heavy hitters =
 in the boot of that machine (ntpd wiring itself, sshd, fontconfig cache, =
 IPv6 DAD, etc.) that consume most of the time, it still managed to save =
 20 seconds, reducing =E2=80=9Cdate-to-date=E2=80=9D boot time from 2min =
 20sec to 2min flat.
 
 -- thorpej
 



Home | Main Index | Thread Index | Old Index