Many parts of the FreeBSD kernel can be either:
(A) included in the kernel itself; or,
(B) built as a module loadable at runtime.
*How* to configure either choice is a well-documented topic. It is much more difficult to find guidance on which choice to make. When should a thing be compiled into the kernel? When should it be compiled as a module? Are there any best practices to follow?
For instance, should I:
- Compile everything the machine might ever need into the kernel, and don't build any modules?
- Compile the machine's everyday needs into the kernel, and build modules for occasional needs?
- Compile as minimal kernel as possible, and load everything else from modules?
Should I prefer to load modules in loader.conf, or via kldload?
To what extent will the system automatically load modules?
(My RTFM has discovered that the boot loader will load the acpi module automatically. The rc scripts will load pf, ipfw, and ipfilter automatically. A few of the geom commands will load their respective module if not loaded. As for other situations, it seems a manual process: the operator will need to invoke kldload prior to using the module's functionality.)
What's the direction FreeBSD is taking in the future with respect to this topic?
(A) included in the kernel itself; or,
(B) built as a module loadable at runtime.
*How* to configure either choice is a well-documented topic. It is much more difficult to find guidance on which choice to make. When should a thing be compiled into the kernel? When should it be compiled as a module? Are there any best practices to follow?
For instance, should I:
- Compile everything the machine might ever need into the kernel, and don't build any modules?
- Compile the machine's everyday needs into the kernel, and build modules for occasional needs?
- Compile as minimal kernel as possible, and load everything else from modules?
Should I prefer to load modules in loader.conf, or via kldload?
To what extent will the system automatically load modules?
(My RTFM has discovered that the boot loader will load the acpi module automatically. The rc scripts will load pf, ipfw, and ipfilter automatically. A few of the geom commands will load their respective module if not loaded. As for other situations, it seems a manual process: the operator will need to invoke kldload prior to using the module's functionality.)
What's the direction FreeBSD is taking in the future with respect to this topic?