Re: filemon

From: Warner Losh <imp_at_bsdimp.com>
Date: Tue, 30 Jul 2024 14:30:24 UTC
On Tue, Jul 30, 2024, 3:39 AM Miroslav Lachman <000.fbsd@quip.cz> wrote:

> On 30/07/2024 11:10, Dag-Erling Smørgrav wrote:
> > Gary Jennejohn <garyj@gmx.de> writes:
>
> [..]
>
> >> I also load it from /boot/loader.conf using filemon_load="YES"
> >
> > This does cause the module to be loaded at boot time, but it's slower
> > than loading it later, and it increases memory fragmentation.  A better
> > option is to include "filemon" in the kld_list variable in /etc/rc.conf
> > or /etc/rc.conf.d/kld.  For instance,
> >
> >      % cat /etc/rc.conf.d/kld/filemon
> >      kld_list="${kld_list} filemon"
>
> Does this also apply today? I recently read from someone on a mailing
> list that the kld_list in rc.conf is no longer needed, that any problems
> it used to solve are solved, and that the preferred way is to load
> everything from loader.conf. So I'm curious, what's the right thing to
> do then? (I load most of my modules from rc.conf)
>

Either or for filemon. Either rc.conf's kld_list or loader.conf's
filemon_load=YES. I've been recommending loader.conf since there's slightly
less memory fragmentation, but even that effect is small. Only drm kmod has
to be in kld_list.

The performance advantage of the former is no longer there (for UEFI
systems) or is very hard to measure on all but super fringe machines (for
BIOS). Net booting would favor kld_list though.

Warner

Kind regards
> Miroslav Lachman
>
>
>
>