Re: filemon

From: Warner Losh <imp_at_bsdimp.com>
Date: Wed, 31 Jul 2024 04:02:37 UTC
On Tue, Jul 30, 2024, 12:54 PM Dag-Erling Smørgrav <des@freebsd.org> wrote:

> Miroslav Lachman <000.fbsd@quip.cz> writes:
> > I'm a bit confused. If I understand it right, you say loader.conf
> > causes less memory fragmentation, but DES said "it still increases low
> > memory fragmentation". So what is true? And is this something to watch
> > out for, or is memory fragmentation not such a big deal?
>
> I used the wrong term.  The loader loads the kernel and modules into a
> particular region of memory, while modules loaded after boot can go
> anywhere.  Furthermore, modules loaded by the loader cannot be unloaded.
> So loading modules pre-boot does not increase fragmentation, but it uses
> up memory from a much more limited pool than loading them later.
>

Yea. The lower memory addresses used to matter a lot. Now, we don't have
floppies or devices that care <256MB. Some can only do DMA to < 4GB. So
unless you have a huge RAM dusk compiled in, you're not going to
meaningfully depleate the under 4GB.  And we don't treat that memory as
special for allocation so the modules loaded after boot could also wind up
there....

So it used to matter a lot. Now it's marginally relevant at best.

Warner

DES
> --
> Dag-Erling Smørgrav - des@FreeBSD.org
>