Page MenuHomeFreeBSD

Don't define KLD_MODULE when build module with kernel
Needs ReviewPublic

Authored by howard0su_gmail.com on Apr 19 2016, 3:08 PM.
Tags
None
Referenced Files
F106231869: D6001.diff
Fri, Dec 27, 2:55 PM
Unknown Object (File)
Nov 25 2024, 12:29 PM
Unknown Object (File)
Oct 2 2024, 3:23 AM
Unknown Object (File)
Sep 30 2024, 7:01 PM
Unknown Object (File)
Sep 16 2024, 4:35 PM
Unknown Object (File)
Sep 13 2024, 4:25 PM
Unknown Object (File)
Sep 12 2024, 7:32 AM
Unknown Object (File)
Aug 13 2024, 12:50 AM
Subscribers

Details

Reviewers
jhb
Summary

This remove the extra overhead when defining KLD_MODULE. The
performance gains from inline atomic(9) and mutex(9) functions.
However the modules built with kernel is not supposed to be used
with other kernel. In practical, this is unlikely happen.

The behavior of building a module standalone is not changed. This
maintain the compactibility for the out-of-tree modules as before.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3321
Build 3356: arc lint + arc unit

Event Timeline

howard0su_gmail.com retitled this revision from to Don't define KLD_MODULE when build module with kernel.
howard0su_gmail.com updated this object.
howard0su_gmail.com edited the test plan for this revision. (Show Details)
howard0su_gmail.com added a reviewer: jhb.

I tried a variant of this recently and it actually broke several things as there are some places that use KLD_MODULE for behavior that needs to be different even for modules tied to the kernel. I will perhaps add a new KLD_GENERIC_MODULE and replace some of the KLD_MODULE tests with that instead.