210 likes | 304 Views
An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing. CS258 Paper Summary Computer Science Jaein Jeong. Migratory Sharing. Pi has exclusive copy of X. Pi. Dirty. Dirty. Invalid. Pj. Location X. Pi. Invalid. Pk. Migratory Sharing. Pj sends read request to X. Pi.
E N D
An Adaptive Cache Coherence Protocol Optimized for Migratory Sharing CS258 Paper Summary Computer Science Jaein Jeong
Migratory Sharing • Pi has exclusive copy of X Pi Dirty Dirty Invalid Pj Location X Pi Invalid Pk
Migratory Sharing • Pj sends read request to X Pi Dirty Dirty Rd Invalid Pj Location X Pi Invalid Pk
Migratory Sharing • D.C. sends flush to the exclusive sharer Pi Pi Dirty Rd Dirty Invalid Pj Location X Pi Invalid Pk
Migratory Sharing • Pi sends data to Pj and main memory • State changes to shared, with sharer Pi and Pj Pi Shared WB WB Shared Shared Pj Location X Pi, Pj Invalid Pk
Migratory Sharing • Pj sends read exclusive request to X Pi Shared Shared RdX Shared Pj Location X Pi, Pj Invalid Pk
Migratory Sharing • D.C. invalidates Pi Pi Shared Inv. Shared Shared Pj Location X Pi, Pj Invalid Pk
Migratory Sharing • Pi is invalidated • State for memory and Pj changes to dirtywith sharer Pj Pi Invalid Dirty Dirty Pj Location X Pj Invalid Pk
Transaction Cost under W.I. • Two separate requests from Pj: • Read and Read Exclusive requests • One flush and one invalidation to Pi • Idea 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 Pi Dirty Dirty Rd Invalid Pj Location X Pi Invalid Pk
Migratory Sharing (modified) • D.C. sends read to the exclusive sharer Pi Pi Dirty Rd Dirty Invalid Pj Location X Pi Invalid Pk
Migratory Sharing (modified) • Pi sends data to Pj and main memoryand invalidates its copy Pi Invalid WB WB Dirty Invalid Pj Location X Pi Invalid Pk
Migratory Sharing (modified) • D.C. sends ACK to Pj • State changes with sharer Pj Pi Invalid Dirty ACK Dirty Pj Location X Pj Invalid Pk
Invalid Shared Dirty Migrating Extensions to support migratory sharing • Switches b/w W.I. And migratory protocol • Extensions 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 Pi Dirty Dirty Rd Invalid Pj Location X Pi Invalid Pk
Pi Migrating Rd_j Dirty Invalid Pj Location X Pi Invalid Pk Detection of non-migratory sharing <States of Processor Pi> • Condition for W-IRr && local state == migrating
Experimental Results(Execution Time) • Effective for read-and-modifiy accesses • Reduces number of writes • No 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