next up previous contents
Next: Sending out COHE messages Up: Directory and Memory Simulation Previous: Obtaining a new or

Processing incoming REQUESTs

  The first part of DIRREQ handles ``preprocessed'' REQUESTs, which have already come to the directory before but were bounced back at the cache by NackUpgradeConflictReply (Section 13). These are simply bounced back to the cache. For other REQUESTs, the directory coherence routine (Dir_Cohe) must be called in order to determine the course of handling this access.

Dir_Cohe determines the state transition for the line at the directory, as well as the possible COHE messages that this access will need to send out. As Dir_Cohe may consume a directory buffer, the directory must first check to make sure that a buffer is available; if none is available, the directory sends the REQUEST back as an RAR.

If Dir_Cohe responds with a DIR_REPLY or VISIT_MEM, no COHE actions must be sent as a result of this transaction. Consequently, the directory attempts to send a REPLY back to the caches. If a REPLY cannot be sent, the REQUEST is held in its input port or pending buffer until it can be processed later; the directory returns to case DIRSTARTOVER in such cases. If a REPLY can be sent, the directory moves to DIRSENDREQ.

If the REQUEST comes from a cache that the directory believes to have the line in exclusive state, then the REQUEST must have bypassed an in-flight write-back or replacement message from the same node. In this case, Dir_Cohe returns WAITFORWRB to force this REQUEST to wait for a write-back or replacement message before being processed. Such a REQUEST is moved to the pending queue to allow other REQUESTs to be processed in the meanwhile. Similarly, if the REQUEST is to a line that is currently in a transient directory state, caused by outstanding COHE messages or an outstanding WAITFORWRB, Dir_Cohe returns WAIT_PEND and the REQUEST is also added to the pending buffer.

If the REQUEST requires new COHE messages to be sent out and the line is currently held in shared state by other nodes, the Dir_Cohe function returns WAIT_CNT. In this case, the directory must create new invalidation COHE packets. These messages are sent as INVL coherence messages, with NACK_OK set to indicate that a negative-acknowledgment is acceptable.

If the line is currently held in exclusive state by another node, Dir_Cohe returns FORWARD_REQUEST. This reponse indicates that the outbound coherence message should request the owner of the cache line to send a cache-to-cache transfer to the requester. If the REQUEST being sent is a shared-mode access (read), the cache-to-cache transfer COHE request is sent as a COPYBACK, indicating that the memory should also be sent a copy of any dirty data. This is needed because the cache-coherence protocol does not support a shared-dirty state; any line shared by multiple caches must be held with the same value at the memory. If the REQUEST is an exclusive-mode access, the cache-to-cache transfer COHE request is sent as COPYBACK_INVL, indicating that it is sufficient to send only an acknowledgment to the directory after sending the cache-to-cache transfer. In either case, negative acknowledgments are not acceptable, so the cache-to-cache transfer request is sent with NACK_NOK.

In either the WAIT_CNT or FORWARD_REQUEST cases, the directory has to delay the processing of outbound coherence messages according to the packet creation time described in Section 4. Namely, the first COHE message will wait for a delay of pkt_create_time, while each subsequent message will wait for addtl_pkt_crt_time. Each time the directory delays for a packet creation, the REQUEST is put into the directory's partially-completed transaction structure (req_partial), and the directory transitions to DIRSENDCOHE.


next up previous contents
Next: Sending out COHE messages Up: Directory and Memory Simulation Previous: Obtaining a new or

Vijay Sadananda Pai
Thu Aug 7 14:18:56 CDT 1997