tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Modular raidframe



On Sun, 20 Dec 2015, Michael van Elst wrote:

paul%whooppee.com@localhost (Paul Goyette) writes:

The attached diffs (plus 2 new files) convert our existing raidframe
driver into a loadable module.

Does this still work with a non-MODULAR kernel?


Short answer: Yes

More details:

Whether or not a kernel is built with "options MODULAR", it still contains modules. The only thing that the option controls is whether or not the in-kernel linker is included. Code that has been modularized is included as a built-in module (and initialized as such) regardless of the option.

So the classes of kernels are:

non-MODULAR - "no options MODULAR"

	These kernels have a static configuration, defined at build
	time.  They cannot be extended at boot- or run-time since
	there is no linker included.  Built-in modules are still
	treated as modules, initialized by module_init() (called from
	init_main()), etc.  And built-in modules can still be disabled
	with the modunload(8) command.

MODULAR - "option MODULAR"

	These kernels include an in-kernel linker which can be used
	to add additional code at run-time.  Typical GENERIC kernels
	generally fall into this class, even though nearly everything
	is already linked in at build time.  On -current amd64, we
	include almost 150 built-in modules.

I like to think that I run a kernel from a third class:

HIGHLY-MODULAR

	These kernels include only a minimum amount of built-in code,
	and any additional functionality is loaded as needed.  I have
	fewer than 20 built-in modules, and generally run with only
	40 modules total (the difference being loaded dynamically).



+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index