Docsity

Directory-based Cache Coherence: Protocol Occupancy and Directory Controllers, Slides of Computer Science

Toggle sidebar
bg1
Objectives_template
file:///E|/parallel_com_arch/lecture32/32_1.htm[6/13/2012 12:14:36 PM]
Module 14: "Directory-based Cache Coherence"
Lecture 32: "Protocol Occupancy and Directory Controllers"
Directory-based Cache Coherence:
Special Topics
AlphaServer GS320
Virtual network: Case Studies
Coherence controller occupancy
Protocol occupancy
Directory controllers
Flexible protocol engine
[From Chapter 8 of Culler, Singh, Gupta]
[SGI Origin 2000 material taken from Laudon and Lenoski, ISCA 1997]
[GS320 material taken from Gharachorloo et al., ASPLOS 2000]
pf3
pf4
pf5

Partial preview of the text

Download Directory-based Cache Coherence: Protocol Occupancy and Directory Controllers and more Slides Computer Science in PDF only on Docsity!

Module 14: "Directory-based Cache Coherence"

Lecture 32: "Protocol Occupancy and Directory Controllers"

Directory-based Cache Coherence:

Special Topics

AlphaServer GS

Virtual network: Case Studies

Coherence controller occupancy

Protocol occupancy

Directory controllers

Flexible protocol engine

[From Chapter 8 of Culler, Singh, Gupta]

[SGI Origin 2000 material taken from Laudon and Lenoski, ISCA 1997]

[GS320 material taken from Gharachorloo et al., ASPLOS 2000]

Module 14: "Directory-based Cache Coherence"

Lecture 32: "Protocol Occupancy and Directory Controllers"

AlphaServer GS

Recall that SGI Origin 2000 eliminates NACKs related to late and early interventions Late interventions are replied by home via writeback forwarding Early interventions are buffered at writer until write is completed Origin 2000 still uses NACKs if directory state is busy GS320 eliminates all NACKs Simply doesn’t have busy states How do you serialize transactions? Eliminating PSH: dirty sharing Same as a standard MOESI protocol, but state change in directory is immediate Suppose node P0 is caching a block in M state Node P1 issues a read request to home Home forwards it to P0, changes directory state to clean, and marks P0 as the owner (need an owner field in directory) P0 supplies data to P1 and moves to O state P1 could also become O (is it better or worse?) All subsequent requests are forwarded to P0 by home P0 must serialize them properly Philosophy: keep home free, serialize in the periphery Dirty sharing Problem arises if owner evicts the cache block Now home cannot figure out what to do Directory only specifies the sharers and the owner Home does not know exactly which sharers did not get the cache block from P Home only writes the block back to memory, marks that there is no owner for this block, and sends a writeback acknowledgment to owner Owner in all cases must source the cache block until the writeback is acknowledged Must hold evicted cache blocks in a writeback buffer More problems: what if a request arrives at home before the WB, but reaches owner after the WB ACK? Dirty sharing GS320 maintains total order in the network Needed by other optimizations related to invalidation acknowledgments also What if the protocol allows the ownership to move along the sharer chain? New problem: writeback ordering Easy to resolve at home: only accept data from owner marked in the directory entry Always acknowledge writebacks Still need to rely on network order? No, if there are two types of writeback acknowledgments Eliminating the PDEX state: write forwarding Same as read case with ownership changing along a chain Performance considerations How will a migratory sharing pattern perform on GS320? How will a large-scale producer-consumer pattern perform on GS320? Any special considerations for LL/SC locks?

Module 14: "Directory-based Cache Coherence"

Lecture 32: "Protocol Occupancy and Directory Controllers"

Virtual network: Case Studies

Each virtual network consists of an NI queue in each direction connected to the corresponding queue or group of queues in the router SGI Origin 2000 Two virtual networks; uses back-off intervention and invalidation to avoid cycles in the network dependence graph Stanford DASH Two virtual networks; in case an incoming request needs space in outgoing request network and outgoing request queue is full, it waits for a pre-defined number of cycles and then if still full, sends a NACK to the requester AlphaServer GS Three virtual networks; longest transaction is 3-hop Stanford FLASH Four virtual networks; longest transaction is 4-hop (special case of reply generating a reply) Alpha 21364 router 19 virtual channels (essentially queues) in each direction per port: 3 channels per virtual network, six coherence message types, one extra channel forms the seventh virtual network to carry some special coherence control messages (3 channels within a network are used for adaptive routing)

Coherence controller occupancy

How long does it take to service a message on average? If you imagine the coherence controller as a centralized server in a queuing model, occupancy is just the reciprocal of service rate Occupancy of servicing a message induces a waiting time on the subsequent messages (shows up as a contention component in the total end-to-end latency) Queuing analysis and simulation show that contention grows faster than quadratic in occupancy (Chaudhuri et al, 2003); later empirically confirmed by other researchers that it is likely to be sub-cubic Goal should be to design low-occupancy protocols

Protocol occupancy

Goal is to design low-occupancy protocol Doesn’t mean cannot do smart things A high-occupancy protocol can still perform well if it can reduce the message count accordingly Latency tolerating techniques such as prefetching usually puts more pressure on the coherence controller (why?) Leads to an increased average protocol occupancy Some bad protocol decisions Invalidation acknowledgments at home Replacement hints NACKs Final design is usually influenced by directory organization and coherence controller

microarchitecture

Directory controllers

Two main designs Hardwired finite state machines (fixed protocol) Software protocol running on embedded protocol processor in memory controller (suited for off-chip memory controllers) or protocol thread in main processor (suited for multi-threaded processors) or protocol core in main processor (suited for multi-core processors) Hardwired FSM Low occupancy (all-hardware) Protocol must be simple enough to be able to design and verify in hardware Possible to pipeline various stages of protocol processing Cannot afford late-binding or flexibility in the choice of protocol SGI Origin 2000, MIT Alewife, Stanford DASH