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)
Apr 26 2024, 9:11 PM
Unknown Object (File)
Apr 26 2024, 9:11 PM
Unknown Object (File)
Apr 26 2024, 9:11 PM
Unknown Object (File)
Apr 26 2024, 5:18 PM
Unknown Object (File)
Jan 12 2024, 2:56 AM
Unknown Object (File)
Dec 20 2023, 7:20 AM
Unknown Object (File)
Sep 21 2023, 10:25 PM
Unknown Object (File)
Sep 11 2023, 1:37 PM

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.