Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2011 04:56:49 -0400
From:      Jason Hellenthal <jhell@DataIX.net>
To:        Doug Barton <dougb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: rc.d script to load kernel modules
Message-ID:  <20110612085649.GA11503@DataIX.net>
In-Reply-To: <4DF3E98B.40108@FreeBSD.org>
References:  <4DF3E98B.40108@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--zYM0uCDKw75PZbzx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


On Sat, Jun 11, 2011 at 03:17:47PM -0700, Doug Barton wrote:
> Howdy,
>=20
> Per discussion on -arch and the svn list about improving boot time and=20
> stripping down the kernel to just that-which-cannot-be-modularized I=20
> created the attached script to kldload modules that don't need to be in=
=20
> loader.conf. It cut quite a bit of time off my boot, so hopefully it=20
> will be useful to others as well.
>=20
> To use it just put everything that is being _load'ed in loader.conf into=
=20
> kld_list in rc.conf[.local]. For example, mine has:
>=20
> kld_list=3D'umass coretemp ichwd linux nvidia if_wpi'
>=20
> If there is agreement that this is a good direction to go I'll be happy=
=20
> to commit this along with the relevant /etc/defaults/rc.conf and=20
> rc.conf.5 changes.
>=20

umass for one I could see how it would speed up your boot since you
would not have to probe for USB devices to possibly mount root from but
not a big show stopper for those who don't need that so this would come
in handy in that case but could also be handled by devd more elequently.

coretemp ichwd linux nvidia if_wpi: I can't really see how this would
speed up booting at all since the same initialization is going to be
done after root is mounted or before root is mounted. Whats the
difference here ?


Cutting modules out of the kernel in general does help speed up booting
but loading those same modules later in the boot process will just lead
you back to the same boot time. So all in all this would be just
subverting what loader.conf already does quite nicely... just loads.


Is there some other motivation besides boot times ? that is inspiring
the move from loader.conf to rc.onf[.local] ?

And then sticking to the semantics of the rest of the rc system not to
put a color on this but [following].
kldload_enable=3D"YES"
kldload_list=3D"mod1 mod2 mod3 mod4 mod5"
kldload_flags=3D""

Seems to make sense if it has to happen. *shrug*

--zYM0uCDKw75PZbzx
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
Comment: http://bit.ly/0x89D8547E

iQEcBAEBAgAGBQJN9H9RAAoJEJBXh4mJ2FR+vhgH/2TfJYkonF1HPSBCHji29YfY
/AKB+AwzLUUwhu1HhoDKX53VcUs7+ERySQ6RqPIOY2T/4po/KLXdkQXpWsxSHVKe
H8KJnQdGXQ55XR4IvhRWrlR9q+Odd+yz141GWZYU1pparNX/BNSczEM37kB9cpUX
BOhcSUACuPYaGaGQNhHbYMgbCOIy9W6iDOMRsjiQyvC0JBqnHW8RlYHNS1TYxViN
19wW0My48acojY+850XrKsUvEQ3GpKvxdmPvYvFCDdLhohLwkKFVSk37WEF7O7jq
x5ECGPkHdIZFkG/2Qi4h3EQO1fSl653Of4vXW8bjHa8IP0WAS5fCuSCudvHvxnE=
=takR
-----END PGP SIGNATURE-----

--zYM0uCDKw75PZbzx--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110612085649.GA11503>