From nobody Sat Jun 04 22:32:45 2022 X-Original-To: doc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 398871BE81A2 for ; Sat, 4 Jun 2022 22:32:48 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from mail.gundo.com (gibson.gundo.com [75.145.166.65]) by mx1.freebsd.org (Postfix) with ESMTP id 4LFvdp741zz4q9p; Sat, 4 Jun 2022 22:32:46 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from webmail.gundo.com (variax.gundo.com [75.145.166.70]) by mail.gundo.com (Postfix) with ESMTP id C51D14C12DD; Sat, 4 Jun 2022 17:32:45 -0500 (CDT) List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@freebsd.org MIME-Version: 1.0 Date: Sat, 04 Jun 2022 22:32:45 +0000 From: Pau Amma To: "Bjoern A. Zeeb" Cc: Doc Subject: Re: Revisiting the section 4 manual pages loader.conf boilerplate language? In-Reply-To: References: <95c6f79ad1950273013b14ae995d1c1a@gundo.com> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <3eb2692dc7ec8187c354866d92441277@gundo.com> X-Sender: pauamma@gundo.com Organization: The Cabal (TINC) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4LFvdp741zz4q9p X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=gundo.com; spf=pass (mx1.freebsd.org: domain of pauamma@gundo.com designates 75.145.166.65 as permitted sender) smtp.mailfrom=pauamma@gundo.com X-Spamd-Result: default: False [-2.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[pauamma]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[75.145.166.65:from]; R_SPF_ALLOW(-0.20)[+ip4:75.145.166.64/28:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[75.145.166.65:from]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gundo.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[doc]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7922, ipnet:75.144.0.0/13, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N 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)