mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #345] [MERGED] feat(overlaybd): add runtime cache limits and mmap-aware eviction #366
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#366
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/345
Author: @huang-jl
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @yingdi-shan
Base:
main← Head:hjl/cache-mmap-limits📝 Commits (4)
fb9faa9feat(overlaybd): allow runtime cache capacity updates302482efeat(overlaybd): track cache mmap usage80f7abefeat(overlaybd): evict idle cache on mmap pressurebe159bbfeat(overlaybd): add file cache tracing📊 Changes
6 files changed (+1111 additions, -86 deletions)
View changed files
📝
storage/overlaybd/src/backend/cache/full_file_cache/cache_entry.rs(+45 -3)📝
storage/overlaybd/src/backend/cache/full_file_cache/cache_pool.rs(+372 -73)📝
storage/overlaybd/src/backend/cache/full_file_cache/cache_store.rs(+14 -9)📝
storage/overlaybd/src/backend/cache/mod.rs(+1 -0)📝
storage/overlaybd/src/backend/cache/tests.rs(+567 -0)📝
storage/util/src/mmap_region.rs(+112 -1)📄 Description
What
MMapRegion::on_unmap, decrementing it only after successful unmapping.Why
Sparse cache files map their full logical size, while disk capacity accounting only counts populated cache blocks. Virtual address usage can therefore grow until
mmapfails withENOMEM, even when the cache is still below its disk limit.An independent mmap limit allows GC to reclaim idle mappings before address-space pressure becomes critical. Runtime capacity updates allow tuning without restarting the backend.
Design and behavior changes
Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketarget🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.