Embodiments of the invention described herein relate generally to the field of data prefetchers in a computer system. In particular, the disclosure relates to prefetching snapshots of data.
Modern multi-core processors typically include multi-level cache hierarchies and coherence protocols that are intended to keep data closer to the core(s). The goal here is to reduce data access latencies by utilizing the temporal and/or spatial localities that are typically present in neighboring data accesses. By storing data in local caches, performance is improved when subsequent accesses reference the same data (temporal locality) or nearby data (spatial locality) as previous accesses. To avoid conflicts among different copies of data, elaborate coherence protocols are often used to keep data consistent between the cores. In some cases, however, coherence protocols may unintentionally cause ownership of data, which is shared by multiple cores (e.g., a producer core and a consumer core), to be transferred back-and-forth between them. While maintaining data coherence and consistency is important, in some cases, however, a data requestor is only interested in obtaining the data rather than its ownership. In such scenarios, unnecessary ownership changes not only cause performance degradations in subsequent accesses, but also incur costs in power consumption, connection bandwidth, and cache space.
The invention may best be understood by referring to the following description and accompanying drawings that are used to illustrate embodiments of the invention. In the drawings:
Embodiments of system, method, and processor for utilizing snapshot operation to prefetch data for subsequent reads are described herein. In the following description, numerous specific details are set forth to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. For clarity, individual components in the Figures herein may be referred to by their labels in the Figures, rather than by a particular reference number.
Data movement services between cores of a multi-core processor (e.g., between producer cores and a consumer cores) move copies of data between them through read and write operations. For optimal performance, both producer and consumer cores save copies of data in their local caches based on locality considerations. However, as the cores seek and update data, these locality considerations are altered. For example, in some coherent memory architectures, the act of reading or updating data changes the data's coherency state and position in a cache hierarchy. In other situations, the messaging system running on a single cache-coherent domain (e.g., a processor) may unintentionally cause transfer of data ownership from one core to another, when in fact, it is only the data that needs to be transferred. These changes in locality consideration not only degrade performance, but also consume power, coherency bandwidth, and cache space.
To address this issue, a snapshot read operation (snapshot read) was realized. The snapshot read is a specialized data movement operation that moves a copy of the requested data from the source to the destination without altering the coherence and/or directory state of the requested data anywhere within the cache-coherent domain. The data being returned by the snapshot read is a snapshot of the content at the target memory address at the time when the read is performed. The snapshot read may be triggered by executing a snapshot instruction. According to an embodiment, the snapshot instruction specifies or identifies the target memory address from which a snapshot of the data is to be taken. When the snapshot instruction is decoded by a decoder and executed by an execution unit, the triggered snapshot read operation allows data to be read or sourced in situ with respect to the cache hierarchy and coherency. For example, a consumer, by executing a snapshot instruction, can read data from a producer without changing the coherence state and/or the location of the original data. There are numerous performance benefits of the snapshot read operation. In one aspect, since data accessed by the snapshot read operation is not stored into the consumer's cache, there is no risk of the snapshot read data displacing any of the currently cached data, where the absence of some may negatively impact performance (i.e. reduce capacity misses). Moreover, since the snapshot read does not change the coherence state of the original data, a core that currently has write access to the original data will not lose that access and thus avoids the cost of reacquiring that access during subsequent writes (i.e. read-for-ownership cost).
Illustrated in
In
Next, a copy of cache line 132 is provided to processor 2120 in a response to processor 2's read miss (operation 5). This copy of cache line 132 is saved into the local cache 122 as cache line copy 136 and marked as (S)hared. To summarize, as a result of the read issued by processor 2120, the cache coherence state of cache line 132 in producer's local cache 112 is changed (e.g., M→S or E→S), and a copy of the cache line 136 is cached into the consumer's local cache 122.
In contrast,
Initially, since the only valid instance of cache line 232 resides in the local cache 212 of processor 1210, the snapshot request issued by processor 2220 misses its local cache 222. This is illustrated by operation 1. Subsequent to the miss, home agent 202 may forward the snapshot request and/or issues a snoop to processor 1210. In some embodiments, the request or snoop to processor 1210 includes a hint indicating that only the data from the cache line is requested. Next, as shown in
By not disturbing the coherence state and the locality of the cache line that was accessed, the snapshot instruction significantly reduces the performance penalties associated with unnecessary cache line bouncing between the producer and the consumer. However, to preserve the benefits of the snapshot instruction, certain features within the processor, such as prefetchers, are disabled with respect to snapshot operations in order to avoid causing unnecessary movement of cache lines.
Normal load/store operations trigger prefetchers to prefetch extra cache lines in anticipation of future demands. This is crucial in hiding memory access latency and improving performance as cache lines are preemptively fetched and made available locally to the consuming core before they are actually needed. Prefetching data is especially important when the target cache lines are located far away from the consumer, such as in the system memory or in a remote core/socket. With snapshot read, due to its non-cache-coherent characteristic, conventional prefetchers cannot be triggered as they are today because doing so would cause unintentional and undesirable changes in the coherence state and/or location of the prefetched cache lines. For instance, when an application uses snapshot instructions to read data in a block of cache lines (snapshot read), cache lines located in nearby regions run the risk of becoming prefetch candidates if snapshot reads are taken into account by the prefetchers. When these neighboring cache lines are fetched by the prefetcher and stored into a local cache of the consumer, their coherence state and locality are necessarily altered. This directly contradicts one of the main benefits for using snapshot reads in the first place, which is to avoid unnecessary and unintended cache line movements within the cache hierarchy. As such, in order to preserve the benefits of snapshot read, conventional prefetchers should not be triggered when data are accessed via snapshot read.
Disabling prefetchers with respect to snapshot reads, however, is not without penalties. With prefetchers disabled, the use of snapshot reads suffers performance degradations in situations where a large contiguous patch of data is moved across producer and consumer cores. Understandably, this is because the usual benefits associated with prefetchers are no longer present. When the data is moved across different cores, due to long core-to-core latency (e.g., ˜120 cycles) and limited fill buffer (FB) capacity, there are usually not enough in-flight snapshot requests to hide the long latency and to maintain a desired throughput. This performance drop may even nullify the benefits of snapshot reads, if the total bandwidth to access a block of data via snapshot reads becomes less than the total bandwidth to access the same block of data with conventional reads/loads. It is, therefore, desirable that some form of data prefetching is maintained for snapshot reads, as prefetching introduces more in-flight operations than what is otherwise available to the core itself, thereby improves core-to-core bandwidth.
Aspects of the “snapshot prefetcher” described herein introduce a new form of data prefetching that takes into account snapshot reads. According to an embodiment, the snapshot prefetcher behaves differently than conventional prefetchers in that it complements the snapshot instruction by prefetching data using snapshot reads and thereby avoiding making unintentional changes to the coherence state and/or the locality of the original cache line. In other words, the snapshot prefetcher provides the same performance benefits as regular, conventional prefetchers while preserving the desired behavior of the snapshot instruction.
The instructions and data stored within the various processor caches and buffers are managed at the granularity of cache lines which may be a fixed size (e.g., 64, 128, or 512 bytes in length). Each node of the exemplary embodiments further includes an instruction fetch unit 310 for fetching instructions from main memory 324 via memory controller 322 and/or from the shared LLC 313 via L3/LLC agent 316; a decoder 330 for decoding the instructions (e.g., decoding program instructions into micro-operations or “uops”); an execution unit 340 for executing the decoded instructions; and a writeback unit 350 for retiring the instructions and writing back the results (e.g., to main memory 324). Furthermore, decoder 330 may include specific logic or circuitry 335 for decoding snapshot instructions into micro-operations such as snapshot operations. Similarly, the execution unit may also include specific logic or circuitry 345 for executing the decoded snapshot instructions by performing one or more snapshot operations, such as initiating a snapshot read to read data. The snapshot instruction may include one or more operand. At least one of the operands may specify the memory address of a cache line from which data is to be read.
According to some embodiments, each node of processor 360 also includes one or more snapshot prefetchers 370. The snapshot prefetcher may be implemented as software program, hardware circuits or circuitry, or a combination of both. The snapshot prefetcher and/or its functions may be implemented as a standalone prefetcher or included as part of existing prefetchers. In some embodiments the snapshot prefetcher monitors and tracks the data access patterns within the node by monitoring the execution of snapshot instructions, including the associated operations, by the node. When a snapshot read access stream is detected, the snapshot prefetcher issues snapshot prefetch requests based on the detected access stream to bring data into storage location(s) local to the node. The local storage locations may include dedicated buffers such as snapshot buffer 371, existing buffers such as fill buffers 314-316, and/or local caches such as L1/L2/L3 cache 311-313. It is important to note that if existing buffers or local caches are used to store the data prefetched by snapshot read, additional mechanisms, as will be detailed below, are utilized to ensure that these data are not treated like normal prefetched data.
The snapshot tracker 410 monitors snapshot reads to detect snapshot read access streams. This may include monitoring the instructions executed by the execution unit or monitoring the bus for snapshot read requests. Once a snapshot read access stream has been detected by the snapshot tracker 410, the snapshot prefetch issuer 420 issues snapshot prefetch requests to prefetch data in accordance to the detected access stream. For instance, the snapshot prefetch issuer 420 may issue a snapshot read request to fetch the next cache line to be accessed in the detected access stream. The fetched cache line is stored in a snapshot buffer.
The snapshot prefetch throttling unit 430 monitors the effectiveness and/or the resource usage by the snapshot prefetcher and modifies the behavior of the snapshot prefetcher accordingly. In one embodiment, the snapshot prefetch throttling unit 430 includes one or more counters to track the number of cache lines prefetched by the snapshot prefetcher and the number of prefetched cache lines that are actually being used to fill snapshot read requests. If a large portion of the prefetched cache lines are being timed-out or evicted before they are accessed, the snapshot prefetch throttling unit 430 may adjust the prefetching parameters, such as the training-to-prefetch threshold, to make the prefetcher operate less aggressively. On the other hand, if a high percentage of the prefetched cache lines are being accessed by snapshot read requests, the snapshot prefetchers may increase the prefetching activities.
According to an embodiment, the snapshot prefetcher monitors and tracks only the cache line accesses that are triggered by snapshot instructions (e.g., snapshot reads). When the snapshot prefetcher detects a snapshot read access stream, it issues snapshot read requests based on the detected stream to speculatively fetch data from cache lines or memory locations that are likely to be accessed in the future. The snapshot prefetcher may be implemented as a new prefetcher that is separate from existing prefetchers.
In some embodiments, existing prefetchers (e.g., data prefetchers for level 1 and/or level 2 cache) are modified to include the functionality of a snapshot prefetcher, by taking into account snapshot reads when making prefetch decisions. For instance, existing prefetchers may monitor both normal access requests and snapshot read requests but keeps track of them separately. When an access stream based only on normal access requests is detected, the prefetcher issues regular prefetch requests to retrieve the target cache lines and store them in the local cache as normal. On the other hand, when the detected access stream is based solely on snapshot read requests, instead of issuing regular load/read request, a snapshot read request is used to prefetch data from the target cache line into a local storage location (snapshot buffer) in the requesting core. The target cache line may be fetched form one of the cores or the system memory. No change is made to the cache coherence state and the locality of the target cache line. It is important to note that the data prefetched via the snapshot read request do not participate in the cache coherence protocol. The data fetched via the snapshot read is stored in the snapshot buffer and is only available to serve subsequent snapshot reads. According to an embodiment, the prefetched data remains in the snapshot buffer until it is displaced or evicted by other prefetched data or has timed-out. In some embodiments, the stored data may also be removed from the prefetch buffer once they are read by subsequent snapshot reads.
In one embodiment, data fetched via the snapshot reads may be stored in a local cache, such as the L2 cache. Since caches are typically larger than buffers, this approach would enable large amount of data to be stored. According to the embodiment, an alias table is used to provide the address remapping for the data fetched via the snapshot reads, including those made by the snapshot prefetcher. Specifically, the alias table contains the dynamic mappings of target memory regions to private memory regions. Private memory regions are those that are part of the system memory address space but are specifically set aside and not typically accessed. One or more core-specific register (CSR) may be used to specify the portions of the system memory address space that are to be used as private memory regions. The use of the alias table allows the private memory regions to be dynamically recycled and remapped to different target memory ranges. In operation, data fetched via snapshot reads are stored directly to aliased memory addressees in the private memory region. When fulfilling a snapshot read request, the alias table is consulted and the target address in the snapshot read request is translated to the aliased memory address in the private memory region for retrieving data from the private memory region. The alias table need not be very big and may contain only enough entries (e.g., 1-8 entries) to accommodate active snapshot read requests.
Data stored in the snapshot buffers should be carefully managed because the snapshot buffer is likely to be small and, in the case of a shared buffer, will take resources away from other functions. Moreover, since data obtained via snapshot reads are not in the coherent domain and do not participate in the coherence protocol, any subsequent updates to the original data will not be reflected in the data in the snapshot buffer. As such, data in the snapshot buffer should be actively cleaned up to prevent very staled data being used to fill snapshot read requests. In the case where a shared buffer, such as the fill buffer, is used, snapshot prefetched lines should only occupy, at most, a limited portion of the shared buffer regardless of whether free entries are available. This constraint is to prevent potential live-lock situation where new snapshot read requests are waiting for fill buffer entries because they are all already occupied by snapshot read requests. The constraint is also intended to limit potential performance impact for other instructions as snapshot fetched lines are not allocated to cache like other lines and thus tend to spend more time in the shared buffer.
According to an embodiment, a cache line that is fetched via a snapshot read request may be deallocated from the snapshot buffer in the following scenarios:
An example of the present invention is an apparatus that includes a snapshot read tracking circuitry and a snapshot prefetch issuing circuitry. The snapshot read tracking circuitry tracks snapshot read requests made by a first processor core to read a plurality of cache lines. The snapshot read tracking circuitry may detect a snapshot read access stream based on the tracked snapshot read requests. Once a snapshot read access stream is detected, the snapshot prefetch issuing circuitry issues one or more snapshot prefetch requests based on the detected snapshot read access stream. The one or more snapshot prefetch requests includes at least a first snapshot prefetch request that is to prefetch data from a first cache line stored in, and owned exclusively by, a first storage location outside the first processor core. The prefetched data is to be stored in a second storage location within the first processor core. After the prefetch, exclusive ownership of the first cache line is to remain with the first storage location.
Each of the plurality of cache lines read by the first processor core via a snapshot read request may be associated with a respective cache coherence state. A snapshot read request is a request that, when executed, causes data stored in a target cache line to be read in a way such that after the data is read, the cache coherence state associated with the target cache line and the location in which the target cache line is stored are to remain the same. The first storage location that is outside the first processor core may be a cache of a second processor or may be the system memory that is shared by the first and second processor core. Each entry in the second storage location may include an indicator to indicate whether data stored in the entry is snapshot prefetched data. Snapshot prefetched data may only be used to fill snapshot read requests issued by the first processor core. Snapshot prefetched data may be removed from the second storage location if: 1) the snapshot prefetched data is accessed by a subsequent snapshot read request; 2) the snapshot prefetched data is evicted in accordance to an eviction policy associated with the second storage location; or 3) the snapshot prefetched data has timed out.
The apparatus may further include a snapshot prefetch throttling circuitry to track the ratio between the number of snapshot prefetched data in the second storage that have been accessed by subsequent snapshot read requests and the number of snapshot prefetched data that have been evicted from the second storage location or have timed out. Based on this ratio, the snapshot prefetch throttling circuitry may adjust the rate at which the snapshot prefetch circuitry issues snapshot prefetch requests.
Another example of the present invention is a method that includes: tracking snapshot read requests made by a first processor core to read a plurality of cache lines; detecting a snapshot read access stream based on the tracked snapshot read requests; and issuing, based on the detected snapshot read access stream, one or more snapshot prefetch requests, including a first snapshot prefetch request to prefetch data from a first cache line that is stored in, and owned exclusively by, a first storage location outside the first processor core. The exclusive ownership of the first cache line is to remain with the first storage location after the prefetch of data from the first cache line. The method further includes storing the prefetched data in a second storage location within the first processor core. The first storage location that is outside the first processor core may be a cache of a second processor or may be the system memory that is shared by the first and second processor core. The method may further include updating an indicator of an entry in second storage location to indicate that data stored in the entry is snapshot prefetched data. Snapshot prefetched data may only be used to fill snapshot read requests issued by the first processor core. The method may further includes removing snapshot prefetched data from the second storage location when: 1) the snapshot prefetched data has been accessed by a subsequent snapshot read request; 2) the snapshot prefetched data is evicted in accordance to an eviction policy associated with the second storage location; or 3) the snapshot prefetched data has timed out. In addition, the method may include tracking the ratio between the number of snapshot prefetched data in the second storage that have been accessed by subsequent snapshot read requests and the number of snapshot prefetched data that have been evicted from the second storage location or have timed out, and responsively adjusting a rate at which the snapshot prefetch requests are issued.
Yet another example of the present invention is a system that includes a system memory, a first processor core, snapshot read tracking circuitry, and snapshot prefetch issuing circuitry. The snapshot read tracking circuitry tracks snapshot read requests made by a first processor core to read a plurality of cache lines. The snapshot read tracking circuitry may detect a snapshot read access stream based on the tracked snapshot read requests. Once a snapshot read access stream is detected, the snapshot prefetch issuing circuitry issues one or more snapshot prefetch requests based on the detected snapshot read access stream. The one or more snapshot prefetch requests includes at least a first snapshot prefetch request that is to prefetch data from a first cache line stored in, and owned exclusively by, a first storage location outside the first processor core. The prefetched data is to be stored in a second storage location within the first processor core. After the prefetch, exclusive ownership of the first cache line is to remain with the first storage location.
Each of the plurality of cache lines read by the first processor core via a snapshot read request may be associated with a respective cache coherence state. A snapshot read request is a request that, when executed, causes data stored in a target cache line to be read in a way such that after the data is read, the cache coherence state associated with the target cache line and the location in which the target cache line is stored are to remain the same. The first storage location that is outside the first processor core may be a cache of a second processor or may be the system memory that is shared by the first and second processor core. Each entry in the second storage location may include an indicator to indicate whether data stored in the entry is snapshot prefetched data. Snapshot prefetched data may only be used to fill snapshot read requests issued by the first processor core. Snapshot prefetched data may be removed from the second storage location if: 1) the snapshot prefetched data is accessed by a subsequent snapshot read request; 2) the snapshot prefetched data is evicted in accordance to an eviction policy associated with the second storage location; or 3) the snapshot prefetched data has timed out.
The system may further include a snapshot prefetch throttling circuitry to track the ratio between the number of snapshot prefetched data in the second storage that have been accessed by subsequent snapshot read requests and the number of snapshot prefetched data that have been evicted from the second storage location or have timed out. Based on this ratio, the snapshot prefetch throttling circuitry may adjust the rate at which the snapshot prefetch circuitry issues snapshot prefetch requests.
An additional example of the present invention is a computer- or machine-readable medium having code or program stored thereon which, when executed by the computer or machine, cause the computer or machine to perform a series of operations that includes: tracking snapshot read requests made by a first processor core to read a plurality of cache lines; detecting a snapshot read access stream based on the tracked snapshot read requests; and issuing, based on the detected snapshot read access stream, one or more snapshot prefetch requests, including a first snapshot prefetch request to prefetch data from a first cache line that is stored in, and owned exclusively by, a first storage location outside the first processor core. The exclusive ownership of the first cache line is to remain with the first storage location after the prefetch of data from the first cache line. The series of operations may additionally include storing the prefetched data in a second storage location within the first processor core. The first storage location that is outside the first processor core may be a cache of a second processor or may be the system memory that is shared by the first and second processor core. The series of operations may further include updating an indicator of an entry in second storage location to indicate that data stored in the entry is snapshot prefetched data. Snapshot prefetched data may only be used to fill snapshot read requests issued by the first processor core. The series of operations may further include removing snapshot prefetched data from the second storage location when: 1) the snapshot prefetched data has been accessed by a subsequent snapshot read request; 2) the snapshot prefetched data is evicted in accordance to an eviction policy associated with the second storage location; or 3) the snapshot prefetched data has timed out. In addition, the series of operations may include tracking the ratio between the number of snapshot prefetched data in the second storage that have been accessed by subsequent snapshot read requests and the number of snapshot prefetched data that have been evicted from the second storage location or have timed out, and responsively adjusting a rate at which the snapshot prefetch requests are issued.
In
The front end hardware 830 includes a branch prediction hardware 832 coupled to an instruction cache hardware 834, which is coupled to an instruction translation lookaside buffer (TLB) 836, which is coupled to an instruction fetch hardware 838, which is coupled to a decode hardware 840. The decode hardware 840 (or decoder) may decode instructions, and generate as an output one or more micro-operations, micro-code entry points, microinstructions, other instructions, or other control signals, which are decoded from, or which otherwise reflect, or are derived from, the original instructions. The decode hardware 840 may be implemented using various different mechanisms. Examples of suitable mechanisms include, but are not limited to, look-up tables, hardware implementations, programmable logic arrays (PLAs), microcode read only memories (ROMs), etc. In one embodiment, the core 890 includes a microcode ROM or other medium that stores microcode for certain macroinstructions (e.g., in decode hardware 840 or otherwise within the front end hardware 830). The decode hardware 840 is coupled to a rename/allocator hardware 852 in the execution engine hardware 850.
The execution engine hardware 850 includes the rename/allocator hardware 852 coupled to a retirement hardware 854 and a set of one or more scheduler hardware 856. The scheduler hardware 856 represents any number of different schedulers, including reservations stations, central instruction window, etc. The scheduler hardware 856 is coupled to the physical register file(s) hardware 858. Each of the physical register file(s) hardware 858 represents one or more physical register files, different ones of which store one or more different data types, such as scalar integer, scalar floating point, packed integer, packed floating point, vector integer, vector floating point, status (e.g., an instruction pointer that is the address of the next instruction to be executed), etc. In one embodiment, the physical register file(s) hardware 858 comprises a vector registers hardware, a write mask registers hardware, and a scalar registers hardware. This register hardware may provide architectural vector registers, vector mask registers, and general purpose registers. The physical register file(s) hardware 858 is overlapped by the retirement hardware 854 to illustrate various ways in which register renaming and out-of-order execution may be implemented (e.g., using a reorder buffer(s) and a retirement register file(s); using a future file(s), a history buffer(s), and a retirement register file(s); using a register maps and a pool of registers; etc.). The retirement hardware 854 and the physical register file(s) hardware 858 are coupled to the execution cluster(s) 860. The execution cluster(s) 860 includes a set of one or more execution hardware 862 and a set of one or more memory access hardware 864. The execution hardware 862 may perform various operations (e.g., shifts, addition, subtraction, multiplication) and on various types of data (e.g., scalar floating point, packed integer, packed floating point, vector integer, vector floating point). While some embodiments may include a number of execution hardware dedicated to specific functions or sets of functions, other embodiments may include only one execution hardware or multiple execution hardware that all perform all functions. The scheduler hardware 856, physical register file(s) hardware 858, and execution cluster(s) 860 are shown as being possibly plural because certain embodiments create separate pipelines for certain types of data/operations (e.g., a scalar integer pipeline, a scalar floating point/packed integer/packed floating point/vector integer/vector floating point pipeline, and/or a memory access pipeline that each have their own scheduler hardware, physical register file(s) hardware, and/or execution cluster—and in the case of a separate memory access pipeline, certain embodiments are implemented in which only the execution cluster of this pipeline has the memory access hardware 864). It should also be understood that where separate pipelines are used, one or more of these pipelines may be out-of-order issue/execution and the rest in-order.
The set of memory access hardware 864 is coupled to the memory hardware 870, which includes a data TLB hardware 872 coupled to a data cache hardware 874 coupled to a level 2 (L2) cache hardware 876. In one exemplary embodiment, the memory access hardware 864 may include a load hardware, a store address hardware, and a store data hardware, each of which is coupled to the data TLB hardware 872 in the memory hardware 870. The instruction cache hardware 834 is further coupled to a level 2 (L2) cache hardware 876 in the memory hardware 870. The L2 cache hardware 876 is coupled to one or more other levels of cache and eventually to a main memory.
By way of example, the exemplary register renaming, out-of-order issue/execution core architecture may implement the pipeline 800 as follows: 1) the instruction fetch 838 performs the fetch and length decoding stages 802 and 804; 2) the decode hardware 840 performs the decode stage 806; 3) the rename/allocator hardware 852 performs the allocation stage 808 and renaming stage 810; 4) the scheduler hardware 856 performs the schedule stage 812; 5) the physical register file(s) hardware 858 and the memory hardware 870 perform the register read/memory read stage 814; the execution cluster 860 perform the execute stage 816; 6) the memory hardware 870 and the physical register file(s) hardware 858 perform the write back/memory write stage 818; 7) various hardware may be involved in the exception handling stage 822; and 8) the retirement hardware 854 and the physical register file(s) hardware 858 perform the commit stage 824.
The core 890 may support one or more instructions sets (e.g., the x86 instruction set (with some extensions that have been added with newer versions); the MIPS instruction set of MIPS Technologies of Sunnyvale, Calif.; the ARM instruction set (with optional additional extensions such as NEON) of ARM Holdings of Sunnyvale, Calif.), including the instruction(s) described herein. In one embodiment, the core 890 includes logic to support a packed data instruction set extension (e.g., AVX1, AVX2, and/or some form of the generic vector friendly instruction format (U=0 and/or U=1), described below), thereby allowing the operations used by many multimedia applications to be performed using packed data.
It should be understood that the core may support multithreading (executing two or more parallel sets of operations or threads), and may do so in a variety of ways including time sliced multithreading, simultaneous multithreading (where a single physical core provides a logical core for each of the threads that physical core is simultaneously multithreading), or a combination thereof (e.g., time sliced fetching and decoding and simultaneous multithreading thereafter such as in the Intel® Hyperthreading technology).
While register renaming is described in the context of out-of-order execution, it should be understood that register renaming may be used in an in-order architecture. While the illustrated embodiment of the processor also includes separate instruction and data cache hardware 834/874 and a shared L2 cache hardware 876, alternative embodiments may have a single internal cache for both instructions and data, such as, for example, a Level 1 (L1) internal cache, or multiple levels of internal cache. In some embodiments, the system may include a combination of an internal cache and an external cache that is external to the core and/or the processor. Alternatively, all of the cache may be external to the core and/or the processor.
Thus, different implementations of the processor 900 may include: 1) a CPU with the special purpose logic 908 being integrated graphics and/or scientific (throughput) logic (which may include one or more cores), and the cores 902A-N being one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, a combination of the two); 2) a coprocessor with the cores 902A-N being a large number of special purpose cores intended primarily for graphics and/or scientific (throughput); and 3) a coprocessor with the cores 902A-N being a large number of general purpose in-order cores. Thus, the processor 900 may be a general-purpose processor, coprocessor or special-purpose processor, such as, for example, a network or communication processor, compression engine, graphics processor, GPGPU (general purpose graphics processing unit), a high-throughput many integrated core (MIC) coprocessor (including 30 or more cores), embedded processor, or the like. The processor may be implemented on one or more chips. The processor 900 may be a part of and/or may be implemented on one or more substrates using any of a number of process technologies, such as, for example, BiCMOS, CMOS, or NMOS.
The memory hierarchy includes one or more levels of cache within the cores, a set or one or more shared cache hardware 906, and external memory (not shown) coupled to the set of integrated memory controller hardware 914. The set of shared cache hardware 906 may include one or more mid-level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, a last level cache (LLC), and/or combinations thereof. While in one embodiment a ring based interconnect hardware 912 interconnects the integrated graphics logic 908, the set of shared cache hardware 906, and the system agent hardware 910/integrated memory controller hardware 914, alternative embodiments may use any number of well-known techniques for interconnecting such hardware. In one embodiment, coherency is maintained between one or more cache hardware 906 and cores 902-A-N.
In some embodiments, one or more of the cores 902A-N are capable of multi-threading. The system agent 910 includes those components coordinating and operating cores 902A-N. The system agent hardware 910 may include for example a power control unit (PCU) and a display hardware. The PCU may be or include logic and components needed for regulating the power state of the cores 902A-N and the integrated graphics logic 908. The display hardware is for driving one or more externally connected displays.
The cores 902A-N may be homogenous or heterogeneous in terms of architecture instruction set; that is, two or more of the cores 902A-N may be capable of execution the same instruction set, while others may be capable of executing only a subset of that instruction set or a different instruction set. In one embodiment, the cores 902A-N are heterogeneous and include both the “small” cores and “big” cores described below.
Referring now to
The optional nature of additional processors 1015 is denoted in
The memory 1040 may be, for example, dynamic random access memory (DRAM), phase change memory (PCM), or a combination of the two. For at least one embodiment, the controller hub 1020 communicates with the processor(s) 1010, 1015 via a multi-drop bus, such as a frontside bus (FSB), point-to-point interface, or similar connection 1095.
In one embodiment, the coprocessor 1045 is a special-purpose processor, such as, for example, a high-throughput MIC processor, a network or communication processor, compression engine, graphics processor, GPGPU, embedded processor, or the like. In one embodiment, controller hub 1020 may include an integrated graphics accelerator.
There can be a variety of differences between the physical resources 1010, 1015 in terms of a spectrum of metrics of merit including architectural, microarchitectural, thermal, power consumption characteristics, and the like.
In one embodiment, the processor 1010 executes instructions that control data processing operations of a general type. Embedded within the instructions may be coprocessor instructions. The processor 1010 recognizes these coprocessor instructions as being of a type that should be executed by the attached coprocessor 1045. Accordingly, the processor 1010 issues these coprocessor instructions (or control signals representing coprocessor instructions) on a coprocessor bus or other interconnect, to coprocessor 1045. Coprocessor(s) 1045 accept and execute the received coprocessor instructions.
Referring now to
Processors 1170 and 1180 are shown including integrated memory controller (IMC) hardware 1172 and 1182, respectively. Processor 1170 also includes as part of its bus controller hardware point-to-point (P-P) interfaces 1176 and 1178; similarly, second processor 1180 includes P-P interfaces 1186 and 1188. Processors 1170, 1180 may exchange information via a point-to-point (P-P) interface 1150 using P-P interface circuits 1178, 1188. As shown in
Processors 1170, 1180 may each exchange information with a chipset 1190 via individual P-P interfaces 1152, 1154 using point to point interface circuits 1176, 1194, 1186, 1198. Chipset 1190 may optionally exchange information with the coprocessor 1138 via a high-performance interface 1139. In one embodiment, the coprocessor 1138 is a special-purpose processor, such as, for example, a high-throughput MIC processor, a network or communication processor, compression engine, graphics processor, GPGPU, embedded processor, or the like.
A shared cache (not shown) may be included in either processor or outside of both processors, yet connected with the processors via P-P interconnect, such that either or both processors' local cache information may be stored in the shared cache if a processor is placed into a low power mode.
Chipset 1190 may be coupled to a first bus 1116 via an interface 1196. In one embodiment, first bus 1116 may be a Peripheral Component Interconnect (PCI) bus, or a bus such as a PCI Express bus or another third generation I/O interconnect bus, although the scope of the present invention is not so limited.
As shown in
Referring now to
Referring now to
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementation approaches. Embodiments of the invention may be implemented as computer programs or program code executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code, such as code 1130 illustrated in
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code may also be implemented in assembly or machine language, if desired. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
One or more aspects of at least one embodiment may be implemented by representative instructions stored on a machine-readable medium which represents various logic within the processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. Such representations, known as “IP cores” may be stored on a tangible, machine readable medium and supplied to various customers or manufacturing facilities to load into the fabrication machines that actually make the logic or processor.
Such machine-readable storage media may include, without limitation, non-transitory, tangible arrangements of articles manufactured or formed by a machine or device, including storage media such as hard disks, any other type of disk including floppy disks, optical disks, compact disk read-only memories (CD-ROMs), compact disk rewritable's (CD-RWs), and magneto-optical disks, semiconductor devices such as read-only memories (ROMs), random access memories (RAMs) such as dynamic random access memories (DRAMs), static random access memories (SRAMs), erasable programmable read-only memories (EPROMs), flash memories, electrically erasable programmable read-only memories (EEPROMs), phase change memory (PCM), magnetic or optical cards, or any other type of media suitable for storing electronic instructions.
Accordingly, embodiments of the invention also include non-transitory, tangible machine-readable media containing instructions or containing design data, such as Hardware Description Language (HDL), which defines structures, circuits, apparatuses, processors and/or system features described herein. Such embodiments may also be referred to as program products.
In some cases, an instruction converter may be used to convert an instruction from a source instruction set to a target instruction set. For example, the instruction converter may translate (e.g., using static binary translation, dynamic binary translation including dynamic compilation), morph, emulate, or otherwise convert an instruction to one or more other instructions to be processed by the core. The instruction converter may be implemented in software, hardware, firmware, or a combination thereof. The instruction converter may be on processor, off processor, or part on and part off processor.
Although some embodiments have been described in reference to particular implementations, other implementations are possible according to some embodiments. Additionally, the arrangement and/or order of elements or other features illustrated in the drawings and/or described herein need not be arranged in the particular way illustrated and described. Many other arrangements are possible according to some embodiments.
In each system shown in a figure, the elements in some cases may each have a same reference number or a different reference number to suggest that the elements represented could be different and/or similar. However, an element may be flexible enough to have different implementations and work with some or all of the systems shown or described herein. The various elements shown in the figures may be the same or different. Which one is referred to as a first element and which is called a second element is arbitrary.
In the description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. It should be understood that these terms are not intended as synonyms for each other. Rather, in particular embodiments, “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 are not in direct contact with each other, but yet still co-operate or interact with each other.
An embodiment is an implementation or example of the inventions. Reference in the specification to “an embodiment,” “one embodiment,” “some embodiments,” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments, of the inventions. The various appearances “an embodiment,” “one embodiment,” or “some embodiments” are not necessarily all referring to the same embodiments.
Not all components, features, structures, characteristics, etc. described and illustrated herein need be included in a particular embodiment or embodiments. If the specification states a component, feature, structure, or characteristic “may”, “might”, “can” or “could” be included, for example, that particular component, feature, structure, or characteristic is not required to be included. If the specification or claim refers to “a” or “an” element, that does not mean there is only one of the element. If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional element.
The above description of illustrated embodiments of the invention, including what is described in the Abstract, is not intended to be exhaustive or to limit the invention to the precise forms disclosed. While specific embodiments of, and examples for, the invention are described herein for illustrative purposes, various equivalent modifications are possible within the scope of the invention, as those skilled in the relevant art will recognize.
These modifications can be made to the invention in light of the above detailed description. The terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification and the drawings. Rather, the scope of the invention is to be determined entirely by the following claims, which are to be construed in accordance with established doctrines of claim interpretation.