Page MenuHomeFreeBSD

cache: avoid hardcoded CACHE_PATH_CUTOFF
ClosedPublic

Authored by brooks on Tue, Jan 6, 9:32 AM.
Tags
None
Referenced Files
F143992872: D54554.id169321.diff
Tue, Feb 3, 2:09 AM
Unknown Object (File)
Wed, Jan 28, 11:28 PM
Unknown Object (File)
Thu, Jan 22, 5:39 PM
Unknown Object (File)
Thu, Jan 22, 5:31 PM
Unknown Object (File)
Thu, Jan 22, 5:01 PM
Unknown Object (File)
Mon, Jan 19, 2:45 PM
Unknown Object (File)
Mon, Jan 19, 2:04 PM
Unknown Object (File)
Sat, Jan 17, 1:27 PM
Subscribers

Details

Summary

Compute the cutoff at compile time instead which will avoid the need
for a CHERI case.

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

Looks ok to me otherwise.

sys/kern/vfs_cache.c
409–418

This comment is a bit confusing now. You might list the actual values for CACHE_PATH_CUTOFF here.

Update the CACHE_PATH_CUTOFF comment adding more context and values.

markj added inline comments.
sys/kern/vfs_cache.c
410
This revision is now accepted and ready to land.Thu, Jan 8, 2:17 PM
sys/kern/vfs_cache.c
409–418

An initial value of 39 cannot be bumped later into 39, something is inconsistent here.

Some digging shows that there was no such cutoff as the existing one in the 4.4 BSD import in the sense that only names shorter than 31 chars were cached, the others were not. 39 appeared after several bumps, and after introduction of the small/large split (and caching of all names).

I'd suggest eliding all but recent history, since that part seems wrong.

brooks edited the summary of this revision. (Show Details)

Fix up comment removing errors

This revision now requires review to proceed.Fri, Jan 9, 9:39 AM
This revision is now accepted and ready to land.Fri, Jan 9, 2:16 PM
This revision was automatically updated to reflect the committed changes.