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
Unknown Object (File)
Sat, Apr 13, 10:39 PM
Unknown Object (File)
Feb 21 2024, 6:56 AM
Unknown Object (File)
Feb 18 2024, 5:23 PM
Unknown Object (File)
Jan 22 2024, 3:02 AM
Unknown Object (File)
Dec 23 2023, 5:57 AM
Unknown Object (File)
Dec 3 2023, 12:46 AM
Unknown Object (File)
Nov 13 2023, 12:27 PM
Unknown Object (File)
Nov 11 2023, 5:32 PM
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.