Repository navigation
Batch native filesystem metadata within each syscall - #634
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native filesystem calls currently turn each path component into a separate remote lookup. Batch eligible metadata requests within their original syscall using the existing File.Walk operation. The kernel still executes each syscall; exact syscall epochs and actual FUSE parent/node identities prevent reuse across operations. This remains inside the common View/File adapter, with no Harness branches, new executor, remote protocol or setting.
Use cilium/ebpf for a shared, bounded Linux amd64 scope observer. If BPF is unavailable, the same ordinary FUSE mapping remains functional. Preserve handle checks, permissions and pinned mount topology. Return unused Walk references through existing cleanup, and detach all kernel programs when the last View closes.
Measured unchanged native Claude fixture at 100 ms injected File latency: Bash 41.909→25.333 seconds, Read 12.229→5.672 seconds; final counts 278/61 File operations. The complete earlier same-binary 0/5/100 ms matrix also passed. This does not eliminate residual high-latency metadata cost. Host-wide early filtering costs approximately 67 ns per unregistered syscall in the local alternating benchmark while at least one scoped View exists; the optimization currently supports amd64 only. No additional capability beyond the existing deployment set is required.
Validation: independent fresh review found no P0–P2 issues; focused Go tests/race/vet, real FUSE/POSIX/lock tests, shared-loader/LRU/epoch/reference cleanup tests, and native file verification/shutdown passed. Explicit BPF denial preserved the baseline native behavior and complete File operation counts. Final targeted native 100 ms rerun passed after lifecycle cleanup. Linux arm64 and Darwin arm64 package builds passed; the real microsandbox helper Makefile target passed with
-mod=readonly. Rebase onto 3eeb64d was patch-equivalent. Live qualification remains pending integration.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.