The present disclosure generally relates to the field of electronics. More particularly, an embodiment of the invention relates to Opportunistic Snoop Broadcast (OSB) in directory enabled home snoopy systems.
Cache memory in computer systems may be kept coherent using a snoopy bus or a directory based protocol. In either case, a memory address is associated with a particular location in the system. This location is generally referred to as the “home node” of a memory address.
In a directory based protocol, processing/caching agents may send requests to a home node for access to a memory address with which a corresponding Home Agent (HA) is associated. Accordingly, performance of such computer systems may be directly dependent on how efficiently home agent data and/or memory is managed.
The detailed description is provided with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The use of the same reference numbers in different figures indicates similar or identical items.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of various embodiments. However, some embodiments may be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the particular embodiments.
Some embodiments reduce latency and/or increase bandwidth in a directory based cache coherence system in a scalable manner. Moreover, microprocessor performance may be improved by reducing cache-to-cache transfer latency and/or improving application memory bandwidth. For example, one embodiment opportunistically broadcasts snoops to reduce load-to-use-latency by initiating the cache-to-cache transfer of data early when the coherence interconnect bandwidth usage is determined to be low (e.g., based on threshold and/or count values, per transaction type(s) in some embodiments). Additionally, an embodiment allows for trade-off between coherency bandwidth (e.g., snoops and responses) versus memory bandwidth, such as for requests requiring pure ownership and not data, in a scalable manner; thus, increasing application memory bandwidth. Another embodiment provides an early data return technique where data may be returned based on directory information and before all opportunistic snoop responses arrive. Additionally, an embodiment provides a technique for trading off performance (latency and/or memory bandwidth) versus power efficiency. Also, some caching agents or cache lines may not be under directory control and requests from caching agents not under directory control and invoking opportunistic snoop broadcast, do not need to read the memory directory at all in an embodiment.
Generally, cache memory in computing systems may be kept coherent using a snoopy bus or a directory based protocol. In either case, a system memory address may be associated with a particular location in the system. This location is generally referred to as the “home node” of the memory address. In a directory based protocol, processing/caching agents may send requests to the home node for access to a memory address with which a “home agent” (or HA) is associated. Moreover, in distributed cache coherence protocols, caching agents (CAs) may send requests to home agents which control coherent access to corresponding memory spaces (e.g., a subset of the memory space is served by the collocated memory controller). Home agents are, in turn, responsible for ensuring that the most recent copy of the requested data is returned to the requestor either from memory or a caching agent which owns the requested data. The home agent may also be responsible for invalidating copies of data at other caching agents if the request is for an exclusive copy, for example. For these purposes, a home agent generally may snoop every caching agent or rely on a directory (e.g., directory cache 122 of
Moreover, snooping every caching agent for every read request may have latency advantage in some cases. For example, if the most recent data is present in another caching agent, it will be returned much faster to the requestor. However, this approach may have the disadvantage of increasing interconnect bandwidth usage and power. In fact, in large scalable systems, under some application loads, the interconnect bandwidth usage could increase to the extent that it could become saturated and reduce the entire system performance. In a directory mode, the directory information may be read from memory first to determine if snooping of caching agents is needed from the home agent. This sequence minimizes the required interconnect bandwidth usage and power, and may be used for building large scalable systems. However, this approach has a latency disadvantage if the most recent data is present in a different caching agent.
System design point choices (for interconnect bandwidths and latency optimizations), system topology, as well as coherence interconnect loading and memory interconnect loading, might lead to the snoop response return latency being longer than the memory latency or vice versa. Many factors, some of them dynamic, may play a role here. So it is not always unambiguously predictable what solution (always snoop or directory based) results in the lowest latency.
Various computing systems may be used to implement embodiments, discussed herein, such as the systems discussed with reference to FIGS. 1 and 6-7. More particularly,
As illustrated in
In one embodiment, the system 100 may support a layered protocol scheme, which may include a physical layer, a link layer, a routing layer, a transport layer, and/or a protocol layer. The fabric 104 may further facilitate transmission of data (e.g., in form of packets) from one protocol (e.g., caching processor or caching aware memory controller) to another protocol for a point-to-point or shared network. Also, in some embodiments, the network fabric 104 may provide communication that adheres to one or more cache coherent protocols.
Furthermore, as shown by the direction of arrows in
Additionally, at least one of the agents 102 may be a home agent and one or more of the agents 102 may be requesting or caching agents as will be further discussed herein. As shown, at least one agent (only one shown for agent 102-1) may include or have access to one or more logics (or engines) 111 to provide for OSB, as discussed herein, e.g., with reference to
As shown in
An implementation such as shown in
Operations discussed with reference to
More specifically,
Generally, in a directory based system, the directory information is read from memory first, before snooping (see, e.g., left side of
In an embodiment, Opportunistic Snoop Broadcast (OSB) uses a logic (e.g., logic 111) which monitors the coherence interconnect bandwidth to adaptively decide whether to send snoops opportunistically. This will in turn provide an early data return mechanism where the data may be returned based on the directory information but before all the opportunistic snoop responses arrive, i.e., to avoid penalties which would otherwise be incurred by late arriving snoop responses (i.e., after memory read) for the case where the directory is clean. As shown in
As shown in
In the traditional directory mode, (e.g., QPI) InvItoE transactions will read the memory directory to determine if snooping is needed. In this situation, the memory read is completely unnecessary since no data is returned to the requestor if the home agent had speculatively issued snoops and can determine that a directory update is not necessary. In specific directory based systems where the local caching agent is not under directory control, it is possible to completely eliminate directory lookup and update for local InvItoE transactions with an embodiment of the invention. The unconditional snooping of the local caching agent, and always waiting for local snoop response before sending a response to the requestor, will guarantee that coherence is always maintained.
In an embodiment, OSB provides a mechanism to monitor the interconnect bandwidth to determine whether to send snoops opportunistically. For example, the home agent (e.g., via logic 111) may monitor the interconnect (e.g., QPI) credits as a proxy for bandwidth of links, and egress occupancy as a proxy for ring bandwidth. In one embodiment, programmable thresholds with associated counters or measure trackers may allow for tuning and control of OSB based on one or more measurements of: type of data request, application behavior, and system configuration. For example, the success rate of forwarding (i.e., sharing of data), could dictate different thresholds. One or more counters (e.g., in or accessible by logic 111) may be used to determine success rate of forwarding.
Furthermore, not all transactions are similar in their benefit from snoop broadcast. Specifically, for local InvItoE (such as discussed with reference to
Generally, applications that tend to share cache lines and need snoops to complete transactions might be more likely to have remote transactions needing snoops than local transactions. For example, benchmarks like TPC-C tend to have more cache-to-cache transfers on remote accesses. But these applications tend to operate at low to medium bandwidth levels. In an embodiment, OSB may provide a latency advantage because of early cache-to-cache forwarding (before the directory information returns from memory) on remote read transactions.
To accommodate and take advantage of these specific application characteristics, in various embodiments, OSB may distinguish: (i) remote Rd+InvItoE traffic, (ii) local Rd traffic, and (iii) local InvItoE traffic. Separate and programmable thresholds to gauge coherence interconnect bandwidth for each distinguished traffic type may be implemented to allow for better control and tuning of the opportunistic snoops issued. It is possible to distinguish even more transaction types if necessary and change these thresholds dynamically.
To address the power implications in accordance with some embodiments, OSB may provide a mechanism to dynamically change interconnect bandwidth thresholds, or just turn off OSB, based on application access patterns or based on a higher level entity (PCU (Power Control Unit), BIOS (Basic Input/Output System), OS (Operating System)) which might decide to operate in a more power efficient mode than just chase pure performance. For example, to deal with the application access patterns, simple heuristics that track the ratio of requests needing snoops vs. the total number of directory lookups may be used to turn off OSB when no hits (for requests needing snoops) are found in a (programmable) window. OSB may be turned back on when the number of hits reach another programmable threshold. This enables one to turn off OSB while running 100% NUMA applications for instance. Another example is where BIOS or the OS is aware that the system needs to operate power efficiently and this could switch off OSB.
The processor 602 may include one or more caches (e.g., other than the illustrated directory cache 122), which may be private and/or shared in various embodiments. Generally, a cache stores data corresponding to original data stored elsewhere or computed earlier. To reduce memory access latency, once data is stored in a cache, future use may be made by accessing a cached copy rather than refetching or recomputing the original data. The cache(s) may be any type of cache, such a level 1 (L1) cache, a level 2 (L2) cache, a level 3 (L3), a mid-level cache, a last level cache (LLC), etc. to store electronic data (e.g., including instructions) that is utilized by one or more components of the system 600. Additionally, such cache(s) may be located in various locations (e.g., inside other components to the computing systems discussed herein, including systems of
A chipset 606 may additionally be coupled to the interconnection network 604. Further, the chipset 606 may include a graphics memory control hub (GMCH) 608. The GMCH 608 may include a memory controller 610 that is coupled to a memory 612. The memory 612 may store data, e.g., including sequences of instructions that are executed by the processor 602, or any other device in communication with components of the computing system 600. Also, in one embodiment of the invention, the memory 612 may include one or more volatile storage (or memory) devices such as random access memory (RAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), static RAM (SRAM), etc. Nonvolatile memory may also be utilized such as a hard disk. Additional devices may be coupled to the interconnection network 604, such as multiple processors and/or multiple system memories.
The GMCH 608 may further include a graphics interface 614 coupled to a display device 616 (e.g., via a graphics accelerator in an embodiment). In one embodiment, the graphics interface 614 may be coupled to the display device 616 via an accelerated graphics port (AGP). In an embodiment of the invention, the display device 616 (such as a flat panel display) may be coupled to the graphics interface 614 through, for example, a signal converter that translates a digital representation of an image stored in a storage device such as video memory or system memory (e.g., memory 612) into display signals that are interpreted and displayed by the display 616.
As shown in
The bus 622 may be coupled to an audio device 626, one or more disk drive(s) 628, and a network adapter 630 (which may be a NIC in an embodiment). In one embodiment, the network adapter 630 or other devices coupled to the bus 622 may communicate with the chipset 606. Also, various components (such as the network adapter 630) may be coupled to the GMCH 608 in some embodiments of the invention. In addition, the processor 602 and the GMCH 608 may be combined to form a single chip. In an embodiment, the memory controller 610 may be provided in one or more of the CPUs 602. Further, in an embodiment, GMCH 608 and ICH 620 may be combined into a Peripheral Control Hub (PCH).
Additionally, the computing system 600 may include volatile and/or nonvolatile memory (or storage). For example, nonvolatile memory may include one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), a disk drive (e.g., 628), a floppy disk, a compact disk ROM (CD-ROM), a digital versatile disk (DVD), flash memory, a magneto-optical disk, or other types of nonvolatile machine-readable media capable of storing electronic data (e.g., including instructions).
The memory 612 may include one or more of the following in an embodiment: an operating system (O/S) 632, application 634, directory 601, and/or device driver 636. The memory 612 may also include regions dedicated to Memory Mapped I/O (MMIO) operations. Programs and/or data stored in the memory 612 may be swapped into the disk drive 628 as part of memory management operations. The application(s) 634 may execute (e.g., on the processor(s) 602) to communicate one or more packets with one or more computing devices coupled to the network 605. In an embodiment, a packet may be a sequence of one or more symbols and/or values that may be encoded by one or more electrical signals transmitted from at least one sender to at least on receiver (e.g., over a network such as the network 605). For example, each packet may have a header that includes various information which may be utilized in routing and/or processing the packet, such as a source address, a destination address, packet type, etc. Each packet may also have a payload that includes the raw data (or content) the packet is transferring between various computing devices over a computer network (such as the network 605).
In an embodiment, the application 634 may utilize the O/S 632 to communicate with various components of the system 600, e.g., through the device driver 636. Hence, the device driver 636 may include network adapter 630 specific commands to provide a communication interface between the O/S 632 and the network adapter 630, or other I/O devices coupled to the system 600, e.g., via the chipset 606.
In an embodiment, the O/S 632 may include a network protocol stack. A protocol stack generally refers to a set of procedures or programs that may be executed to process packets sent over a network 605, where the packets may conform to a specified protocol. For example, TCP/IP (Transport Control Protocol/Internet Protocol) packets may be processed using a TCP/IP stack. The device driver 636 may indicate the buffers in the memory 612 that are to be processed, e.g., via the protocol stack.
The network 605 may include any type of computer network. The network adapter 630 may further include a direct memory access (DMA) engine, which writes packets to buffers (e.g., stored in the memory 612) assigned to available descriptors (e.g., stored in the memory 612) to transmit and/or receive data over the network 605. Additionally, the network adapter 630 may include a network adapter controller, which may include logic (such as one or more programmable processors) to perform adapter related operations. In an embodiment, the adapter controller may be a MAC (media access control) component. The network adapter 630 may further include a memory, such as any type of volatile/nonvolatile memory (e.g., including one or more cache(s) and/or other memory types discussed with reference to memory 612).
As illustrated in
In an embodiment, the processors 702 and 704 may be one of the processors 702 discussed with reference to
In at least one embodiment, a directory cache and/or logic may be provided in one or more of the processors 702, 704 and/or chipset 720. Other embodiments of the invention, however, may exist in other circuits, logic units, or devices within the system 700 of
The chipset 720 may communicate with the bus 740 using a PtP interface circuit 741. The bus 740 may have one or more devices that communicate with it, such as a bus bridge 742 and I/O devices 743. Via a bus 744, the bus bridge 742 may communicate with other devices such as a keyboard/mouse 745, communication devices 746 (such as modems, network interface devices, or other communication devices that may communicate with the computer network 705), audio I/O device, and/or a data storage device 748. The data storage device 748 may store code 749 that may be executed by the processors 702 and/or 704.
In various embodiments of the invention, the operations discussed herein, e.g., with reference to
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least an implementation. The appearances of the phrase “in one embodiment” in various places in the specification may or may not be all referring to the same embodiment.
Also, in the description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. In some embodiments of the invention, “connected” may be used to indicate that two or more elements are in direct physical or electrical contact with each other. “Coupled” may mean that two or more elements are in direct physical or electrical contact. However, “coupled” may also mean that two or more elements may not be in direct contact with each other, but may still cooperate or interact with each other.
Thus, although embodiments of the invention have been described in language specific to structural features and/or methodological acts, it is to be understood that claimed subject matter may not be limited to the specific features or acts described. Rather, the specific features and acts are disclosed as sample forms of implementing the claimed subject matter.