Skip to content

Check cache size and limit transitions in huge_cache_fuzz. - #969

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982900642
Draft

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982900642

Conversation

@copybara-service

Copy link
Copy Markdown

Check cache size and limit transitions in huge_cache_fuzz.

Snapshot size() and limit() around every operation. A Get must return exactly
n hugepages disjoint from every live range; a hit shrinks the cache by n and
leaves the limit alone, a miss leaves the cache alone and may only grow the
limit, and a failed Get changes neither. Release and ReleaseCachedPages may
only shrink the limit; with unback succeeding, Release leaves exactly
min(size + n, limit) cached and ReleaseCachedPages releases at least
min(n, size). Released pages always equal the drop in size(), and
ReleaseUnbacked bypasses the cache.

Snapshot size() and limit() around every operation. A Get must return exactly
n hugepages disjoint from every live range; a hit shrinks the cache by n and
leaves the limit alone, a miss leaves the cache alone and may only grow the
limit, and a failed Get changes neither. Release and ReleaseCachedPages may
only shrink the limit; with unback succeeding, Release leaves exactly
min(size + n, limit) cached and ReleaseCachedPages releases at least
min(n, size). Released pages always equal the drop in size(), and
ReleaseUnbacked bypasses the cache.

PiperOrigin-RevId: 982900642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant