Moe Charm (CI)
88f3592ef6
Option B: Periodic TLS SLL Drain - Fix Phase 9 LRU Architecture Issue
Root Cause:
- TLS SLL fast path (95-99% of frees) does NOT decrement meta->used
- Slabs never appear empty → SuperSlabs never freed → LRU never used
- Impact: 6,455 mmap/munmap calls per 200K iterations (74.8% time)
- Performance: -94% regression (9.38M → 563K ops/s)
Solution:
- Periodic drain every N frees (default: 1024) per size class
- Drain path: TLS SLL → slab freelist via tiny_free_local_box()
- This properly decrements meta->used and enables empty detection
Implementation:
1. core/box/tls_sll_drain_box.h - New drain box function
- tiny_tls_sll_drain(): Pop from TLS SLL, push to slab freelist
- tiny_tls_sll_try_drain(): Drain trigger with counter
- ENV: HAKMEM_TINY_SLL_DRAIN_ENABLE=1/0 (default: 1)
- ENV: HAKMEM_TINY_SLL_DRAIN_INTERVAL=N (default: 1024)
- ENV: HAKMEM_TINY_SLL_DRAIN_DEBUG=1 (debug logging)
2. core/tiny_free_fast_v2.inc.h - Integrated drain trigger
- Added drain call after successful TLS SLL push (line 145)
- Cost: 2-3 cycles per free (counter increment + comparison)
- Drain triggered every 1024 frees (0.1% overhead)
Expected Impact:
- mmap/munmap: 6,455 → ~100 calls (-96-97%)
- Throughput: 563K → 8-10M ops/s (+1,300-1,700%)
- LRU utilization: 0% → >90% (functional)
Reference: PHASE9_LRU_ARCHITECTURE_ISSUE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 07:09:18 +09:00
..
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-07 01:27:04 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 01:45:30 +09:00
2025-11-13 01:45:30 +09:00
2025-11-14 05:41:49 +09:00
2025-11-13 01:45:30 +09:00
2025-11-14 06:49:32 +09:00
2025-11-14 01:02:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-14 01:02:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 16:33:03 +09:00
2025-11-14 01:02:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-12 01:01:23 +09:00
2025-11-14 05:41:49 +09:00
2025-11-07 01:27:04 +09:00
2025-11-14 06:09:02 +09:00
2025-11-14 01:02:00 +09:00
2025-11-10 16:48:20 +09:00
2025-11-14 06:09:02 +09:00
2025-11-11 21:49:05 +09:00
2025-11-07 01:27:04 +09:00
2025-11-14 06:32:38 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 13:32:58 +09:00
2025-11-13 06:50:20 +09:00
2025-11-12 02:45:00 +09:00
2025-11-12 02:45:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-14 01:02:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-11 01:47:06 +09:00
2025-11-07 01:27:04 +09:00
2025-11-11 01:47:06 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 01:27:04 +09:00
2025-11-06 21:54:12 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-06 21:54:12 +09:00
2025-11-13 01:45:30 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 01:45:30 +09:00
2025-11-13 06:50:20 +09:00
2025-11-12 02:45:00 +09:00
2025-11-14 01:02:00 +09:00
2025-11-12 02:45:00 +09:00
2025-11-13 06:50:20 +09:00
2025-11-14 05:41:49 +09:00
2025-11-14 07:09:18 +09:00