Page MenuHomeFreeBSD

pseudofs: Microoptimize struct pfs_node
ClosedPublic

Authored by dchagin on Apr 1 2023, 3:17 PM.
Referenced Files
Unknown Object (File)
Tue, Oct 29, 9:49 AM
Unknown Object (File)
Sat, Oct 26, 8:37 AM
Unknown Object (File)
Wed, Oct 23, 11:43 PM
Unknown Object (File)
Wed, Oct 23, 5:55 PM
Unknown Object (File)
Sep 30 2024, 2:34 AM
Unknown Object (File)
Sep 22 2024, 6:26 AM
Unknown Object (File)
Sep 21 2024, 3:28 AM
Unknown Object (File)
Sep 20 2024, 9:21 AM
Subscribers

Details

Summary

Since 81167243b the size of struct pfs_node is 280 bytes, so the kernel
memory allocator takes memory from 384 bytes sized bucket. However, the
length of the node name is mostly short, e.g., for Linux emulation layer
it is up to 16 bytes. The size of struct pfs_node w/o pfs_name is 152
bytes, i.e., we have 104 bytes left to fit the node name into the 256
bytes-sized bucket.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 50715
Build 47606: arc lint + arc unit

Event Timeline

des requested changes to this revision.Apr 1 2023, 6:12 PM
des added inline comments.
sys/fs/pseudofs/pseudofs.c
75
77
78
84
88
This revision now requires changes to proceed.Apr 1 2023, 6:12 PM
This revision is now accepted and ready to land.Apr 1 2023, 9:56 PM
This revision was automatically updated to reflect the committed changes.