Phase 1: Warm Pool Capacity Increase (16 → 12 with matching threshold)

Key Changes:
- Reduced static capacity from 16 to 12 SuperSlabs per class
- Fixed prefill threshold from hardcoded 4 to match capacity (12)
- Updated environment variable clamping to [1,12]
- This allows warm pool to actually utilize its full capacity

Performance:
- Baseline (post-unified-cache-opt): 4.76M ops/s
- After Phase 1: 4.84M ops/s
- Improvement: +1.6% (expected +15-20%)

Note: Actual improvement lower than expected because the warm pool
bottleneck is only part of the overall allocation path. Unified cache
optimization (+14.9%) already addressed much of the registry scan overhead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm (CI)
2025-12-05 12:16:39 +09:00
parent a04e3ba0e9
commit 141b121e9c
3 changed files with 9 additions and 8 deletions

View File

@ -83,7 +83,8 @@ sp_acquire_from_empty_scan(int class_idx, SuperSlab** ss_out, int* slab_idx_out,
// WARM POOL PREFILL: Add HOT SuperSlabs to warm pool (if not already primary result)
// This is low-cost during registry scan and avoids future expensive scans
if (ss != primary_result && tiny_warm_pool_count(class_idx) < 4) {
// Phase 1: Increase threshold from 4 to 12 to match TINY_WARM_POOL_MAX_PER_CLASS
if (ss != primary_result && tiny_warm_pool_count(class_idx) < 12) {
tiny_warm_pool_push(class_idx, ss);
// Track prefilled SuperSlabs for metrics
g_warm_pool_stats[class_idx].prefilled++;