Page MenuHomeFreeBSD

pseudofs: Microoptimize struct pfs_node
ClosedPublic

Authored by dchagin on Apr 1 2023, 3:17 PM.
Referenced Files
Unknown Object (File)
Sun, May 12, 11:09 AM
Unknown Object (File)
Wed, May 8, 11:51 PM
Unknown Object (File)
Wed, May 8, 11:51 PM
Unknown Object (File)
Wed, May 8, 11:51 PM
Unknown Object (File)
Wed, May 8, 1:14 AM
Unknown Object (File)
Sat, May 4, 5:55 AM
Unknown Object (File)
Mon, Apr 29, 8:13 AM
Unknown Object (File)
Feb 23 2024, 7:09 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 Not Applicable
Unit
Tests Not Applicable

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
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.