Computer Architecture · All levels
Replacement Policy and Miss Behavior — Extended Case Study
Extended Case Study for Replacement Policy and Miss Behavior (Memory Hierarchy).
Extended case study
A review is called because a workload regresses after a Replacement Policy and Miss Behavior change.
Background
A stable baseline existed until a Memory Hierarchy change improved one benchmark and regressed a product workload on LLC miss decomposition + reuse distance report.
Symptoms observed
Regression in LLC miss decomposition + reuse distance report
Sim vs silicon disagreement
Pressure to revert or ship risk
Investigation timeline
Freeze tags
Reproduce
Cluster
Experiment
Validate
Memo
Root cause
A hidden assumption in Replacement Policy and Miss Behavior failed under an unrepresented workload phase.
Fix and validation
Replay before/after trace windows to isolate workload mix shift versus policy behavior change.
Inspect top thrashing sets and classify line lifetimes (dead-on-fill vs useful reuse).
Quantify prefetch pollution and coherence-induced evictions separately.
Apply bounded policy experiment on shadow simulation with fairness monitors.
Validate p50/p95 latency and bandwidth impact before rollout.
Lessons learned
Workload coverage beats clever microarchitecture
Every change needs rollback triggers
REPLACEMENT POLICY AUDIT
workload: multi_tenant_inference
llc_mpki_before: 18.4
llc_mpki_after_fw: 24.1
prefetch_pollution_pct: 7.9 -> 12.6
coherence_invalidations_mpkI: 1.4 -> 1.5
set_thrash_clusters: 42
p95_core_latency_ns: 182 -> 239
action: deploy bimodal insertion for streaming class and tighten prefetch admissionArchitecture deep dive
Cache hierarchy trades area and power for AMAT and bandwidth.
Concept diagram
MEMORY HIERARCHY
Core
├─ L1I / L1D (cycles: 1-4, tiny, latency critical)
├─ L2 (cycles: 8-20, private or cluster)
├─ LLC / SLC (shared, bandwidth + coherency point)
├─ NoC (queueing + arbitration)
└─ DRAM/HBM (large penalty, high energy)
AMAT = hit_time + miss_rate × miss_penalty
But senior analysis also asks: MLP, bandwidth, QoS, and tail latency.Metric graph
MISS PENALTY WATERFALL
L1 hit ██ 3 cyc
L2 hit ████████ 12 cyc
LLC hit ███████████████ 32 cyc
DRAM miss ████████████████████████████████████ 180 cyc
Small MPKI can still dominate if miss penalty is huge.Metrics and artifacts
MPKI per level
L2/L3 bandwidth utilization
replacement policy stats
prefetch accuracy
Mini case study
Doubling L2 size reduces capacity misses but IPC improves only 3% because conflict misses dominate a shared workload. Fix data layout and false sharing before more SRAM.
Debug branches
If MPKI high but bandwidth low, footprint may exceed capacity.
If bandwidth saturated, coherency or DMA may be the real limit.
Senior review question
Ask: what single metric would prove this concept is working or failing on your workload?
Key takeaways
Connect every architecture claim to a workload and measurable metric.
State verification and PPA impact before proposing design changes.
Common pitfalls
Feature-driven design without MPKI/IPC/bandwidth evidence.
Ignoring coherency and NoC traffic in cache and accelerator sizing.
Study notes
Re-read this topic with one concrete workload.