Page MenuHomeFreeBSD

cache: avoid hardcoded cache padding
ClosedPublic

Authored by brooks on Tue, Jan 6, 9:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 17, 8:24 PM
Unknown Object (File)
Mon, Jan 12, 8:13 PM
Unknown Object (File)
Mon, Jan 12, 2:37 AM
Unknown Object (File)
Sat, Jan 10, 3:44 PM
Unknown Object (File)
Sat, Jan 10, 3:15 PM
Unknown Object (File)
Sat, Jan 10, 5:24 AM
Unknown Object (File)
Fri, Jan 9, 11:38 PM
Unknown Object (File)
Fri, Jan 9, 6:49 PM
Subscribers

Details

Summary

Replace CACHE_LARGE_PAD with rounding up to the alignment of struct
namecache_ts.

No functional change.

Suggested by: jhb
Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks requested review of this revision.Tue, Jan 6, 9:32 AM
This revision is now accepted and ready to land.Tue, Jan 6, 3:09 PM

I fail to see any usefulness of CACHE_LARGE_PAD when it was introduced, which corresponds to aligning CACHE_ZONE_LARGE_SIZE to struct namecache_ts. So I'd just drop the corresponding roundup2(), with the benefit of not requiring a struct namecache_ts alignment for CACHE_ZONE_LARGE_SIZE (but then you have to change the corresponding static assertion).

I fail to see any usefulness of CACHE_LARGE_PAD when it was introduced, which corresponds to aligning CACHE_ZONE_LARGE_SIZE to struct namecache_ts. So I'd just drop the corresponding roundup2(), with the benefit of not requiring a struct namecache_ts alignment for CACHE_ZONE_LARGE_SIZE (but then you have to change the corresponding static assertion).

I'm also skeptical (and think both SMALL_SIZE and LARGE_SIZE are over aligned on e.g., armv7), but I'm wary of making functional changes here.

I'm also skeptical (and think both SMALL_SIZE and LARGE_SIZE are over aligned on e.g., armv7), but I'm wary of making functional changes here.

Agreed. If we attempt some such change, it would be more prudent to do it in another revision. I might try to do it, if you don't plan more changes in the area.

This revision was automatically updated to reflect the committed changes.