Skip to content

Conversation

@ryanolson
Copy link
Contributor

No description provided.

…Pool to InactivePool

- Add TinyLFU frequency sketch with Count-Min Sketch implementation
- Create FrequencyTracker trait with TinyLFUTracker and NoOpTracker implementations
- Add optional frequency tracking to BlockRegistry with touch() and count() methods
- Implement transfer_registration() for internal pool transfers without tracking
- Rename RegisteredPool to InactivePool to better reflect dormant block semantics
- Update all references across manager, registry, and test utilities

All 41 tests passing. Phase 1-3 complete for block manager v2 refactoring.
…ager

Replace constructor-based approach with fluent builder API:
- Add BlockManagerConfigBuilder with backend selection enum
- Support HashMap, LRU, and MultiLRU backend configurations
- Automatic LRU capacity sizing (equals block_count to prevent eviction)
- Custom MultiLRU frequency thresholds with validation
- Frequency tracker size validation (2^18 to 2^24, power of 2)
- Comprehensive test suite for all builder configurations

Provides clean API: BlockManager::builder().block_count(100).with_lru_backend().build()

Resolves ergonomic issues with previous new() and new_with_multi_lru() constructors.

Signed-off-by: Ryan Olson <[email protected]>
- Replace Mutex with parking_lot::RwLock in InactivePool and BlockRegistry
  for improved concurrent read performance
- Add #[inline] annotations to hot path methods including all drop
  implementations and registry lookups
- Pre-allocate vectors in bulk operations (match_blocks, allocate_blocks)
- Add comprehensive Criterion benchmarks for registration, lookup, drop,
  and allocation operations
- Fix clippy warnings: remove unused imports, add Default implementations,
  use modern Rust patterns (is_multiple_of, Result matching)

These optimizations address high variance in benchmarks and improve
contention in multi-threaded scenarios by allowing concurrent reads
while maintaining write safety.
@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants