Page MenuHomeFreeBSD

struct sysinit: Add SLIST_ENTRY(sysinit) next
ClosedPublic

Authored by cperciva on Jul 19 2023, 12:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 7 2024, 4:49 AM
Unknown Object (File)
Oct 3 2024, 7:32 PM
Unknown Object (File)
Oct 2 2024, 1:47 PM
Unknown Object (File)
Oct 2 2024, 12:05 PM
Unknown Object (File)
Oct 1 2024, 3:07 AM
Unknown Object (File)
Sep 27 2024, 6:07 PM
Unknown Object (File)
Sep 25 2024, 6:31 PM
Unknown Object (File)
Sep 23 2024, 2:38 AM

Details

Summary

This will be used to put SYSINITs onto a linked list.

Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Any reason for putting it in the middle vs the end? I guess the assumption is that to the extent any performance matters at all you are only going to read func and ident once, but the others you will read multiple times while sorting?

This revision is now accepted and ready to land.Jul 19 2023, 5:31 PM
In D41074#935722, @jhb wrote:

Any reason for putting it in the middle vs the end?

I wondered the same thing, even if in practice it makes little difference here.

In D41074#935722, @jhb wrote:

Any reason for putting it in the middle vs the end? I guess the assumption is that to the extent any performance matters at all you are only going to read func and ident once, but the others you will read multiple times while sorting?

Yeah, I was thinking in terms of having the subsystem/order/next fields in the same cache line. Although on most CPUs the entire structure probably fits in one cache line now, so maybe it didn't accomplish anything.

This will need a __FreeBSD_version bump as this is module KBI, right?

This will need a __FreeBSD_version bump as this is module KBI, right?

Good question. I don't know what the policy is, but yeah bad things will happen if we try to load a module with a different struct sysinit layout. I'll bump __FreeBSD_version.