Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Jun 2022 22:32:45 +0000
From:      Pau Amma <pauamma@gundo.com>
To:        "Bjoern A. Zeeb" <bz@freebsd.org>
Cc:        Doc <doc@freebsd.org>
Subject:   Re: Revisiting the section 4 manual pages loader.conf boilerplate language?
Message-ID:  <3eb2692dc7ec8187c354866d92441277@gundo.com>
In-Reply-To: <alpine.BSF.2.00.2206040703550.68830@ai.fobar.qr>
References:  <95c6f79ad1950273013b14ae995d1c1a@gundo.com> <alpine.BSF.2.00.2206040703550.68830@ai.fobar.qr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2022-06-04 07:18, Bjoern A. Zeeb wrote:
> On Fri, 3 Jun 2022, Pau Amma wrote:
>> Currently, 3 section 4 manual pages say to use kld_list in rc.conf for 
>> loading: acpi_video(4), iwlwifi(4), and rtw88(4). Contrasting this 
>> with 367 following share/examples/mdoc/example.4's lead and 
>> instructing to use loader(8)-time loading, the current approach 
>> appears to be: loader(8)-time unless it needs rc(8)-time loading 
>> (explicitly discouraged for iwlwifi(4) and rtw88(4), which say to rely 
>> on devmatch(8) if at all possible). However, this may not be the best 
>> idea, considering:
>> 
>> rc.conf(5):
>> 
>>     kld_list    (str) A list of kernel modules to load right after the 
>> local
>>                 disks are mounted.  Loading modules at this point in 
>> the boot
>>                 process is much faster than doing it via 
>> /boot/loader.conf
>>                 for those modules not necessary for mounting local 
>> disk.
>> 
>> devmatch(8) itself, as already mentioned, which aims to make explicit 
>> loading (either way) unnecessary in most cases;
>> 
>> several Freenode^WLibera #freebsd discussions, in at least one of 
>> which kevans stated that rc(8) loading was much safer, especially for 
>> large modules or drivers.
> 
> What was the cause for that assumption?  I assume that both just run 
> kldload.

Safer than loader, I mean, not safer than devmatch.

>> So I think the default suggestion should be changed from loader.conf 
>> to rc.conf, or maybe to; devmatch preferred, or rc.conf if not an 
>> option.
>> 
>> Thoughts?
> 
> The problem is more tricky.  Not all drivers do provide data for
> devmatch to work yet.
> 
> Also some drivers do want to be loaded from loader and not later as
> they might be essential for booting to multi-user.

I know *eyes the ZFS-on-root laptop he's writing this on* but how many 
are there in that category?

> I am generally tempted to remove the boiler plate from almost all man
> pages (once the driver supports devmatch) and have a separate man page
> to point at for how (many ways) to load a driver, possibly along (if it
> needs special requirements) a suggested hint of which way to use.

That would work as well, but as long as we're going to refactor the 
how-to-load language (I hadn't considered doing that, but I agree it's a 
good idea), why not start doing that now saying "use kld_list unless 
that host really needs the driver before loading and starting the 
kernel, in which case use loader.conf) and just change that one manual 
page when enough drivers are devmatch-aware?

-- 
#BlackLivesMatter #TransWomenAreWomen #AccessibilityMatters 
#StandWithUkrainians
English: he/him/his (singular they/them/their/theirs OK)
French: il/le/lui (iel/iel and ielle/ielle OK)
Tagalog: siya/niya/kaniya (please avoid sila/nila/kanila)




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