On Sat, Nov 29, 2025 at 06:33:22PM +0100, Mateusz Guzik wrote: > This makes sizeof struct filename 152 bytes. At the same time because > of the SLAB_HWCACHE_ALIGN flag, the obj is going to take 192 bytes. > > I don't know what would be the nice way to handle this in Linux, but > as is this is just failing to take advantage of memory which is going > to get allocated anyway. > > Perhaps the macro could be bumped to 168 and the size checked with a > static assert on 64 bit platforms?
Could be done, even though I wonder how much would that really save. > Or some magic based on reported > cache line size. No comments. At least, none suitable for polite company. BTW, one thing that might make sense is storing the name length in there...
