Page MenuHomeFreeBSD

[concurrency_kit] turn this into a module!
Needs RevisionPublic

Authored by adrian on May 17 2017, 8:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 17 2024, 1:04 PM
Unknown Object (File)
Jan 8 2024, 7:17 AM
Unknown Object (File)
Jan 6 2024, 2:01 PM
Unknown Object (File)
Jan 6 2024, 2:01 PM
Unknown Object (File)
Jan 6 2024, 2:01 PM
Unknown Object (File)
Jan 6 2024, 1:48 PM
Unknown Object (File)
Dec 22 2023, 11:04 PM
Unknown Object (File)
Dec 21 2023, 11:25 AM

Details

Reviewers
cem
Summary

The only in-tree consumer currently looks like the linuxkpi.
This means it's included for all the non-linuxkpi platforms.

This saves a bit of kernel size on embedded platforms which
don't need it.

Diff Detail

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

Event Timeline

cem added a subscriber: cem.

LGTM other than questions below

sys/contrib/ck/ck_freebsd_kmod.c
34

jail??

38–52

what are the point of these?

This revision is now accepted and ready to land.May 18 2017, 12:50 AM
sys/contrib/ck/ck_freebsd_kmod.c
34

heh boilerplate!

38–52

placeholders in case people want to do any init/deinit stuff later. I just tend to boilerplate module stuff "just in case".

Except there are plans to use it elsewhere. Many areas may be improved using it.

Having it as a module would mean some devs might refrain from using it because
there is no waranty for it to be there

Areas like VFS and network stack could have a good benefice from using it.

Out of curiousity what size is saved?

In D10778#223458, @bapt wrote:

Except there are plans to use it elsewhere. Many areas may be improved using it.

Having it as a module would mean some devs might refrain from using it because
there is no waranty for it to be there

Areas like VFS and network stack could have a good benefice from using it.

Out of curiousity what size is saved?

40k on amd64. It looks like quite a bit more (~300k?) on mips, i'll dig later.

It's one of the death-by-a-thousand-cuts that makes it hard to squeeze into the low-cost IoT thingies being made, and I'm trying to arrest some of that growth.

If it gets used elsewhere then great. Right now it's just used in the linuxkpi layer and it only looks like it's being used for the RCU implementation.

kib added inline comments.
sys/contrib/ck/ck_freebsd_kmod.c
38–52

People who need init functions, should be capable of adding it themself.

43

SI_SUB_OPENSOLARIS.

sys/modules/concurrency_kit/Makefile
36

There seems to be an issue with space/tab on the line.

adrian edited edge metadata.

Update to take kib's feedback into account.

This revision now requires review to proceed.May 18 2017, 7:44 PM

I'd like to have some more in-depth detail on the size issue.

I have no real objection to this but agree with bapt about the signal it gives to other developers, so I'd want there to be an understanding it will go back to being standard when other consumers appear.

cem requested changes to this revision.May 30 2018, 5:30 PM

It's used in core kernel code now. To limit size damage, it may be possible to restrict what is built-in on smaller platforms (e.g., do we need anything other than epoch support code?). But I think a module is no longer a useful option, since it will need to be loaded everywhere.

This revision now requires changes to proceed.May 30 2018, 5:30 PM