No. 139 / project of 147 on the ladder

I-cache repair usefulness

introduces — I-cache background repair provenance tags; first-use and repeat-use fetch counters; repair usefulness ratios

harden statelast run2026-05-06
signoff
  • DRCNOT RUN
  • LVSNOT RUN
  • antennaNOT RUN

P139 keeps P138’s debt-limited aux-load policy and adds an audit: every I-cache word filled by background repair is tagged, then normal fetch counts whether that word becomes a first later fetch hit or a repeat later fetch hit.

checkresult
Verilator buildPASS
BusyBox shell workload reaches P139-FILE-OKPASS
Aux-load queue full dropsPASS
Aux response errors/cancelsPASS
Hardened layoutNOT RUN
metricP134P138P139
post-load cycles218,247,567219,659,138220,650,157
shell window cycles64,221,64264,637,76165,708,764
retired instructions86,139,76086,082,90786,400,649
CPI2.53362.55172.5538
S_FETCH cycles7,617,6957,617,1687,633,229
S_MEM cycles27,799,34329,317,92429,450,021

P139 is not a speed win. It is 1,071,003 shell-window cycles slower than P138 and 1,487,122 cycles slower than P134. The useful result is the repair-attribution data.

repair-usefulness countercount
background repair word fills tagged52,847,191
first later fetch hits on tagged words1,926,219
repeat later fetch hits on tagged words829,627
first-hit usefulness ratio3.64%
first + repeat fetch-hit ratio5.22%

That is the uncomfortable result in one table. The I-cache background repair engine is consuming a lot of lower-memory service, but only a small slice of those repaired words become fetch data before replacement or irrelevance.

P139 policy bucketcount
total aux-load candidates5,254,140
issued aux loads1,684,851
frontend prefetch not safe/useful1,584,084
frontend-ready candidates3,670,056
background quiet candidates / issued172,707
issued while preempting I-cache background1,512,144
deferred by I-cache debt limit68,133
I-cache debt paydowns1,512,144
I-cache debt saturations0
debt at end0

The debt arbiter is still balanced: preemptions and paydowns match, and the aux-load path still completes 1.68M loads without queue drops, errors, or cancels. The new fact is that fair repair service is not the same as valuable repair service.

The next rung should make policy use this fact. A repair-aware arbiter could protect only current/near fetch-line repair, age out repair streams that have not paid off, or stop spending bandwidth on background words that repeatedly fail the first-use audit.

shell phases label P139 shell workload cycles 220,650,157 cpi 2.55
  1. kernel banner to /init 117,349,770 53.3%
  2. /init to shell banner 1,082,285 0.5%
  3. shell banner to first command 35,880,486 16.3%
  4. echo command 1,649 0%
  5. uname -a 1,985,750 0.9%
  6. ls /bin /usr/share 32,868,818 14.9%
  7. cat sample file 3,358,740 1.5%
  8. touch/write/cat/rm /tmp file 11,079,526 5%
  9. 8x ash loop with file I/O 16,413,601 7.5%
  10. final marker 680 0%
state breakdown label P139 I-cache repair usefulness workload cycles 220,650,157 cpi 2.55
  1. fetch 3.5% 7,633,229
  2. execute 39.2% 86,425,615
  3. mem 13.5% 29,729,857
  4. walker 1.2% 2,695,250
  5. writeback 39.2% 86,400,649
  6. mul/div 3.5% 7,763,841