Moe Charm (CI)
5cc1f93622
Phase 13-A Step 1: TinyHeapV2 NO-REFILL L0 cache implementation
Implement TinyHeapV2 as a minimal "lucky hit" L0 cache that avoids
circular dependency with FastCache by eliminating self-refill.
Key Changes:
- New: core/front/tiny_heap_v2.h - NO-REFILL L0 cache implementation
- tiny_heap_v2_alloc(): Pop from magazine if available, else return NULL
- tiny_heap_v2_refill_mag(): No-op stub (no backend refill)
- ENV: HAKMEM_TINY_HEAP_V2=1 to enable
- ENV: HAKMEM_TINY_HEAP_V2_CLASS_MASK=bitmask (C0-C3 control)
- ENV: HAKMEM_TINY_HEAP_V2_STATS=1 to print statistics
- Modified: core/hakmem_tiny_alloc_new.inc - Add TinyHeapV2 hook
- Hook at entry point (after class_idx calculation)
- Fallback to existing front if TinyHeapV2 returns NULL
- Modified: core/hakmem_tiny_alloc.inc - Add hook for legacy path
- Modified: core/hakmem_tiny.c - Add TLS variables and stats wrapper
- TinyHeapV2Mag: Per-class magazine (capacity=16)
- TinyHeapV2Stats: Per-class counters (alloc_calls, mag_hits, etc.)
- tiny_heap_v2_print_stats(): Statistics output at exit
- New: TINY_HEAP_V2_TASK_SPEC.md - Phase 13 specification
Root Cause Fixed:
- BEFORE: TinyHeapV2 refilled from FastCache → circular dependency
- TinyHeapV2 intercepted all allocs → FastCache never populated
- Result: 100% backend OOM, 0% hit rate, 99% slowdown
- AFTER: TinyHeapV2 is passive L0 cache (no refill)
- Magazine empty → return NULL → existing front handles it
- Result: 0% overhead, stable baseline performance
A/B Test Results (100K iterations, fixed-size bench):
- C1 (8B): Baseline 9,688 ops/s → HeapV2 ON 9,762 ops/s (+0.76%)
- C2 (16B): Baseline 9,804 ops/s → HeapV2 ON 9,845 ops/s (+0.42%)
- C3 (32B): Baseline 9,840 ops/s → HeapV2 ON 9,814 ops/s (-0.26%)
- All within noise range: NO PERFORMANCE REGRESSION ✅
Statistics (HeapV2 ON, C1-C3):
- alloc_calls: 200K (hook works correctly)
- mag_hits: 0 (0%) - Magazine empty as expected
- refill_calls: 0 - No refill executed (circular dependency avoided)
- backend_oom: 0 - No backend access
Next Steps (Phase 13-A Step 2):
- Implement magazine supply strategy (from existing front or free path)
- Goal: Populate magazine with "leftover" blocks from existing pipeline
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 01:42:57 +09:00
..
2025-11-14 18:20:35 +09:00
2025-11-15 01:42:57 +09:00
2025-11-14 05:41:49 +09:00
2025-11-14 01:02:00 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 17:08:00 +09:00
2025-11-08 17:08:00 +09:00
2025-11-14 22:09:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 14:05:39 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 12:54:52 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 23:16:54 +09:00
2025-11-14 23:16:54 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 06:49:32 +09:00
2025-11-13 14:45:43 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-15 01:42:57 +09:00
2025-11-05 12:31:14 +09:00
2025-11-15 01:42:57 +09:00
2025-11-13 06:50:20 +09:00
2025-11-14 01:02:00 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 16:33:03 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 14:25:54 +09:00
2025-11-13 14:25:54 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 05:41:49 +09:00
2025-11-14 05:41:49 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-14 01:05:30 +09:00
2025-11-12 13:57:46 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 16:33:03 +09:00
2025-11-13 16:33:03 +09:00
2025-11-05 12:31:14 +09:00
2025-11-10 16:48:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 01:02:00 +09:00
2025-11-14 05:41:49 +09:00
2025-11-14 05:41:49 +09:00
2025-11-14 05:41:49 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 13:32:58 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 01:02:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-14 01:02:00 +09:00
2025-11-11 00:02:24 +09:00
2025-11-14 01:02:00 +09:00
2025-11-14 06:49:32 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 05:43:31 +09:00
2025-11-13 16:33:03 +09:00
2025-11-10 16:48:20 +09:00
2025-11-13 05:21:36 +09:00
2025-11-15 01:42:57 +09:00
2025-11-14 05:41:49 +09:00
2025-11-13 06:50:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-10 18:04:08 +09:00
2025-11-05 12:31:14 +09:00
2025-11-09 16:49:34 +09:00
2025-11-08 23:53:25 +09:00
2025-11-14 14:18:56 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 15:00:13 +09:00
2025-11-14 15:00:13 +09:00
2025-11-14 14:29:05 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 14:29:05 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 15:32:07 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 06:50:20 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 14:25:54 +09:00
2025-11-13 14:25:54 +09:00
2025-11-14 01:05:30 +09:00
2025-11-13 13:32:58 +09:00
2025-11-14 19:27:45 +09:00
2025-11-06 21:54:12 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 06:50:20 +09:00
2025-11-14 05:41:49 +09:00
2025-11-14 05:41:49 +09:00
2025-11-13 16:33:03 +09:00
2025-11-14 01:02:00 +09:00
2025-11-14 01:02:00 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-09 23:15:02 +09:00
2025-11-14 07:09:18 +09:00
2025-11-14 01:34:59 +09:00
2025-11-14 01:02:00 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 18:07:48 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 18:07:48 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 16:33:03 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 21:49:05 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 01:02:00 +09:00
2025-11-14 06:49:32 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 22:34:24 +09:00
2025-11-05 12:31:14 +09:00