Snooping

General

The system processor(s) cache information from system memory and may modify the data in the cache but not perform a memory write on the FSB to update the original line in memory. The line in memory is then stale. For this reason, whenever any device (a processor or a device adapter) attempts to access system memory, the memory access must be made visible to the processors so they may snoop the memory address in their caches. In the Snoop Phase of the transaction, the processors provide the request initiator with the snoop result. If the snoop results in a hit on a modified line, the processor with the modified copy of the line asserts the HITM# signal in the Snoop Phase and then provides its modified copy of the line in the transaction's Data Phase.

A Memory Access Initiated by a Processor

When a processor has a miss on its internal caches and initiates a memory access on the FSB, the other processors latch the transaction, determine that it's a memory access, and submit the memory address to their internal caches for a lookup. In the transaction's Snoop Phase, they provide the Request Agent (i.e., the processor that experienced the miss) with one of the snoop results shown in Table 34-1 on page 827 (the values shown for the signals are electrical values). Please note that this section is not intended to be a detailed description including all aspects of snooping (for a detailed description, refer to “Pentium® 4 FSB Snoop Phase” on page 1225).

Table 34-1. Possible Snoop Results on a Memory Access by a Processor
Access TypeHIT#HITM#Description
Memory Read11A snoop miss on all processor caches. The Request Agent is permitted to read the line from system memory.
01A snoop hit on one or more copies of the line that is still the same as the line originally read from system memory. Once again, the Request Agent is permitted to read the line from system memory.
10A snoop hit on a copy of the line in the modified (M) state. When the system memory controller detects this snoop result, it cancels its read of the line from system memory. In the transaction's Data Phase, the processor that asserted HITM# supplies the line to both the Request Agent (i.e., the other processor) and to the system memory controller. The system memory controller latches the line and uses it to update the stale copy of the line in memory. The processor that supplied the modified copy of the line changes the state of the line in its cache to indicate that it now the same as the one in memory.
00One or more of the Snoop Agents (i.e., the processors) need a little more time before supplying the actual snoop result. As a result, the Request Agent inserts wait states in the transaction's Snoop Phase until the actual snoop result is provided.
Memory Write11A snoop miss on all processor caches:
  • If a processor that snooped the transaction did not have a copy of the line in its caches, the snoop has no effect on the processor's caches.

  • If a processor that snooped the transaction had a copy of the line that was still the same as the line in memory, it indicates a snoop miss and deletes its copy of the line (because IA32 processors cannot snarf [i.e., latch] data being written to memory by another agent to keep their copy updated).

  • The memory controller accepts the write data into its copy of the line.

01This is an illegal snoop result. If a processor has a copy of the line that is still the same as the one in memory, it must delete its copy and indicate a snoop miss (see the previous row).
10This won't happen. The area of memory is WB memory (as indicated by a processor having a modified copy of a line). If another processor has a write miss, it will initiate a Memory Read and Invalidate transaction, not a Memory Write.
00One or more of the Snoop Agents (i.e., the processors) need a little more time before supplying the actual snoop result. As a result, the Request Agent inserts wait states in the transaction's Snoop Phase until the actual snoop result is provided.

A Memory Access Initiated by a Device Adapter

When a device adapter attempts to access system memory, the Root Complex must stall the access until it has sent a snoop transaction to the FSB and has obtained the snoop result. Otherwise, one of the following problems could arise:

  • The device adapter could read stale data from memory.

  • The device adapter could write some data into a stale line memory.

  • The processors may have a copy of the line that is still the same as the line in memory and would not be aware that a device adapter had changed one or more bytes within the line in memory. The cached copy of the line would be stale and the processor wouldn't know it. If the program that is currently executing on the processor core requested the stale data, bad things will result.

This discussion assumes that the system memory controller is embedded within the Root Complex (rather than residing on the FSB). The type of transaction that the Root Complex performs on the FSB as a snoop transaction depends on whether the device adapter is attempting a read or a write:

  • For a memory read access, the Root Complex performs a 0-byte Memory Read transaction.

  • For a memory write access, the Root Complex performs a 0-byte Memory Read and Invalidate transaction.

Table 34-2 on page 830 explains the possible snoop results of the transaction types.

Table 34-2. Possible Snoop Results on a Memory Access by a Device Adapter
Snoop TypeSnoop ResultDescription
HIT#HITM#
0-byte Memory Read11A snoop miss. The device adapter is permitted to read the data from system memory.
01A snoop hit on a copy of the line that is still the same as the line originally read from system memory. The device adapter is permitted to read the data from system memory.
10A snoop hit on a Modified (M) line. Although this started out as a 0-byte Memory Read transaction, it is transformed into a full line read. The processor supplies the modified line to the Root Complex and the Root Complex supplies the line to the memory controller and the requested read data to the device adapter. The stale line in memory is freshened. The processor changes the state of its line to show that it's now the same as the line in memory.
00One or more of the Snoop Agents (i.e., the processors) need a little more time before supplying the actual snoop result. As a result, the Request Agent inserts wait states in the transaction's Snoop Phase until the actual snoop result is provided.
0-byte Memory Read and Invalidate11A snoop miss. The device adapter is permitted to read the data from system memory.
01This won't happen. Any processor that has a copy of the line in the E or S state deletes it and indicates a snoop miss.
10A snoop hit on a Modified (M) line. Although this started out as a 0-byte Memory Read and Invalidate (MRI) transaction, it is transformed into a full line MRI. The processor supplies the modified line to the Root Complex and the Root Complex supplies the line to the memory controller. The write data supplied by the device adapter is merged into the appropriate locations within the line and the line is written into system memory. The processor deletes its copy of the line (because it will not receive any of the device adapter's write data).
00One or more of the Snoop Agents (i.e., the processors) need a little more time before supplying the actual snoop result. As a result, the Request Agent inserts wait states in the transaction's Snoop Phase until the actual snoop result is provided.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.172.93