Moe Charm (CI)
ccccabd944
Phase 17-1: Small-Mid Allocator - TLS Frontend Cache (結果: ±0.3%, 層分離成功)
Summary:
========
Phase 17-1 implements Small-Mid allocator as TLS frontend cache with Tiny backend delegation.
Result: Clean layer separation achieved with minimal overhead (±0.3%), but no performance gain.
Conclusion: Frontend-only approach is dead end. Phase 17-2 (dedicated backend) required for 2-3x target.
Implementation:
===============
1. Small-Mid TLS frontend (256B/512B/1KB - 3 classes)
- TLS freelist (32/24/16 capacity)
- Backend delegation to Tiny C5/C6/C7
- Header conversion (0xa0 → 0xb0)
2. Auto-adjust Tiny boundary
- When Small-Mid ON: Tiny auto-limits to C0-C5 (0-255B)
- When Small-Mid OFF: Tiny default C0-C7 (0-1023B)
- Prevents routing conflict
3. Routing order fix
- Small-Mid BEFORE Tiny (critical for proper execution)
- Fall-through on TLS miss
Files Modified:
===============
- core/hakmem_smallmid.h/c: TLS freelist + backend delegation
- core/hakmem_tiny.c: tiny_get_max_size() auto-adjust
- core/box/hak_alloc_api.inc.h: Routing order (Small-Mid → Tiny)
- CURRENT_TASK.md: Phase 17-1 results + Phase 17-2 plan
A/B Benchmark Results:
======================
| Size | Config A (OFF) | Config B (ON) | Delta | % Change |
|--------|----------------|---------------|----------|----------|
| 256B | 5.87M ops/s | 6.06M ops/s | +191K | +3.3% |
| 512B | 6.02M ops/s | 5.91M ops/s | -112K | -1.9% |
| 1024B | 5.58M ops/s | 5.54M ops/s | -35K | -0.6% |
| Overall| 5.82M ops/s | 5.84M ops/s | +20K | +0.3% |
Analysis:
=========
✅ SUCCESS: Clean layer separation (Small-Mid ↔ Tiny coexist)
✅ SUCCESS: Minimal overhead (±0.3% = measurement noise)
❌ FAIL: No performance gain (target was 2-4x)
Root Cause:
-----------
- Delegation overhead = TLS savings (net gain ≈ 0 instructions)
- Small-Mid TLS alloc: ~3-5 instructions
- Tiny backend delegation: ~3-5 instructions
- Header conversion: ~2 instructions
- No batching: 1:1 delegation to Tiny (no refill amortization)
Lessons Learned:
================
- Frontend-only approach ineffective (backend calls not reduced)
- Dedicated backend essential for meaningful improvement
- Clean separation achieved = solid foundation for Phase 17-2
Next Steps (Phase 17-2):
========================
- Dedicated Small-Mid SuperSlab backend (separate from Tiny)
- TLS batch refill (8-16 blocks per refill)
- Optimized 0xb0 header fast path (no delegation)
- Target: 12-15M ops/s (2.0-2.6x improvement)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 02:37:24 +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-16 00:38:29 +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 18:20:35 +09:00
2025-11-15 14:35:44 +09:00
2025-11-10 16:48:20 +09:00
2025-11-15 22:08:51 +09:00
2025-11-16 02:37:24 +09:00
2025-11-11 21:49:05 +09:00
2025-11-07 01:27:04 +09:00
2025-11-15 23:00:21 +09:00
2025-11-07 01:27:04 +09:00
2025-11-16 00:38:29 +09:00
2025-11-15 14:35:44 +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 17:41:26 +09:00