Write-through sends every store to the next level at once. Write-back holds stores in the line and pays DRAM traffic once, on a dirty eviction.
The miss side is independent. Write-allocate fetches the line first, while write-no-allocate sends the store around the cache.
Combination | Store traffic | Fits |
|---|---|---|
Write-through with no-allocate | Every store leaves the cache | Small buffers over slow memories |
Write-through with allocate | Every store leaves, plus a fill | Rarely, needs a special reason |
Write-back with allocate | One line write per dirty eviction | Most data caches |
Write-back with no-allocate | Bypass for streaming stores | Non-temporal or streaming writes |
Dirty evictions convert into bandwidth. The product below uses illustrative inputs and converts eviction counts into bytes per second.
Metadata adds a second tax. Every line carries valid, dirty, tag, replacement and coherence bits whether or not it holds useful data.
illustrative: LLC evicts 2.0M lines/s, 35% dirty, 64-byte lines
writeback traffic = 0.35 x 2,000,000 x 64 B = 44,800,000 B/s = 44.8 MB/s
metadata, illustrative 48-bit addresses: 1-MB cache, 16-way, 64-B lines
lines = 1048576 / 64 = 16384; sets = 16384 / 16 = 1024
index = 10 bits; offset = 6 bits; tag = 48 - 10 - 6 = 32 bits
bits per line = 1 valid + 1 dirty + 32 tag + 4 LRU + 2 MESI = 40
total = 40 x 16384 = 655,360 bits = 80 KiB, about 7.8% of 1 MBThis topic keeps only the cost side of coherence. Sharer tracking, transient states and ordering rules live in the coherency topic.
Three hooks cross the boundary. The directory or snoop filter needs bits per line, inclusion choices decide who evicts whom, and eviction of a shared line may need a back-invalidation.
Hook | What the cache pays | Detail lives in |
|---|---|---|
Sharer tracking | Directory or filter bits per line | Cache coherence for the architect |
Inclusion policy | Back-invalidation traffic on evict | Cache coherence for the architect |
Writeback ordering | Fence and drain rules at the boundary | Memory consistency models |
Write-back with no-allocate, or non-temporal bypass. Fetching lines only to overwrite them wastes fills and evictions.
The coherency topic. Here they appear only as two metadata bits per line in the area sum.