When a memory transaction is snooped, the snoop result affects both the Request Agent and the Snoop Agents. There are a number of possible cases. The type of memory transaction, whether or not other caches have a copy of the line, and the state of the line(s) in other caches all have an effect. In addition, sometimes the length of the data transfer has an effect. Table 50-2 on page 1235 defines the scenarios and the results (assuming that the Request Agent is a processor).
Transaction Snooped | Snoop Result | Effects of Snoop Result |
---|---|---|
Memory Read | Miss on all caches | The data is supplied by memory:
|
Hit on E or S line in one or more caches | The data is supplied by memory:
| |
Hit on M line in one cache | The operation started as a read from memory, but this changes it to a read of the M line from the Snoop Agent's cache. From the memory controller's standpoint, the read has turned into an implicit writeback of the M line to memory. The memory controller issues an implicit writeback response to the Request Agent in the Response Phase and accepts the line from the Snoop Agent during the Data Phase. The Snoop Agent changes its copy from the M to the S state. The Request Agent may have requested less than a line, but a full line is returned in toggle mode order, critical qword first. The Request Agent takes the data it requested and ignores the rest. If it requested the whole line, the line is placed in the L2 and Trace Cache or Data Cache in the S state. | |
Memory Write | Miss on all caches | The data is written to memory. There is no effect on the caches. |
Hit on E or S line in one or more caches | The Snoopers indicate a miss. The transaction invalidates copies of the line in other caches (because the processors don't have the ability to snarf data being written to memory by other agents). | |
Hit on M line in one cache | Case 1: Writing less than a line. The Memory Write is being performed by a device other than a processor. The memory controller accepts the write data from the Request Agent, and then accepts the implicit writeback of the full line from the Snoop Agent's cache. The memory controller than merges the write data into the writeback line and writes the resultant line into memory. The Snoop Agent invalidates its copy of the line. | |
Case 2: Writing a full line. The Memory Write is being performed by a device other than a processor. The memory controller accepts the write data from the Request Agent, and then asserts TRDY# to the Snoop Agent to indicate its readiness to accept the implicit writeback of the full line from the Snoop Agent's cache. The Snoop Agent can respond in one of two ways:
| ||
Memory Read and Invalidate for 64 bytes | Miss on all caches | The data is supplied by memory and is placed in the L1 Data Cache in the S state. The transaction is basically a Read With Intent To Modify (RWITM):
|
Hit on E or S line in one or more caches | The Snoopers indicate a miss. The data is supplied by memory and is placed in the L1 Data Cache in the S state. Copies of the line in the other caches are invalidated. The transaction is basically a Read With Intent To Modify (RWITM);
| |
Hit on M line in one cache | The data is supplied to the Request Agent and to the Response Agent (i.e., the memory controller) from the modified line in the Snoop Agent's cache. The Snoop Agent invalidates its copy of the line. The Response Agent (i.e., the memory controller) may or may not write the line into memory. Since the line was read with the intent to modify it once it is placed in the L1 Data Cache, the memory controller designer may choose not to waste memory bandwidth:
| |
Memory Read and Invalidate for 0 bytes | No other processor has a copy of the line in any state | If no other processor has a copy of the line, that means this initiating processor has an E copy of the line! That being the case, the processor would not initiate a 0-byte MRI to kill the line in the caches of other processors. This won't happen. |
Hit on an E line in the cache of one other processor | If another processor has an E copy of the line, than that means the initiating processor doesn't have copy. That being the case, the processor would be performing a Memory Read and Invalidate for a full line, not 0 bytes. This won't happen. | |
Hit on S line in the caches of one or more other processors | The processor performing the transaction has a copy in the S state. The transaction kills the line in the other processors that have it in the S state. The snoopers indicate a miss:
| |
Hit on M line in one processor | If another processor has a copy of the line in the M state, then the processor performing the transaction doesn't have a copy. It would therefore have a miss on its Data Cache and would perform a Memory Read and Invalidate for a full line, not 0 bytes. This won't happen. |
A Pentium® 4 processor snoops all memory transactions that occur on the FSB, including those initiated by itself. This is true even in a single-processor system. For an example of self-snooping, refer to “Self-Modifying Code and the P6” on page 281 on the CD.
18.224.32.86