svn commit: r367692 - head/sys/sys

Warner Losh imp at bsdimp.com
Tue Nov 17 22:37:54 UTC 2020


On Tue, Nov 17, 2020 at 3:18 PM John Baldwin <jhb at freebsd.org> wrote:

> On 11/14/20 2:34 PM, Warner Losh wrote:
> > true, but a version bump forces that and versions are cheap enough...
>
> Strictly speaking, version bumps don't force anything to recompile, they
> just ensure that newer modules won't load on older kernels.  In this case,
> the change to sys/ucred.h will result in sys/ucred.h's mtime changing so
> that any kernel modules being built via NO_CLEAN=yes will rebuild ok.
>
> I'm not quite sure where this mantra that version bumps force rebuilds
> came from, but they don't.  It's true that since it lives in <sys/param.h>
> and most things include that, it mostly forces a rebuild, but that's
> mostly a side effect, not due to explicit magic around __FreeBSD_version.
>

It's more that modules stop loading when there's a version bump. This is
both good and bad. It's good when there's a legit, KBI change that's likely
to affect modules. This one seems on the edge. ZFS is affected, but most
drivers are not.

It's bad when there's not really a problem since the last bump and you have
to rebuild your kernel + modules to be a matched set. For production, you
always want this, but sometimes you want to be able to run slightly newer
modules than the kernel and that's oftentimes OK because some bumps don't
affect KBI.

Warner


More information about the svn-src-head mailing list