An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing
CS258 Paper SummaryComputer ScienceJaein Jeong
Migratory Sharing
Pi has exclusive copy of X
Location X
Pi
Pj
Pk
Dirty
Dirty
Invalid
Invalid
Pi
Migratory Sharing
Pj sends read request to X
Location X
Pi
Pj
Pk
Dirty Rd
Dirty
Invalid
Invalid
Pi
Migratory Sharing
D.C. sends flush to the exclusive sharer Pi
Location X
Pi
Pj
Pk
Dirty
RdDirty
Invalid
Invalid
Pi
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
Migratory Sharing
Pj sends read exclusive request to X
Location X
Pi
Pj
Pk
Shared RdX
Shared
Shared
Invalid
Pi, Pj
Migratory Sharing
D.C. invalidates Pi
Location X
Pi
Pj
Pk
Shared
Inv.Shared
Shared
Invalid
Pi, Pj
Migratory Sharing
Pi is invalidatedState for memory and Pj changes to dirtywith sharer Pj
Location X
Pi
Pj
Pk
Dirty
Invalid
Dirty
Invalid
Pj
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
Migratory Sharing (modified)
Pj sends read request (migrating read) to X
Location X
Pi
Pj
Pk
Dirty Rd
Dirty
Invalid
Invalid
Pi
Migratory Sharing (modified)
D.C. sends read to the exclusive sharer Pi
Location X
Pi
Pj
Pk
Dirty
RdDirty
Invalid
Invalid
Pi
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
Migratory Sharing (modified)
D.C. sends ACK to PjState changes with sharer Pj
Location X
Pi
Pj
Pk
Dirty ACK
Invalid
Dirty
Invalid
Pj
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
Detection of migratory sharing
Condition for migratory sharingRxq_i && N == 2 && LW != i
Location X
Pi
Pj
Pk
Dirty Rd
Dirty
Invalid
Invalid
Pi
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
Experimental Results(Execution Time)
Effective for read-and-modifiy accessesReduces number of writesNo negative effect for non-migratory apps
Experimental Results(Network Traffic)
Same trend with the execution time
Experimental Results(Various memory consistency models)
Adaptive protocol more effective for stricter memory consistency models
Experimental Results(Smaller cache size)
Adaptive protocol more effective when capacity and conflict misses are reduced with larger cache
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