Page MenuHomeFreeBSD

Use a STAILQ instead of a TAILQ to shrink the bucket size by one pointer.
ClosedPublic

Authored by jeff on Feb 3 2020, 9:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 11:44 PM
Unknown Object (File)
Sun, Apr 28, 5:56 AM
Unknown Object (File)
Sat, Apr 27, 11:56 PM
Unknown Object (File)
Sat, Apr 27, 1:49 PM
Unknown Object (File)
Mar 19 2024, 2:08 PM
Unknown Object (File)
Feb 6 2024, 9:56 AM
Unknown Object (File)
Dec 22 2023, 11:37 PM
Unknown Object (File)
Dec 20 2023, 8:55 AM

Details

Summary

It's a little silly this wasn't done already. There is no case where we delete from the middle of a list.

This also makes the change to always insert at the tail of the bucket list. If the items in the bucket are cache hot on a remote CPU it can be slower than if they are cache cold. This optimization will depend on how big your CPU is. Smaller systems are more likely to have shared caches encompassing all cores. I would argue that allocator perf is more important on large systems.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jeff added reviewers: rlibby, markj.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.

I'm annoyed that this never occurred to me. :(

It would also fix the bug I fixed this morning.

This revision is now accepted and ready to land.Feb 3 2020, 10:54 PM

I think this just broke make world because libmemstat needs to be updated for this.