Docsity

Caching for Chip Multiprocessors - Multi-Core Computing | COMP 522, Study notes of Computer Science

Partial preview of the text

Download Caching for Chip Multiprocessors - Multi-Core Computing | COMP 522 and more Study notes Computer Science in PDF only on Docsity!

John Mellor-Crummey

Department of Computer Science Rice University [email protected]

Caching for Chip Multiprocessors

COMP 522 Lecture 7 18 September 2008

Last Week

Tiled chip multiprocessors: Intel’s view of the future

— large number of tiles — specialized tiles can be incorporated into grid layout on chip

Dance-Hall Shared Cache CMPs

E.g. Piranha

  • L1 cache co-located with PE
  • PEs on far side of interconnect from L2 cache — all L2 caches equidistant all processors

Looking to the Future …

  • Trends — more processors — larger L2 cache size
  • Implications — wire delay of tens of clock cycles across chip — worst case latency: likely unacceptable hit times for future L
  • Recommendation: tiled chip multiprocessors — co-locate part of shared cache near each core - reduce access latency to (at least some) shared data

Alternatives for Managing Tile L2 in CMPs

Treat each slice as a

private L2 cache per

tile (L2P)

Manage all slices as a

single large shared L

cache (L2S)

Implications of L2 Caching Strategy

  • Treat each slice as a private L2 cache per tile — use directory approach to keep caches coherent - tags duplicated and distributed across chip (as in Piranha)
    • delivers lowest hit latency
      • works well when your working set fits in your L
    • reduces total effective cache capacity
      • each tile has a local copy of each line it touches
      • can’t borrow L2 space from other PEs with less full caches
  • Manage all slices as a single large shared L2 cache — focus: NUCA (non-uniform cache architecture) designs - differ from Piranha’s dancehall design — migration based NUCA protocols seem problematic
    • shared L2 increases effective cache capacity for shared data
    • incurs long hit latencies when L2 data is on remote tile

Victim Replication in Action

Dynamically build small victim cache in L

  • Processor misses in shared L — bring line from memory — place in L2 in a home tile determined by subset of address bits — also bring into L1 of requester
  • Incoming invalidation to a processor — follow usual L2S protocol (check local L1 and L2)
  • If L1 line is evicted on conflict or capacity miss — attempt to copy victim line into local L
  • Primary cache misses must check for local replica on miss — no replica: forward request to home tile — on replica hit: invalidate replica in local L2, move to local L

Victim Replacement Policy

  • Never evict global shared line in favor of local replica
  • L2VR replaces lines in following priority order — invalid line — global line with no sharers — existing replica
  • If no lines belong to these categories — no replica is made in local L2 cache — victim evicted from the tile as in L2S
  • More than one candidate line? — pick at random

Victim Replication Evaluation Parameters

VR Single-threaded Benchmarks

Single Threaded: Off-chip Miss Rate

ST: On-chip Coherence Msg/1K Instructions

Multi-Threaded: Average Access Latency

IS fit in L

BT, FT,

LU, SP

fit in L

MG, EP,

checkers

better with

L2VR

Multi-Threaded: Off-chip Miss Rates