Transcript
Page 1: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

CS258 Paper SummaryComputer ScienceJaein Jeong

Page 2: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

Pi has exclusive copy of X

Location X

Pi

Pj

Pk

Dirty

Dirty

Invalid

Invalid

Pi

Page 3: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

Pj sends read request to X

Location X

Pi

Pj

Pk

Dirty Rd

Dirty

Invalid

Invalid

Pi

Page 4: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

D.C. sends flush to the exclusive sharer Pi

Location X

Pi

Pj

Pk

Dirty

RdDirty

Invalid

Invalid

Pi

Page 5: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

Pi sends data to Pj and main memoryState changes to shared, with sharer Pi and Pj

Location X

Pi

Pj

Pk

Shared

WBShared

Shared

Invalid

Pi, Pj

WB

Page 6: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

Pj sends read exclusive request to X

Location X

Pi

Pj

Pk

Shared RdX

Shared

Shared

Invalid

Pi, Pj

Page 7: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

D.C. invalidates Pi

Location X

Pi

Pj

Pk

Shared

Inv.Shared

Shared

Invalid

Pi, Pj

Page 8: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing

Pi is invalidatedState for memory and Pj changes to dirtywith sharer Pj

Location X

Pi

Pj

Pk

Dirty

Invalid

Dirty

Invalid

Pj

Page 9: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Transaction Cost under W.I.

Two separate requests from Pj: Read and Read Exclusive requests

One flush and one invalidation to PiIdea for improvement One request from Pj After Pi sends data, its state becomes invalid

Page 10: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing (modified)

Pj sends read request (migrating read) to X

Location X

Pi

Pj

Pk

Dirty Rd

Dirty

Invalid

Invalid

Pi

Page 11: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing (modified)

D.C. sends read to the exclusive sharer Pi

Location X

Pi

Pj

Pk

Dirty

RdDirty

Invalid

Invalid

Pi

Page 12: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing (modified)

Pi sends data to Pj and main memoryand invalidates its copy

Location X

Pi

Pj

Pk

Dirty

WBInvalid

Invalid

Invalid

Pi

WB

Page 13: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Migratory Sharing (modified)

D.C. sends ACK to PjState changes with sharer Pj

Location X

Pi

Pj

Pk

Dirty ACK

Invalid

Dirty

Invalid

Pj

Page 14: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Extensions to support migratory sharing

Invalid

Dirty Shared

Migrating

Switches b/w W.I. And migratory protocolExtensions are needed: LW (last writer), N (num sharer) 2 states for home, 1 state for local

Page 15: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Detection of migratory sharing

Condition for migratory sharingRxq_i && N == 2 && LW != i

Location X

Pi

Pj

Pk

Dirty Rd

Dirty

Invalid

Invalid

Pi

Page 16: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Detection of non-migratory sharing

Condition for W-IRr && local state == migrating

<States of Processor Pi>

Location X

Pi

Pj

Pk

Dirty

Rd_j Migrating

Invalid

Invalid

Pi

Page 17: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Experimental Results(Execution Time)

Effective for read-and-modifiy accessesReduces number of writesNo negative effect for non-migratory apps

Page 18: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Experimental Results(Network Traffic)

Same trend with the execution time

Page 19: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Experimental Results(Various memory consistency models)

Adaptive protocol more effective for stricter memory consistency models

Page 20: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Experimental Results(Smaller cache size)

Adaptive protocol more effective when capacity and conflict misses are reduced with larger cache

Page 21: An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing

Discussion

Is the adaptive protocol worthwhile? The effectiveness varies depending

on applications (1% to 54%). Benefits on migratory sharing

Added complexity Increased number of states More complex transition


Top Related