Re: rc.d script to load kernel modules

From: Eir Nym <eirnym_at_gmail.com>
Date: Mon, 13 Jun 2011 06:58:39 +0000
On 13 June 2011 06:32, Garrett Cooper <yanegomi_at_gmail.com> wrote:
> On Sun, Jun 12, 2011 at 11:11 PM, Eir Nym <eirnym_at_gmail.com> wrote:
>> On 11 June 2011 22:17, Doug Barton <dougb_at_freebsd.org> wrote:
>>> Howdy,
>>>
>>> Per discussion on -arch and the svn list about improving boot time and
>>> stripping down the kernel to just that-which-cannot-be-modularized I created
>>> the attached script to kldload modules that don't need to be in loader.conf.
>>> It cut quite a bit of time off my boot, so hopefully it will be useful to
>>> others as well.
>>>
>>> To use it just put everything that is being _load'ed in loader.conf into
>>> kld_list in rc.conf[.local]. For example, mine has:
>>>
>>> kld_list='umass coretemp ichwd linux nvidia if_wpi'
>>>
>>> If there is agreement that this is a good direction to go I'll be happy to
>>> commit this along with the relevant /etc/defaults/rc.conf and rc.conf.5
>>> changes.
>>>
>>
>> How do you would suggest set tunables, which are readonly or have no
>> sysctl(8) equivalent after boot-time? AFAIK loader can't set tunable
>> if module is not loaded at boot-time.
>
>    Not true. Kernel tunables are really not that different (in
> concept) from kernel-level environment variables. Certainly, they
> would have less value if one's loading modules at boot (depending when
> things are done -- i.e. how closely the sysctl pseudo service is run
> to the proposed kld pseudo service), but sysctls can't be set until
> the module (or respective OID leaf) has been created by the kernel
> (somehow, i.e. via driver initialization, etc).
> Thanks,
> -Garrett
>
I see,

 I use tunables and it will be great if I can add tunables for module
while load them from user space with rc(8).
Received on Mon Jun 13 2011 - 04:59:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:14 UTC