This invention relates generally to the field of computer systems. More particularly, the invention relates to an apparatus and method for implementing a multi-level memory hierarchy.
Current Memory and Storage Configurations
One of the limiting factors for computer innovation today is memory and storage technology. In conventional computer systems, system memory (also known as main memory, primary memory, executable memory) is typically implemented by dynamic random access memory (DRAM). DRAM-based memory consumes power even when no memory reads or writes occur because it must constantly recharge internal capacitors. DRAM-based memory is volatile, which means data stored in DRAM memory is lost once the power is removed. Conventional computer systems also rely on multiple levels of caching to improve performance. A cache is a high speed memory positioned between the processor and system memory to service memory access requests faster than they could be serviced from system memory. Such caches are typically implemented with static random access memory (SRAM). Cache management protocols may be used to ensure that the most frequently accessed data and instructions are stored within one of the levels of cache, thereby reducing the number of memory access transactions and improving performance.
With respect to mass storage (also known as secondary storage or disk storage), conventional mass storage devices typically include magnetic media (e.g., hard disk drives), optical media (e.g., compact disc (CD) drive, digital versatile disc (DVD), etc.), holographic media, and/or mass-storage flash memory (e.g., solid state drives (SSDs), removable flash drives, etc.). Generally, these storage devices are considered Input/Output (I/O) devices because they are accessed by the processor through various I/O adapters that implement various I/O protocols. These I/O adapters and I/O protocols consume a significant amount of power and can have a significant impact on the die area and the form factor of the platform. Portable or mobile devices (e.g., laptops, netbooks, tablet computers, personal digital assistant (PDAs), portable media players, portable gaming devices, digital cameras, mobile phones, smartphones, feature phones, etc.) that have limited battery life when not connected to a permanent power supply may include removable mass storage devices (e.g., Embedded Multimedia Card (eMMC), Secure Digital (SD) card) that are typically coupled to the processor via low-power interconnects and I/O controllers in order to meet active and idle power budgets.
With respect to firmware memory (such as boot memory (also known as BIOS flash)), a conventional computer system typically uses flash memory devices to store persistent system information that is read often but seldom (or never) written to. For example, the initial instructions executed by a processor to initialize key system components during a boot process (Basic Input and Output System (BIOS) images) are typically stored in a flash memory device. Flash memory devices that are currently available in the market generally have limited speed (e.g., 50 MHz). This speed is further reduced by the overhead for read protocols (e.g., 2.5 MHz). In order to speed up the BIOS execution speed, conventional processors generally cache a portion of BIOS code during the Pre-Extensible Firmware Interface (PEI) phase of the boot process. The size of the processor cache places a restriction on the size of the BIOS code used in the PEI phase (also known as the “PEI BIOS code”).
B. Phase-Change Memory (PCM) and Related Technologies
Phase-change memory (PCM), also sometimes referred to as phase change random access memory (PRAM or PCRAM), PCME, Ovonic Unified Memory, or Chalcogenide RAM (C-RAM), is a type of non-volatile computer memory which exploits the unique behavior of chalcogenide glass. As a result of heat produced by the passage of an electric current, chalcogenide glass can be switched between two states: crystalline and amorphous. Recent versions of PCM can achieve two additional distinct states.
PCM provides higher performance than flash because the memory element of PCM can be switched more quickly, writing (changing individual bits to either 1 or 0) can be done without the need to first erase an entire block of cells, and degradation from writes is slower (a PCM device may survive approximately 100 million write cycles; PCM degradation is due to thermal expansion during programming, metal (and other material) migration, and other mechanisms).
The following description and accompanying drawings are used to illustrate embodiments of the invention. In the drawings:
In the following description, numerous specific details such as logic implementations, opcodes, means to specify operands, resource partitioning/sharing/duplication implementations, types and interrelationships of system components, and logic partitioning/integration choices are set forth in order to provide a more thorough understanding of the present invention. It will be appreciated, however, by one skilled in the art that the invention may be practiced without such specific details. In other instances, control structures, gate level circuits and full software instruction sequences have not been shown in detail in order not to obscure the invention. Those of ordinary skill in the art, with the included descriptions, will be able to implement appropriate functionality without undue experimentation.
References in the specification to “one embodiment,” “an embodiment,” “an example embodiment,” etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
In the following 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. “Coupled” is used to indicate that two or more elements, which may or may not be in direct physical or electrical contact with each other, co-operate or interact with each other. “Connected” is used to indicate the establishment of communication between two or more elements that are coupled with each other.
Bracketed text and blocks with dashed borders (e.g., large dashes, small dashes, dot-dash, dots) are sometimes used herein to illustrate optional operations/components that add additional features to embodiments of the invention. However, such notation should not be taken to mean that these are the only options or optional operations/components, and/or that blocks with solid borders are not optional in certain embodiments of the invention.
Memory capacity and performance requirements continue to increase with an increasing number of processor cores and new usage models such as virtualization. In addition, memory power and cost have become a significant component of the overall power and cost, respectively, of electronic systems.
Some embodiments of the invention solve the above challenges by intelligently subdividing the performance requirement and the capacity requirement between memory technologies. The focus of this approach is on providing performance with a relatively small amount of a relatively higher-speed memory such as DRAM while implementing the bulk of the system memory using significantly cheaper and denser non-volatile random access memory (NVRAM). Embodiments of the invention described below define platform configurations that enable hierarchical memory subsystem organizations for the use of NVRAM. The use of NVRAM in the memory hierarchy also enables new usages such as expanded boot space and mass storage implementations, as described in detail below.
A. Non-Volatile Random Access Memory (“NVRAM”)
There are many possible technology choices for NVRAM, including PCM, Phase Change Memory and Switch (PCMS) (the latter being a more specific implementation of the former), byte-addressable persistent memory (BPRAM), storage class memory (SCM), universal memory, Ge2Sb2Te5, programmable metallization cell (PMC), resistive memory (RRAM), RESET (amorphous) cell, SET (crystalline) cell, PCME, Ovshinsky memory, ferroelectric memory (also known as polymer memory and poly(N-vinylcarbazole)), ferromagnetic memory (also known as Spintronics, SPRAM (spin-transfer torque RAM), STRAM (spin tunneling RAM), magnetoresistive memory, magnetic memory, magnetic random access memory (MRAM)), and Semiconductor-oxide-nitride-oxide-semiconductor (SONOS, also known as dielectric memory).
NVRAM has the following characteristics:
(1) It maintains its content even if power is removed, similar to FLASH memory used in solid state disks (SSD), and different from SRAM and DRAM which are volatile;
(2) lower power consumption than volatile memories such as SRAM and DRAM;
(3) random access similar to SRAM and DRAM (also known as randomly addressable);
(4) rewritable and erasable at a lower level of granularity (e.g., byte level) than FLASH found in SSDs (which can only be rewritten and erased a “block” at a time—minimally 64 Kbyte in size for NOR FLASH and 16 Kbyte for NAND FLASH);
(5) used as a system memory and allocated all or a portion of the system memory address space;
(6) capable of being coupled to the processor over a bus using a transactional protocol (a protocol that supports transaction identifiers (IDs) to distinguish different transactions so that those transactions can complete out-of-order) and allowing access at a level of granularity small enough to support operation of the NVRAM as system memory (e.g., cache line size such as 64 or 128 byte). For example, the bus may be a memory bus (e.g., a DDR bus such as DDR3, DDR4, etc.) over which is run a transactional protocol as opposed to the non-transactional protocol that is normally used. As another example, the bus may one over which is normally run a transactional protocol (a native transactional protocol), such as a PCI express (PCIE) bus, desktop management interface (DMI) bus, or any other type of bus utilizing a transactional protocol and a small enough transaction payload size (e.g., cache line size such as 64 or 128 byte); and
(6) one or more of the following:
a) faster write speed than non-volatile memory/storage technologies such as FLASH;
b) very high read speed (faster than FLASH and near or equivalent to DRAM read speeds);
c) directly writable (rather than requiring erasing (overwriting with 1s) before writing data like FLASH memory used in SSDs);
d) a greater number of writes before failure (more than boot ROM and FLASH used in SSDs); and/or
As mentioned above, in contrast to FLASH memory, which must be rewritten and erased a complete “block” at a time, the level of granularity at which NVRAM is accessed in any given implementation may depend on the particular memory controller and the particular memory bus or other type of bus to which the NVRAM is coupled. For example, in some implementations where NVRAM is used as system memory, the NVRAM may be accessed at the granularity of a cache line (e.g., a 64-byte or 128-Byte cache line), notwithstanding an inherent ability to be accessed at the granularity of a byte, because cache line is the level at which the memory subsystem accesses memory. Thus, when NVRAM is deployed within a memory subsystem, it may be accessed at the same level of granularity as the DRAM (e.g., the “near memory”) used in the same memory subsystem. Even so, the level of granularity of access to the NVRAM by the memory controller and memory bus or other type of bus is smaller than that of the block size used by Flash and the access size of the I/O subsystem's controller and bus.
NVRAM may also incorporate wear leveling algorithms to account for the fact that the storage cells at the far memory level begin to wear out after a number of write accesses, especially where a significant number of writes may occur such as in a system memory implementation. Since high cycle count blocks are most likely to wear out in this manner, wear leveling spreads writes across the far memory cells by swapping addresses of high cycle count blocks with low cycle count blocks. Note that most address swapping is typically transparent to application programs_because it is handled by hardware, lower-level software (e.g., a low level driver or operating system), or a combination of the two.
B. Far Memory
The far memory 122 of some embodiments of the invention is implemented with NVRAM, but is not necessarily limited to any particular memory technology. Far memory 122 is distinguishable from other instruction and data memory/storage technologies in terms of its characteristics and/or its application in the memory/storage hierarchy. For example, far memory 122 is different from:
static random access memory (SRAM) which may be used for level 0 and level 1 internal processor caches 101a-b, 102a-b, 103a-b, 103a-b, and 104a-b dedicated to each of the processor cores 101-104, respectively, and lower level cache (LLC) 105 shared by the processor cores;
dynamic random access memory (DRAM) configured as a cache 106 internal to the processor 100 (e.g., on the same die as the processor 100) and/or configured as one or more caches 107-109 external to the processor (e.g., in the same or a different package from the processor 100); and
FLASH memory/magnetic disk/optical disc applied as mass storage (not shown); and
memory such as FLASH memory or other read only memory (ROM) applied as firmware memory (which can refer to boot ROM, BIOS Flash, and/or TPM Flash). (not shown).
Far memory 122 may be used as instruction and data storage that is directly addressable by a processor 100 and is able to sufficiently keep pace with the processor 100 in contrast to FLASH/magnetic disk/optical disc applied as mass storage. Moreover, as discussed above and described in detail below, far memory 122 may be placed on a memory bus and may communicate directly with a memory controller that, in turn, communicates directly with the processor 100.
Far memory 122 may be combined with other instruction and data storage technologies (e.g., DRAM) to form hybrid memories (also known as Co-locating PCM and DRAM; first level memory and second level memory; FLAM (FLASH and DRAM)). Note that at least some of the above technologies, including PCM/PCMS may be used for mass storage instead of, or in addition to, system memory, and need not be random accessible, byte addressable or directly addressable by the processor when applied in this manner.
For convenience of explanation, most of the remainder of the application will refer to “NVRAM” or, more specifically, “PCM,” or “PCMS” as the technology selection for the far memory 122. As such, the terms NVRAM, PCM, PCMS, and far memory may be used interchangeably in the following discussion. However it should be realized, as discussed above, that different technologies may also be utilized for far memory. Also, that NVRAM is not limited for use as far memory.
C. Near Memory
“Near memory” 121 is an intermediate level of memory configured in front of a far memory 122 that has lower read/write access latency relative to far memory and/or more symmetric read/write access latency (i.e., having read times which are roughly equivalent to write times). In some embodiments, the near memory 121 has significantly lower write latency than the far memory 122 but similar (e.g., slightly lower or equal) read latency; for instance the near memory 121 may be a volatile memory such as volatile random access memory (VRAM) and may comprise a DRAM or other high speed capacitor-based memory. Note, however, that the underlying principles of the invention are not limited to these specific memory types. Additionally, the near memory 121 may have a relatively lower density and/or may be more expensive to manufacture than the far memory 122.
In one embodiment, near memory 121 is configured between the far memory 122 and the internal processor caches 120. In some of the embodiments described below, near memory 121 is configured as one or more memory-side caches (MSCs) 107-109 to mask the performance and/or usage limitations of the far memory including, for example, read/write latency limitations and memory degradation limitations. In these implementations, the combination of the MSC 107-109 and far memory 122 operates at a performance level which approximates, is equivalent or exceeds a system which uses only DRAM as system memory. As discussed in detail below, although shown as a “cache” in
Near memory 121 can be located on the processor die (as cache(s) 106) and/or located external to the processor die (as caches 107-109) (e.g., on a separate die located on the CPU package, located outside the CPU package with a high bandwidth link to the CPU package, for example, on a memory dual in-line memory module (DIMM), a riser/mezzanine, or a computer motherboard). The near memory 121 may be coupled in communicate with the processor 100 using a single or multiple high bandwidth links, such as DDR or other transactional high bandwidth links (as described in detail below).
The caches 107-109 illustrated in
System memory as used herein is memory which is visible to and/or directly addressable by software executed on the processor 100; while the cache memories 101a-109 may operate transparently to the software in the sense that they do not form a directly-addressable portion of the system address space, but the cores may also support execution of instructions to allow software to provide some control (configuration, policies, hints, etc.) to some or all of the cache(s). The subdivision of system memory into regions 116-119 may be performed manually as part of a system configuration process (e.g., by a system designer) and/or may be performed automatically by software.
In one embodiment, the system memory regions 116-119 are implemented using far memory (e.g., PCM) and, in some embodiments, near memory configured as system memory. System memory address range #4 represents an address range which is implemented using a higher speed memory such as DRAM which may be a near memory configured in a system memory mode (as opposed to a caching mode).
As indicated, near memory 144 may be implemented to operate in a variety of different modes including: a first mode in which it operates as a cache for far memory (near memory as cache for FM 150B); a second mode in which it operates as system memory 151A and occupies a portion of the SPA space (sometimes referred to as near memory “direct access” mode); and one or more additional modes of operation such as a scratchpad memory 192 or as a write buffer 193. In some embodiments of the invention, the near memory is partitionable, where each partition may concurrently operate in a different one of the supported modes; and different embodiments may support configuration of the partitions (e.g., sizes, modes) by hardware (e.g., fuses, pins), firmware, and/or software (e.g., through a set of programmable range registers within the MSC controller 124 within which, for example, may be stored different binary codes to identify each mode and partition).
System address space A 190 in
In addition, when acting as a cache for far memory 150B, the near memory 144 may operate in various sub-modes under the control of the MSC controller 124. In each of these modes, the near memory address space (NMA) is transparent to software in the sense that the near memory does not form a directly-addressable portion of the system address space. These modes include but are not limited to the following:
(1) Write-Back Caching Mode:
In this mode, all or portions of the near memory acting as a FM cache 150B is used as a cache for the NVRAM far memory (FM) 151B. While in write-back mode, every write operation is directed initially to the near memory as cache for FM 150B (assuming that the cache line to which the write is directed is present in the cache). A corresponding write operation is performed to update the NVRAM FM 151B only when the cache line within the near memory as cache for FM 150B is to be replaced by another cache line (in contrast to write-through mode described below in which each write operation is immediately propagated to the NVRAM FM 151B).
(2) Near Memory Bypass Mode:
In this mode all reads and writes bypass the NM acting as a FM cache 150B and go directly to the NVRAM FM 151B. Such a mode may be used, for example, when an application is not cache friendly or requires data to be committed to persistence at the granularity of a cache line. In one embodiment, the caching performed by the processor caches 150A and the NM acting as a FM cache 150B operate independently of one another. Consequently, data may be cached in the NM acting as a FM cache 150B which is not cached in the processor caches 150A (and which, in some cases, may not be permitted to be cached in the processor caches 150A) and vice versa. Thus, certain data which may be designated as “uncacheable” in the processor caches may be cached within the NM acting as a FM cache 150B.
(3) Near Memory Read-Cache Write Bypass Mode:
This is a variation of the above mode where read caching of the persistent data from NVRAM FM 151B is allowed (i.e., the persistent data is cached in the near memory as cache for far memory 150B for read-only operations). This is useful when most of the persistent data is “Read-Only” and the application usage is cache-friendly.
(4) Near Memory Read-Cache Write-Through Mode:
This is a variation of the near memory read-cache write bypass mode, where in addition to read caching, write-hits are also cached. Every write to the near memory as cache for FM 150B causes a write to the FM 151B. Thus, due to the write-through nature of the cache, cache-line persistence is still guaranteed.
When acting in near memory direct access mode, all or portions of the near memory as system memory 151A are directly visible to software and form part of the SPA space. Such memory may be completely under software control. Such a scheme may create a non-uniform memory address (NUMA) memory domain for software where it gets higher performance from near memory 144 relative to NVRAM system memory 174. By way of example, and not limitation, such a usage may be employed for certain high performance computing (HPC) and graphics applications which require very fast access to certain data structures.
In an alternate embodiment, the near memory direct access mode is implemented by “pinning” certain cache lines in near memory (i.e., cache lines which have data that is also concurrently stored in NVRAM 142). Such pinning may be done effectively in larger, multi-way, set-associative caches.
Thus, as indicated, the NVRAM 142 may be implemented to operate in a variety of different modes, including as far memory 151B (e.g., when near memory 144 is present/operating, whether the near memory is acting as a cache for the FM via a MSC control 124 or not (accessed directly after cache(s) 101A-105 and without MSC control 124)); just NVRAM system memory 174 (not as far memory because there is no near memory present/operating; and accessed without MSC control 124); NVRAM mass storage 152A; BIOS NVRAM 172; and TPM NVRAM 173. While different embodiments may specify the NVRAM modes in different ways,
By way of example, operation while the near memory as cache for FM 150B is in the write-back caching is described. In one embodiment, while the near memory as cache for FM 150B is in the write-back caching mode mentioned above, a read operation will first arrive at the MSC controller 124 which will perform a look-up to determine if the requested data is present in the near memory acting as a cache for FM 150B (e.g., utilizing a tag cache 342). If present, it will return the data to the requesting CPU, core 101-104 or I/O device through I/O subsystem 115. If the data is not present, the MSC controller 124 will send the request along with the system memory address to an NVRAM controller 332. The NVRAM controller 332 will use the decode table 333 to translate the system memory address to an NVRAM physical device address (PDA) and direct the read operation to this region of the far memory 151B. In one embodiment, the decode table 333 includes an address indirection table (AIT) component which the NVRAM controller 332 uses to translate between system memory addresses and NVRAM PDAs. In one embodiment, the AIT is updated as part of the wear leveling algorithm implemented to distribute memory access operations and thereby reduce wear on the NVRAM FM 151B. Alternatively, the AIT may be a separate table stored within the NVRAM controller 332.
Upon receiving the requested data from the NVRAM FM 151B, the NVRAM controller 332 will return the requested data to the MSC controller 124 which will store the data in the MSC near memory acting as an FM cache 150B and also send the data to the requesting processor core 101-104, or I/O Device through I/O subsystem 115. Subsequent requests for this data may be serviced directly from the near memory acting as a FM cache 150B until it is replaced by some other NVRAM FM data.
As mentioned, in one embodiment, a memory write operation also first goes to the MSC controller 124 which writes it into the MSC near memory acting as a FM cache 150B. In write-back caching mode, the data may not be sent directly to the NVRAM FM 151B when a write operation is received. For example, the data may be sent to the NVRAM FM 151B only when the location in the MSC near memory acting as a FM cache 150B in which the data is stored must be re-used for storing data for a different system memory address. When this happens, the MSC controller 124 notices that the data is not current in NVRAM FM 151B and will thus retrieve it from near memory acting as a FM cache 150B and send it to the NVRAM controller 332. The NVRAM controller 332 looks up the PDA for the system memory address and then writes the data to the NVRAM FM 151B.
In
In one embodiment, computer system 300 includes integrated memory controller (IMC) 331 which performs the central memory access control for processor 310, which is coupled to: 1) a memory-side cache (MSC) controller 124 to control access to near memory (NM) acting as a far memory cache 150B; and 2) a NVRAM controller 332 to control access to NVRAM 142. Although illustrated as separate units in
In the illustrated embodiment, the MSC controller 124 includes a set of range registers 336 which specify the mode of operation in use for the NM acting as a far memory cache 150B (e.g., write-back caching mode, near memory bypass mode, etc, described above). In the illustrated embodiment, DRAM 144 is used as the memory technology for the NM acting as cache for far memory 150B. In response to a memory access request, the MSC controller 124 may determine (depending on the mode of operation specified in the range registers 336) whether the request can be serviced from the NM acting as cache for FM 150B or whether the request must be sent to the NVRAM controller 332, which may then service the request from the far memory (FM) portion 151B of the NVRAM 142.
In an embodiment where NVRAM 142 is implemented with PCMS, NVRAM controller 332 is a PCMS controller that performs access with protocols consistent with the PCMS technology. As previously discussed, the PCMS memory is inherently capable of being accessed at the granularity of a byte. Nonetheless, the NVRAM controller 332 may access a PCMS-based far memory 151B at a lower level of granularity such as a cache line (e.g., a 64-bit or 128-bit cache line) or any other level of granularity consistent with the memory subsystem. The underlying principles of the invention are not limited to any particular level of granularity for accessing a PCMS-based far memory 151B. In general, however, when PC MS-based far memory 151B is used to form part of the system address space, the level of granularity will be higher than that traditionally used for other non-volatile storage technologies such as FLASH, which can only perform rewrite and erase operations at the level of a “block” (minimally 64 Kbyte in size for NOR FLASH and 16 Kbyte for NAND FLASH).
In the illustrated embodiment, NVRAM controller 332 can read configuration data to establish the previously described modes, sizes, etc. for the NVRAM 142 from decode table 333, or alternatively, can rely on the decoding results passed from IMC 331 and I/O subsystem 315. For example, at either manufacturing time or in the field, computer system 300 can program decode table 333 to mark different regions of NVRAM 142 as system memory, mass storage exposed via SATA interfaces, mass storage exposed via USB Bulk Only Transport (BOT) interfaces, encrypted storage that supports TPM storage, among others. The means by which access is steered to different partitions of NVRAM device 142 is via a decode logic. For example, in one embodiment, the address range of each partition is defined in the decode table 333. In one embodiment, when IMC 331 receives an access request, the target address of the request is decoded to reveal whether the request is directed toward memory, NVRAM mass storage, or I/O. If it is a memory request, IMC 331 and/or the MSC controller 124 further determines from the target address whether the request is directed to NM as cache for FM 150B or to FM 151B. For FM 151B access, the request is forwarded to NVRAM controller 332. IMC 331 passes the request to the I/O subsystem 115 if this request is directed to I/O (e.g., non-storage and storage I/O devices). I/O subsystem 115 further decodes the address to determine whether the address points to NVRAM mass storage 152A, BIOS NVRAM 172, or other non-storage or storage I/O devices. If this address points to NVRAM mass storage 152A or BIOS NVRAM 172, I/O subsystem 115 forwards the request to NVRAM controller 332. If this address points to TMP NVRAM 173, I/O subsystem 115 passes the request to TPM 334 to perform secured access.
In one embodiment, each request forwarded to NVRAM controller 332 is accompanied with an attribute (also known as a “transaction type”) to indicate the type of access. In one embodiment, NVRAM controller 332 may emulate the access protocol for the requested access type, such that the rest of the platform remains unaware of the multiple roles performed by NVRAM 142 in the memory and storage hierarchy. In alternative embodiments, NVRAM controller 332 may perform memory access to NVRAM 142 regardless of which transaction type it is. It is understood that the decode path can be different from what is described above. For example, IMC 331 may decode the target address of an access request and determine whether it is directed to NVRAM 142. If it is directed to NVRAM 142, IMC 331 generates an attribute according to decode table 333. Based on the attribute, IMC 331 then forwards the request to appropriate downstream logic (e.g., NVRAM controller 332 and I/O subsystem 315) to perform the requested data access. In yet another embodiment, NVRAM controller 332 may decode the target address if the corresponding attribute is not passed on from the upstream logic (e.g., IMC 331 and I/O subsystem 315). Other decode paths may also be implemented.
The presence of a new memory architecture such as described herein provides for a wealth of new possibilities. Although discussed at much greater length further below, some of these possibilities are quickly highlighted immediately below.
According to one possible implementation, NVRAM 142 acts as a total replacement or supplement for traditional DRAM technology in system memory. In one embodiment, NVRAM 142 represents the introduction of a second-level system memory (e.g., the system memory may be viewed as having a first level system memory comprising near memory as cache 150B (part of the DRAM device 340) and a second level system memory comprising far memory (FM) 151B (part of the NVRAM 142).
According to some embodiments, NVRAM 142 acts as a total replacement or supplement for the flash/magnetic/optical mass storage 152B. As previously described, in some embodiments, even though the NVRAM 152A is capable of byte-level addressability, NVRAM controller 332 may still access NVRAM mass storage 152A in blocks of multiple bytes, depending on the implementation (e.g., 64 Kbytes, 128 Kbytes, etc.). The specific manner in which data is accessed from NVRAM mass storage 152A by NVRAM controller 332 may be transparent to software executed by the processor 310. For example, even through NVRAM mass storage 152A may be accessed differently from Flash/magnetic/optical mass storage 152A, the operating system may still view NVRAM mass storage 152A as a standard mass storage device (e.g., a serial ATA hard drive or other standard form of mass storage device).
In an embodiment where NVRAM mass storage 152A acts as a total replacement for the flash/magnetic/optical mass storage 152B, it is not necessary to use storage drivers for block-addressable storage access. The removal of storage driver overhead from storage access can increase access speed and save power. In alternative embodiments where it is desired that NVRAM mass storage 152A appears to the OS and/or applications as block-accessible and indistinguishable from flash/magnetic/optical mass storage 152B, emulated storage drivers can be used to expose block-accessible interfaces (e.g., Universal Serial Bus (USB) Bulk-Only Transfer (BOT), 1.0; Serial Advanced Technology Attachment (SATA), 3.0; and the like) to the software for accessing NVRAM mass storage 152A.
In one embodiment, NVRAM 142 acts as a total replacement or supplement for firmware memory such as BIOS flash 362 and TPM flash 372 (illustrated with dotted lines in
Continuing then with a discussion of the system of
In one embodiment, the processor 310 includes an integrated graphics unit 311 which includes logic for executing graphics commands such as 3D or 2D graphics commands. While the embodiments of the invention are not limited to any particular integrated graphics unit 311, in one embodiment, the graphics unit 311 is capable of executing industry standard graphics commands such as those specified by the Open GL and/or Direct X application programming interfaces (APIs) (e.g., OpenGL 4.1 and Direct X 11).
The processor 310 may also include one or more cores 101-104, although a single core is illustrated in
The processor 310 may also include one or more caches, such as cache 313 which may be implemented as a SRAM and/or a DRAM. In many embodiments that are not shown, additional caches other than cache 313 are implemented so that multiple levels of cache exist between the execution units in the core(s) 101-104 and memory devices 150B and 151B. For example, the set of shared cache units may include an upper-level cache, such as a level 1 (L1) cache, mid-level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, an (LLC), and/or different combinations thereof. In different embodiments, cache 313 may be apportioned in different ways and may be one of many different sizes in different embodiments. For example, cache 313 may be an 8 megabyte (MB) cache, a 16 MB cache, etc. Additionally, in different embodiments the cache may be a direct mapped cache, a fully associative cache, a multi-way set-associative cache, or a cache with another type of mapping. In other embodiments that include multiple cores, cache 313 may include one large portion shared among all cores or may be divided into several separately functional slices (e.g., one slice for each core). Cache 313 may also include one portion shared among all cores and several other portions that are separate functional slices per core.
The processor 310 may also include a home agent 314 which includes those components coordinating and operating core(s) 101-104. The home agent unit 314 may include, for example, a power control unit (PCU) and a display unit. The PCU may be or include logic and components needed for regulating the power state of the core(s) 101-104 and the integrated graphics unit 311. The display unit is for driving one or more externally connected displays.
As mentioned, in some embodiments, processor 310 includes an integrated memory controller (IMC) 331, near memory cache (MSC) controller, and NVRAM controller 332 all of which can be on the same chip as processor 310, or on a separate chip and/or package connected to processor 310. DRAM device 144 may be on the same chip or a different chip as the IMC 331 and MSC controller 124; thus, one chip may have processor 310 and DRAM device 144; one chip may have the processor 310 and another the DRAM device 144 and (these chips may be in the same or different packages); one chip may have the core(s) 101-104 and another the IMC 331, MSC controller 124 and DRAM 144 (these chips may be in the same or different packages); one chip may have the core(s) 101-104, another the IMC 331 and MSC controller 124, and another the DRAM 144 (these chips may be in the same or different packages); etc.
In some embodiments, processor 310 includes an I/O subsystem 115 coupled to IMC 331. I/O subsystem 115 enables communication between processor 310 and the following serial or parallel I/O devices: one or more networks 336 (such as a Local Area Network, Wide Area Network or the Internet), storage I/O device (such as flash/magnetic/optical mass storage 152B, BIOS flash 362, TPM flash 372) and one or more non-storage I/O devices 337 (such as display, keyboard, speaker, and the like). I/O subsystem 115 may include a platform controller hub (PCH) (not shown) that further includes several I/O adapters 338 and other I/O circuitry to provide access to the storage and non-storage I/O devices and networks. To accomplish this, I/O subsystem 115 may have at least one integrated I/O adapter 338 for each I/O protocol utilized. I/O subsystem 115 can be on the same chip as processor 310, or on a separate chip and/or package connected to processor 310.
I/O adapters 338 translate a host communication protocol utilized within the processor 310 to a protocol compatible with particular I/O devices. For flash/magnetic/optical mass storage 152B, some of the protocols that I/O adapters 338 may translate include Peripheral Component Interconnect (PCI)-Express (PCI-E), 3.0; USB, 3.0; SATA, 3.0; Small Computer System Interface (SCSI), Ultra-640; and Institute of Electrical and Electronics Engineers (IEEE) 1394 “Firewire;” among others. For BIOS flash 362, some of the protocols that I/O adapters 338 may translate include Serial Peripheral Interface (SPI), Microwire, among others. Additionally, there may be one or more wireless protocol I/O adapters. Examples of wireless protocols, among others, are used in personal area networks, such as IEEE 802.15 and Bluetooth, 4.0; wireless local area networks, such as IEEE 802.11-based wireless protocols; and cellular protocols.
In some embodiments, the I/O subsystem 115 is coupled to a TPM control 334 to control access to system persistent states, such as secure data, encryption keys, platform configuration information and the like. In one embodiment, these system persistent states are stored in a TMP NVRAM 173 and accessed via NVRAM controller 332
In one embodiment, TPM 334 is a secure micro-controller with cryptographic functionalities. TPM 334 has a number of trust-related capabilities; e.g., a SEAL capability for ensuring that data protected by a TPM is only available for the same TPM. TPM 334 can protect data and keys (e.g., secrets) using its encryption capabilities. In one embodiment, TPM 334 has a unique and secret RSA key, which allows it to authenticate hardware devices and platforms. For example, TPM 334 can verify that a system seeking access to data stored in computer system 300 is the expected system. TPM 334 is also capable of reporting the integrity of the platform (e.g., computer system 300). This allows an external resource (e.g., a server on a network) to determine the trustworthiness of the platform but does not prevent access to the platform by the user.
In some embodiments, I/O subsystem 315 also includes a Management Engine (ME) 335, which is a microprocessor that allows a system administrator to monitor, maintain, update, upgrade, and repair computer system 300. In one embodiment, a system administrator can remotely configure computer system 300 by editing the contents of the decode table 333 through ME 335 via networks 336.
For convenience of explanation, the remainder of the application sometimes refers to NVRAM 142 as a PCMS device. A PCMS device includes multi-layered (vertically stacked) PCM cell arrays that are non-volatile, have low power consumption, and are modifiable at the bit level. As such, the terms NVRAM device and PCMS device may be used interchangeably in the following discussion. However it should be realized, as discussed above, that different technologies besides PCMS may also be utilized for NVRAM 142.
It should be understood that a computer system can utilize NVRAM 142 for system memory, mass storage, firmware memory and/or other memory and storage purposes even if the processor of that computer system does not have all of the above-described components of processor 310, or has more components than processor 310.
In the particular embodiment shown in
While some of the same numerical designations are used across multiple figures in
While several different system platform configuration approaches are described below, these approaches fall into two broad categories: split architecture, and unified architecture. Briefly, in the split architecture scheme, a memory side cache (MSC) controller (e.g., located in the processor die or on a separate die in the CPU package) intercepts all system memory requests. There are two separate interfaces that “flow downstream” from that controller that exit the CPU package to couple to the Near Memory and Far Memory. Each interface is tailored for the specific type of memory and each memory can be scaled independently in terms of performance and capacity.
In the unified architecture scheme a single memory interface exits the processor die or CPU package and all memory requests are sent to this interface. The MSC controller along with the Near and Far Memory subsystems are consolidated on this single interface. This memory interface must be tailored to meet the memory performance requirements of the processor and must support a transactional, out-of-order protocol at least because PCMS devices may not process read requests in order. In accordance with the above general categories, the following specific platform configurations may be employed.
The embodiments described below include various types of buses/channels. The terms “bus” and “channel” are used synonymously herein. The number of memory channels per DIMM socket will depend on the particular CPU package used in the computer system (with some CPU packages supporting, for example, three memory channels per socket).
Additionally, in the embodiments described below which use DRAM, virtually any type of DRAM memory channels may be used including, by way of example and not limitation, DDR channels (e.g., DDR3, DDR4, DDR5, etc). Thus, while DDR is advantageous because of its wide acceptance in the industry, resulting price point, etc., the underlying principles of the invention are not limited to any particular type of DRAM or volatile memory.
The DIMMs 450-451 use DDR slots and electrical connections defining a DDR channels 440 with DDR address, data and control lines and voltages (e.g., the DDR3 or DDR4 standard as defined by the Joint Electron Devices Engineering Council (JEDEC)). The PCM devices on the DIMMs 450-451 provide the far memory capacity of this split architecture, with the DDR channels 440 to the CPU package 401 able to carry both DDR and transactional protocols. In contrast to DDR protocols in which the processor 310 or other logic within the CPU package (e.g., the IMC 331 or MSC controller 124) transmits a command and receives an immediate response, the transactional protocol used to communicate with PCM devices allows the CPU 401 to issue a series of transactions, each identified by a unique transaction ID. The commands are serviced by a PCM controller on the recipient one of the PCM DIMMs, which sends responses back to the CPU package 401, potentially out of order. The processor 310 or other logic within the CPU package 401 identifies each transaction response by its transaction ID, which is sent with the response. The above configuration allows the system to support both standard DDR DRAM-based DIMMs (using DDR protocols over DDR electrical connections) and PCM-based DIMMs configurations (using transactional protocols over the same DDR electrical connections).
In some of the embodiments described above, such as that illustrated in
Additionally, to implement the above embodiment, the system address space may be logically subdivided between the different memory channels. For example, if there are four memory channels, then ¼ of the system address space may be allocated to each memory channel. If each memory channel is provided with one PCMS-based DIMM and one DDR DIMM, the DDR DIMM may be configured to act as the MSC for that ¼ portion of the system address space.
The choice of system memory and mass storage devices may depend on the type of electronic platforms on which embodiments of the invention are employed. For example, in a personal computer, tablet computer, notebook computer, smartphone, mobile phone, feature phone, personal digital assistant (PDA), portable media player, portable gaming device, gaming console, digital camera, switch, hub, router, set-top box, digital video recorder, or other devices that have relatively small mass storage requirements, the mass storage may be implemented using NVRAM mass storage 152A alone, or using NVRAM mass storage 152A in combination with a flash/magnetic/optical mass storage 152B. In other electronic platforms that have relatively large mass storage requirements (e.g., large-scale servers), the mass storage may be implemented using magnetic storage (e.g., hard drives) or any combination of magnetic storage, optical storage, holographic storage, mass-storage flash memory, and NVRAM mass storage 152A. In such a case, system hardware and/or software responsible for storage may implement various intelligent persistent storage allocation techniques to allocate blocks of persistent program code and data between the FM 151B/NVRAM storage 152A and a flash/magnetic/optical mass storage 152B in an efficient or otherwise useful manner.
For example, in one embodiment a high powered server is configured with a near memory (e.g., DRAM), a PCMS device, and a magnetic mass storage device for large amounts of persistent storage. In one embodiment, a notebook computer is configured with a near memory and a PCMS device which performs the role of both a far memory and a mass storage device (i.e., which is logically partitioned to perform these roles as shown in
One embodiment of a tablet computer or cellular telephony device is configured with PCMS memory but potentially no near memory and no additional mass storage (for cost/power savings). However, the tablet/telephone may be configured with a removable mass storage device such as a flash or PCMS memory stick.
Various other types of devices may be configured as described above. For example, portable media players and/or personal digital assistants (PDAs) may be configured in a manner similar to tablets/telephones described above, gaming consoles may be configured in a similar manner to desktops or laptops. Other devices which may be similarly configured include digital cameras, routers, set-top boxes, digital video recorders, televisions, and automobiles.
In one embodiment of the invention, the bulk of DRAM in system memory is replaced with PCM. As previously discussed, PCM provides significant improvements in memory capacity at a significantly lower cost relative to DRAM and is non-volatile. However, certain PCM characteristics such as asymmetrical Read-vs-Write performance, write cycling endurance limits, as well as its non-volatile nature makes it challenging to directly replace DRAM without incurring major software changes. The embodiments of the invention described below provide a software-transparent way to integrate PCM while also enabling newer usages through software enhancements. These embodiments promote a successful transition in memory subsystem architecture and provide a way to consolidate both memory and storage using a single PCM pool, thus mitigating the need for a separate non-volatile storage tier in the platform.
The particular embodiment illustrated in
Also illustrated in
As illustrated in
Another component that ensures software-transparent memory application is an optimized PCM far memory controller 521 that manages the PCM far memory 530 characteristics while still providing the performance required. In one embodiment, the PCM controller 521 includes an Address Indirection Table 520 that translates the MCA generated by the cache control unit 515 to a PDA which is used to directly address the PCM far memory 530. These translations may occur at the granularity of a “block” which is typically 5 KB. The translation is required as, in one embodiment, the far memory controller 521 continuously moves the PCM blocks throughout the PCM device address space to ensure no wear-out hot spots due to a high frequency of writes to any specific block. As previously described, such a technique is sometimes referred to herein as “wear-leveling”.
Thus, the MSC 510 is managed by the cache control unit 512 which allows the MSC 510 to absorb, coalesce and filter transactions (e.g., reads and writes) to the PCM far memory 530. The cache control unit 512 manages all data movement and consistency requirements between the near memory 518 and the PCM far memory 530. Additionally, in one embodiment, the MSC cache controller 512 interfaces to the CPU(s) and provides the standard synchronous load/store interface used in traditional DRAM based memory subsystems.
Exemplary read and write operations will now be described within the context of the architecture shown in
In one embodiment, a memory write operation also first goes to the MSC controller 512 which writes it into the MSC near memory 518. In this embodiment, the data may not be sent directly to the PCM far memory 530 when a write operation is received. For example, the data may be sent to the PCM far memory 530 only when the location in the MSC near memory 518 in which the data is stored must be re-used for storing data for a different system memory address. When this happens, the MSC controller 512 notices that the data is not current in PCM far memory 530 and will thus retrieve it from near memory 518 and send it to the PCM controller 521. The PCM controller 521 looks up the PDA for the system memory address and then writes the data to the PCM far memory 530.
In one embodiment, the size of the MSC near memory 518 will be dictated by the workload memory requirements as well as the near and far memory performance. For a DRAM-based MSC, the size may be set to a tenth the size of the workload memory footprint or the PCM far memory 530 size. Such an MSC is very large compared to conventional caches found in current processor/system architectures. By way of example, and not limitation, for a PCM far memory size of 128 GB, the size of the MSC near memory can be as large as 16 GB.
This embodiment also includes a set of logical units responsible for data routing and processing including a set of data buffers 546 for storing data fetched from near memory or stored to near memory. In one embodiment, a prefetch data cache 547 is also included for storing data prefetched from near memory and/or far memory. However, the prefetch data cache 547 is optional and is not necessary for complying with the underlying principles of the invention.
An error correction code (ECC) generator/checker unit 552 generates and checks ECCs to ensure that data written to or read from near memory is free from errors. As discussed below, in one embodiment of the invention, the ECC generator/checker unit 552 is modified to store cache tags. Specific ECCs are well understood by those of ordinary skill in the art and will therefore not be described here in detail. The channel controllers 553 couple the data bus of the near memory 518 to the MSC 510 and generate the necessary electrical signaling for accessing the near memory 518 (e.g., RAS and CAS signaling for a DRAM near memory).
Also illustrated in
As mentioned, the near memory 518 employed in one embodiment is very large compared to conventional caches found in current processor/system architectures. Consequently, the tag cache 511 that maintains the system memory address translation to near memory addresses may also be very large. The cost of storing and looking up the MSC tags can be a significant impediment to building large caches. As such, in one embodiment of the invention, this issue is resolved using an innovative scheme that stores the cache tags within the storage allocated in the MSC for ECC protection, thereby essentially removing the cost of storage for the tags.
This embodiment is illustrated generally in
In one embodiment, a 3-Byte (24-bit) tag 522 is used with the bit assignments illustrated in
Utilizing a direct-mapped cache architecture as described above, which allows the near memory address to be directly extracted from the system memory address reduces or eliminates the latency cost of looking up the tag store before the MSC 510 can be read, thereby significantly improving performance. Moreover, the time to check the cache tags to decide if the MSC 510 has the required data is also eliminated as it is done in parallel with the ECC check of the data read form the MSC.
Under certain conditions, storing tags with the data may create an issue for writes. A write first reads the data in order to ensure that it does not over-write data for some other address. Such a read before every write could become costly. One embodiment of the invention employs a dirty line tag cache that maintains the tags of recently-accessed near memory addresses (NMAs). Since many writes target recently accessed addresses, a reasonably small tag cache can get an effective hit rate to filter most of the reads prior to a write.
Additional details associated with one embodiment of a PCM DIMM 519 including a PCM far memory controller 521 and a set of PCM far memory modules 530a-i is illustrated in
As illustrated, the PCM controller 521 includes a system physical address (SPA)-to-PCM mapper 556 which operates in response to a wear management unit 555 and an address indirection unit 563 to map SPAs to PCM blocks. In one embodiment, the wear management logic 555 implements a wear leveling algorithm to account for the fact that the storage cells of the PCM 530a-530i begin to wear out after too many write and/or erase accesses. Wear leveling spreads writes and erases across the PCM device's memory cells by, for example, forcing data blocks with low cycle counts to occasionally move, and thereby allowing high cycled data blocks to be placed in memory cells that stored the low cycled data blocks. Typically, the majority of blocks do not cycle, but high cycle count blocks are most likely to fail and wear leveling swaps addresses of high cycle count blocks with low cycle count blocks. The wear management logic 555 may track the cycle counts using one or more counters and registers (e.g., the counters may increment by one each time a cycle is detected and the result may be stored in the set of registers).
In one embodiment, the address indirection logic 563 includes an address indirection table (AIT) containing an indication of the PCM blocks to which write operations should be directed. The AIT may be used to automatically move blocks between memory and storage usages. From the software perspective, the accesses to all the blocks uses traditional memory load/store semantics (i.e., wear leveling and address indirection operations occur transparently to software). In one embodiment, AIT is used to translate the SPA that is generated by software to a PDA. This translation is required as the need to uniformly wear the PCMS devices, the data will need to be moved around in PDA space to avoid any hotspots. When such a move occurs, the relationship between SPA and PDA will change and the AIT will be updated to reflect this new translation.
Following the SPA to PCM mapping, a scheduler unit 557 schedules the underlying PCM operations (e.g., reads and/or writes) to the PCM devices 530a-l and a PCM protocol engine 558 generates the electrical signaling required for performing the read/write operations. An ECC unit 562 performs error detection and correction operations and data buffers 561 temporarily buffer data being read from or written to the PCM devices 530a-l. A persistent write buffer 559 is used to hold data that is guaranteed to be written back to PCMS even in the event of an unexpected power failure (e.g., it is implemented using non-volatile storage). Flush support logic 560 is included to flush the persistent write buffers to PCMS, either periodically and/or according to a specified data flushing algorithm (e.g., after the persistent write buffers reach a specified threshold).
In one embodiment, the MSC 510 automatically routes storage accesses directly to the PCM far memory controller 521 and memory accesses to the MSC cache control unit 512. Storage accesses coming to the PCM far memory controller 521 are treated as regular reads and writes and the address indirection and wear leveling mechanisms described herein are applied as usual. An additional optimization is employed in one embodiment of the invention which can be implemented when data needs to move between storage and memory. Since a common PCM pool 530a-l is used, data movement can be eliminated or deferred by simply changing the pointers in the translation tables (e.g., the AIT). For example, when data is transferred from storage to memory, a pointer identifying the data in a particular physical PCM storage location may be updated to indicate that the same physical PCM storage location is now a memory location in system memory. In one embodiment, this is done by hardware in a software-transparent manner to provide both performance and power benefits.
In addition to the software-transparent mode of operation, one embodiment of the MSC controller 512 provides alternate modes of operations as indicated by the MSC range registers (RRs) 545. These modes of operation may include, but are not limited to the following:
1) Direct access of PCM memory for storage class applications. Such usage will also require the MSC controller 512 to ensure that writes submitted to PCM 519 are actually committed to a persistent state.
2) Hybrid use of the near memory 518, exposing portions of it to software for direct use while maintaining the remaining as an MSC. When a portion of near memory 518 is exposed to software for direct use, that portion is directly addressable within the system address space. This allows certain applications to explicitly split their memory allocation between a high-performance small region (the near memory 518) and a relatively lower performance bulk region (the far memory 530). By contrast, the portion allocated as a cache within the MSC does not form part of the system address space (but instead acts as a cache for far memory 530 as described herein).
As previously discussed, the MSC architecture is defined such that several different system partitioning approaches are possible. These approaches fall into two broad buckets:
(1) Split Architecture:
In this scheme the MSC controller 512 is located in the CPU and intercepts al system memory requests. There are two separate interfaces from the MSC that exit the CPU to connect to the Near Memory (e.g., DRAM) and Far memory (e.g., PCM). Each interface is tailored for the specific type of memory and each memory can be scaled independently in terms of performance and capacity.
(2) Unified Architecture:
In this scheme a single memory interface exits the CPU and all memory requests are sent to this interface. The MSC controller 512 along with the Near Memory (e.g., DRAM) and Far Memory (e.g., PCM) subsystem are consolidated external to the CPU on this single interface. In one embodiment, this memory interface is tailored to meet the memory performance requirements of the CPU and supports a transactional, out-of-order protocol. The Near and Far memory requirements are met in a “unified” manner on each of these interfaces.
Within the scope of the above buckets several different portioning options are feasible some of which are described below.
(1) Split Example:
Near Memory: DDR5 DIMM's
Near Memory Interface: One or more DDR5 channels
Far Memory: PCM controller/device on a PCI express (PCIe) card
Far Memory Interface: x16 PCIe, Gen 3
2) Unified Example:
CPU Memory Interface: one or more KTMI (or QPMI) channels
Near/Far Memory with MSC/PCM Controller on a Riser Card
Near Memory Interface off MSC/PCM Controller: DDR5 Interface
Far Memory Interface off MSC/PCM Controller: PCM Device Interface
As discussed above, a two-level memory hierarchy may be used for introducing fast non-volatile memory such as PCM as system memory while using a very large DRAM-based near memory. The near memory may be used as a hardware-managed cache. However, some applications are not hardware cache-friendly and, as such, would benefit from alternate ways to use such memory. Because there may be several different applications running on a server at any given time, one embodiment of the invention allows multiple usage modes to be enabled concurrently. Additionally, one embodiment provides the ability to control the allocation of near memory for each of these usage modes.
In one embodiment, the MSC controller 512 provides the following modes for using near memory. As previously mentioned, in one embodiment, the current mode of operation may be specified by operation codes stored in the MSC range registers (RRs) 545.
(1) Write-Back Caching Mode:
In this mode, all or portions of the near memory 518 is used as a cache for the PCM memory 530. While in write-back mode, every write operation is directed initially to the near memory 518 (assuming that the cache line to which the write is directed is present in the cache). A corresponding write operation is performed to update the PCM far memory 530 only when the cache line within the near memory 518 is to be replaced by another cache line (in contrast to write-through mode described below in which each write operation is immediately propagated to the far memory 530).
In one embodiment, a read operation will first arrive at the MSC cache controller 512 which will perform a look-up to determine if the requested data is present in the PCM far memory 518 (e.g., utilizing a tag cache 511). If present, it will return the data to the requesting CPU, core 501 or I/O device (not shown in
Upon receiving the requested data from the PCM FM 530, the PCM FM controller 521 returns the requested data to the MSC controller 512 which stores the data in the MSC near memory 518 and also sends the data to the requesting processor core 501, or I/O Device (not shown in
In one embodiment, a memory write operation also first goes to the MSC controller 512 which writes it into the MSC near memory acting as a FM cache 518. In this embodiment, the data may not be sent directly to the PCM FM 530 when a write operation is received. For example, the data may be sent to the PCM FM 530 only when the location in the MSC near memory acting as a FM cache 518 in which the data is stored must be re-used for storing data for a different system memory address. When this happens, the MSC controller 512 notices that the data is not current in the PCM FM 530 and will thus retrieve it from near memory acting as a FM cache 518 and send it to the PCM FM controller 521. The PCM controller 521 looks up the PDA for the system memory address and then writes the data to the PCM FM 530.
(2) Near Memory Bypass Mode:
In this mode all reads and writes bypass the NM acting as a FM cache 518 and go directly to the PCM far memory 530. Such a mode may be used, for example, when an application is not cache friendly or requires data to be committed to persistence at the granularity of a cache line. In one embodiment, the caching performed by the processor caches 503 and the NM acting as a FM cache 518 operate independently of one another. Consequently, data may be cached in the NM acting as a FM cache 518 which is not cached in the processor caches 503 (and which, in some cases, may not be permitted to be cached in the processor caches 503) and vice versa. Thus, certain data which may be designated as “uncacheable” in the processor caches 503 may be cached within the NM acting as a FM cache 518.
(3) Near Memory Read-Cache Write Bypass Mode:
This is a variation of the above mode where read caching of the persistent data from PCM 519 is allowed (i.e., the persistent data is cached in the MSC 510 for read-only operations). This is useful when most of the persistent data is “Read-Only” and the application usage is cache-friendly.
(5) Near Memory Read-Cache Write-Through Mode:
This is a variation of the previous mode, where in addition to read caching, write-hits are also cached. Every write to the MSC near memory 518 causes a write to the PCM far memory 530. Thus, due to the write-through nature of the cache, cache-line persistence is still guaranteed.
(5) Near Memory Direct Access Mode:
In this mode, all or portions of the near memory are directly visible to software and form part of the system memory address space. Such memory may be completely under software control. Any data movement from the PCM memory 519 to this region of near memory requires explicit software copies. Such a scheme may create a non-uniform memory address (NUMA) memory domain for software where it gets much higher performance from near memory 518 relative to PCM far memory 530. Such a usage may be employed for certain high performance computing (HPC) and graphics applications which require very fast access to certain data structures. This near memory direct access mode is equivalent to “pinning” certain cache lines in near memory. Such pinning may be done effectively in larger, multi-way, set-associative caches.
Table A below summarizes each of the above-described modes of operation.
The processor and chipset components used to implement the above modes of operation include the following:
(1) A Memory-Side-Cache Controller 512 that manages the near memory in a two layer memory (2LM) hierarchy.
(2) A set of Range Registers 545 (see
(3) A mechanism to acknowledge write completions from the PCM memory subsystem 519 to the MSC controller 515.
(5) A mechanism to invalidate lines in the near memory 518.
(5) A flush engine to evict dirty lines to PCM and invalidate in specified regions of the near memory address space.
In one embodiment, the memory ranges for each of the usage modes are contiguous in system address space. However multiple, disjoint, regions may use the same mode. In one embodiment, each mode range register within the set of MSC RRs 545 provides the following information:
(1) the mode of operation (e.g., write-back, near memory bypass mode, etc);
(2) the range base in the system address space (e.g., at 2 MB granularity or greater); and
(3) a range mask field which identifies the size of the region.
In one embodiment, the number of modes supported is implementation-specific but it is assumed that only one contiguous system address range is available for each mode of operation. If a near memory direct access range register is specified, then it is assumed that this is will be mapped to a contiguous region starting at the bottom of the near memory address space. Such a contiguous region must be smaller than the size of near memory. Additionally, if any of the caching modes are being used, the direct access region size must be smaller than the near memory size to allow for adequate cache size for the required performance. Such allocation of near memory for various modes may be configurable by the user.
In summary, one embodiment of the invention is implemented in accordance with the following set of operations:
(1) When any Read or Write Access reaches the Memory-Side-Cache controller 512, it checks the Range Registers 545 (
(2) For any read cache/write bypass access, the MSC controller 512 checks to see if the address is currently cached. If it is, it must invalidate the line before sending the write completion back to the source.
(3) For any Write Bypass direct PCM operation, the MSC Controller 512 awaits a completion back from the PCM controller 521 to ensure that the write is committed to a globally visible buffer.
(4) Any Read or Write to the Direct Access mode space in Near Memory, is directed to the appropriate region of Near Memory. No transactions are sent to the PCM memory.
(5) Any change in the Range Register configuration to increase or decrease any existing region or add a new region, will require flushing of appropriate cached regions to PCM. For example, if software wishes to increase the size of the Direct Access mode region by reducing the Write-Back Cache region, it may do so by first evicting and invalidating the appropriate portion of the Near Memory Region and then changing the Near Memory Direct Access Mode Range Register. The MSC Controller 510 will then know that future caching is done to a smaller Near Memory Address Space.
One particular embodiment of the invention in which the system physical address (SPA) space is divided up among multiple MSCs is illustrated in
Thus, in
Any of the near memory modes described above may be employed on the architecture shown in
In one embodiment, different MSCs may concurrently implement different modes of operation. For example, the range registers of MSC controller 656 may specify the Near Memory Direct Access mode, the range registers of MSC controller 657 may specify the Write Back Cache mode, the range registers of MSC controller 662 may specify the Read Cache/Write Bypass mode, and MSC controller 663 may specify the Read Cache/Write Through mode. In addition, in some embodiments, individual MSCs may concurrently implement different modes of operation. For example, MSC controller 656 may be configured to implement near memory direct access mode for certain system address ranges and a near memory bypass mode for other system address ranges.
The foregoing combinations are, of course, merely illustrative of the manner in which MSC controllers ma be independently programmed. The underlying principles of the invention are not limited to these or any other combinations.
As described with respect to some of embodiments described above (e.g., such as that described with respect to
One embodiment of an optional interleaving process is illustrated in
Embodiments of the invention may include various steps, which have been described above. The steps may be embodied in machine-executable instructions which may be used to cause a general-purpose or special-purpose processor to perform the steps. Alternatively, these steps may be performed by specific hardware components that contain hardwired logic for performing the steps, or by any combination of programmed computer components and custom hardware components.
As described herein, instructions may refer to specific configurations of hardware such as application specific integrated circuits (ASICs) configured to perform certain operations or having a predetermined functionality or software instructions stored in memory embodied in a non-transitory computer readable medium. Thus, the techniques shown in the figures can be implemented using code and data stored and executed on one or more electronic devices (e.g., an end station, a network element, etc.). Such electronic devices store and communicate (internally and/or with other electronic devices over a network) code and data using computer machine-readable media, such as non-transitory computer machine-readable storage media (e.g., magnetic disks; optical disks; random access memory; read only memory; flash memory devices; phase-change memory) and transitory computer machine-readable communication media (e.g., electrical, optical, acoustical or other form of propagated signals—such as carrier waves, infrared signals, digital signals, etc.). In addition, such electronic devices typically include a set of one or more processors coupled to one or more other components, such as one or more storage devices (non-transitory machine-readable storage media), user input/output devices (e.g., a keyboard, a touchscreen, and/or a display), and network connections. The coupling of the set of processors and other components is typically through one or more busses and bridges (also termed as bus controllers). The storage device and signals carrying the network traffic respectively represent one or more machine-readable storage media and machine-readable communication media. Thus, the storage device of a given electronic device typically stores code and/or data for execution on the set of one or more processors of that electronic device. Of course, one or more parts of an embodiment of the invention may be implemented using different combinations of software, firmware, and/or hardware. Throughout this detailed description, for the purposes of explanation, numerous specific details were set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the invention may be practiced without some of these specific details. In certain instances, well known structures and functions were not described in elaborate detail in order to avoid obscuring the subject matter of the present invention. Accordingly, the scope and spirit of the invention should be judged in terms of the claims which follow.
This application is a continuation of and claims the benefit of U.S. patent application Ser. No. 13/994,731, titled “APPARATUS AND METHOD FOR IMPLEMENTING A MULTI-LEVEL MEMORY HIERARCHY HAVING DIFFERENT OPERATING MODES”, filed Jun. 15, 2013, which further claims the benefit of U.S. National Phase Application under 35 U.S.C. § 371 of International Application No. PCT/US2011/054444, filed Sep. 30, 2011, entitled “APPARATUS AND METHOD FOR IMPLEMENTING A MULTI-LEVEL MEMORY HIERARCHY HAVING DIFFERENT OPERATING MODES”, both of which are incorporated by reference in their entirety.
Number | Name | Date | Kind |
---|---|---|---|
5068823 | Robinson | Nov 1991 | A |
5097118 | Iijima | Mar 1992 | A |
5230052 | Dayan et al. | Jul 1993 | A |
5511202 | Combs et al. | Apr 1996 | A |
5535357 | Moran et al. | Jul 1996 | A |
5822251 | Bruce | Oct 1998 | A |
5822581 | Christeson | Oct 1998 | A |
5905993 | Shinohara | May 1999 | A |
5912839 | Ovshinsky et al. | Jun 1999 | A |
6018806 | Cortopassi et al. | Jan 2000 | A |
6035432 | Jeddeloh | Mar 2000 | A |
6161208 | Dutton et al. | Dec 2000 | A |
6292874 | Bamett | Sep 2001 | B1 |
6298418 | Fujiwara et al. | Oct 2001 | B1 |
6345349 | Coulson | Feb 2002 | B1 |
7057911 | Klint | Jun 2006 | B2 |
7058779 | McClain | Jun 2006 | B1 |
7590918 | Parkinson | Sep 2009 | B2 |
7600078 | Cen et al. | Oct 2009 | B1 |
7636832 | Raj et al. | Dec 2009 | B2 |
7663957 | Henry et al. | Feb 2010 | B2 |
7725645 | Qawami | May 2010 | B2 |
7756053 | Thomas et al. | Jul 2010 | B2 |
7913147 | Swaminathan et al. | Mar 2011 | B2 |
7962715 | Ware | Jun 2011 | B2 |
8051253 | Okin et al. | Nov 2011 | B2 |
8136015 | Kawai et al. | Mar 2012 | B2 |
8156288 | Karamcheti | Apr 2012 | B2 |
8176233 | Karamcheti | May 2012 | B1 |
8296534 | Gupta et al. | Oct 2012 | B1 |
8462537 | Karpov et al. | Jun 2013 | B2 |
8462577 | Zeng et al. | Jun 2013 | B2 |
8605531 | Kau | Dec 2013 | B2 |
8607089 | Qawami et al. | Dec 2013 | B2 |
8612676 | Dahlen et al. | Dec 2013 | B2 |
8612809 | Casper et al. | Dec 2013 | B2 |
8649212 | Kau et al. | Feb 2014 | B2 |
8838935 | Hinton | Sep 2014 | B2 |
9087584 | Dahlen et al. | Jul 2015 | B2 |
9298606 | Ramanujan | Mar 2016 | B2 |
9690491 | Sinclair | Jun 2017 | B2 |
9690493 | Dahlen et al. | Jun 2017 | B2 |
20020007441 | Palanca et al. | Jan 2002 | A1 |
20020105523 | Behrbaum et al. | Aug 2002 | A1 |
20020129212 | Lee et al. | Sep 2002 | A1 |
20030005266 | Akkary et al. | Jan 2003 | A1 |
20030023812 | Nalawadi et al. | Jan 2003 | A1 |
20030033515 | Autry | Feb 2003 | A1 |
20040078523 | Chauvel et al. | Apr 2004 | A1 |
20040218440 | Kumar et al. | Nov 2004 | A1 |
20050027933 | Iyengar | Feb 2005 | A1 |
20050060526 | Rothman et al. | Mar 2005 | A1 |
20050063220 | Johnson | Mar 2005 | A1 |
20050066114 | Barth | Mar 2005 | A1 |
20050120265 | Pline | Jun 2005 | A1 |
20050223157 | Floman et al. | Oct 2005 | A1 |
20050273584 | Wisecup et al. | Dec 2005 | A1 |
20060184722 | Sinclair | Aug 2006 | A1 |
20060271724 | Purcell et al. | Nov 2006 | A1 |
20070101077 | Evanchik et al. | May 2007 | A1 |
20070105267 | Karpov et al. | May 2007 | A1 |
20070255891 | Chow et al. | Nov 2007 | A1 |
20070294496 | Goss et al. | Dec 2007 | A1 |
20080016269 | Chow et al. | Jan 2008 | A1 |
20080034148 | Gower et al. | Feb 2008 | A1 |
20080040563 | Brittain | Feb 2008 | A1 |
20080082720 | Moyer | Apr 2008 | A1 |
20080082766 | Okin et al. | Apr 2008 | A1 |
20080104329 | Gaither et al. | May 2008 | A1 |
20080141043 | Flynn et al. | Jun 2008 | A1 |
20080155185 | Kim | Jun 2008 | A1 |
20080168186 | Gregg | Jul 2008 | A1 |
20080215828 | Caulkins | Sep 2008 | A1 |
20080270811 | Chow et al. | Oct 2008 | A1 |
20090043966 | Shen et al. | Feb 2009 | A1 |
20090049234 | Oh et al. | Feb 2009 | A1 |
20090077320 | Hoover | Mar 2009 | A1 |
20090113198 | Liu et al. | Apr 2009 | A1 |
20090119498 | Narayanan | May 2009 | A1 |
20090144492 | Barth et al. | Jun 2009 | A1 |
20090157954 | Chung | Jun 2009 | A1 |
20090172267 | Oribe et al. | Jul 2009 | A1 |
20090172379 | Rothman et al. | Jul 2009 | A1 |
20090198877 | Pua et al. | Aug 2009 | A1 |
20090313416 | Nation | Dec 2009 | A1 |
20090327837 | Royer et al. | Dec 2009 | A1 |
20100023681 | Sinclair et al. | Jan 2010 | A1 |
20100058094 | Miyazaki et al. | Mar 2010 | A1 |
20100110748 | Best | May 2010 | A1 |
20100115204 | Li et al. | May 2010 | A1 |
20100131827 | Sokolov et al. | May 2010 | A1 |
20100191898 | Kim et al. | Jul 2010 | A1 |
20100205363 | Hwang et al. | Aug 2010 | A1 |
20100274962 | Mosek | Oct 2010 | A1 |
20100291867 | Abdulla et al. | Nov 2010 | A1 |
20100293317 | Confalonieri et al. | Nov 2010 | A1 |
20100293420 | Kapil et al. | Nov 2010 | A1 |
20100306446 | Villa et al. | Dec 2010 | A1 |
20100306453 | Doller | Dec 2010 | A1 |
20100315874 | Ghodsi | Dec 2010 | A1 |
20100318718 | Eilert et al. | Dec 2010 | A1 |
20100332727 | Kapil et al. | Dec 2010 | A1 |
20110016268 | Qawami et al. | Jan 2011 | A1 |
20110047365 | Hentosh et al. | Feb 2011 | A1 |
20110051744 | Agarwal et al. | Mar 2011 | A1 |
20110063903 | Kang et al. | Mar 2011 | A1 |
20110072204 | Chang | Mar 2011 | A1 |
20110138122 | Hughes et al. | Jun 2011 | A1 |
20110145474 | Intrater | Jun 2011 | A1 |
20110145513 | Iyer | Jun 2011 | A1 |
20110153916 | Chinnaswamy | Jun 2011 | A1 |
20110154065 | Rothman et al. | Jun 2011 | A1 |
20110173392 | Gara et al. | Jul 2011 | A1 |
20110197018 | Noh et al. | Aug 2011 | A1 |
20110197031 | Aho et al. | Aug 2011 | A1 |
20110208900 | Schuette et al. | Aug 2011 | A1 |
20110208910 | Takada et al. | Aug 2011 | A1 |
20110231593 | Yasufuku et al. | Sep 2011 | A1 |
20110291884 | Oh et al. | Dec 2011 | A1 |
20120079232 | Hinton et al. | Mar 2012 | A1 |
20120198140 | Karamcheti et al. | Aug 2012 | A1 |
20120221785 | Chung et al. | Aug 2012 | A1 |
20120254507 | Chang et al. | Oct 2012 | A1 |
20120271985 | Jeong et al. | Oct 2012 | A1 |
20120311262 | Franceschini et al. | Dec 2012 | A1 |
20120324156 | Muralimanohar et al. | Dec 2012 | A1 |
20120324195 | Rabinovitch et al. | Dec 2012 | A1 |
20130044539 | Hirst et al. | Feb 2013 | A1 |
20130282967 | Ramanujan | Oct 2013 | A1 |
20130326583 | Freihold | Dec 2013 | A1 |
20140075107 | Qawami et al. | Mar 2014 | A1 |
20150089102 | Kumar | Mar 2015 | A1 |
Number | Date | Country |
---|---|---|
1101442 | Apr 1995 | CN |
1682199 | Oct 2005 | CN |
1230750 | Dec 2005 | CN |
1732433 | Feb 2006 | CN |
101501779 | Aug 2009 | CN |
101661435 | Mar 2010 | CN |
101981555 | Feb 2011 | CN |
0 210 384 | Feb 1987 | EP |
0 806 726 | Nov 1997 | EP |
1089185 | Apr 2001 | EP |
2278470 | Jan 2011 | EP |
20080091941 | Oct 2008 | KR |
583541 | Apr 2004 | TW |
200845014 | Nov 2008 | TW |
200903498 | Jan 2009 | TW |
200912643 | Mar 2009 | TW |
M369528 | Nov 2009 | TW |
201023193 | Jun 2010 | TW |
I327319 | Jul 2010 | TW |
201104700 | Feb 2011 | TW |
201106157 | Feb 2011 | TW |
201107974 | Mar 2011 | TW |
201120636 | Jun 2011 | TW |
WO-9950853 | Oct 1999 | WO |
WO-2010141650 | Dec 2010 | WO |
WO-2012163140 | Dec 2012 | WO |
Entry |
---|
EP Search Report, Application No. 11873012.6, for related application, dated May 20, 2015, 6 pages. |
Notice of Allowance and IPO Search Report from foreign counterpart Taiwan Patent Application No. 101132014, dated Jun. 27, 2014, 4 pages. |
The Non-Volatile Systems Laboratory “Moneta and Onyx: Very Fast SS,” <http://nvsl.ucsd.edu/moneta>, retrieved on Sep. 1, 2011, 2 pages. |
The Non-Volatile Systems Laboratory “NV-Heaps: Fast and Safe Persistent Objects,” <http://nvsl.ucsd.edu/nvheaps/>, retrieved on Sep. 1, 2011, 2 pages. |
Kant, Dr. Krishna, “Exploiting NVRAM for Building Multi-Level Memory Systems,” International Workshop on Operating System Technologies for Large Scale NVRAM, Oct. 21, 2008, Jeju, Korea, 19 pages. |
Lee et al., “Architecting Phase Change Memory as a Scalable DRAM Alternative,” ISCA '09, Jun. 20, 2009, 12 pgs., Austin, Texas, USA. |
Condit et al., “Better I/O Through Byte-Addressable, Persistent Memory,” SOSP 09, Oct. 11, 2009, pp. 133-146, Big Sky, Montana, USA. |
Freitas et al., “Storage-class memory: The next storage system technology,” IBM J. Res. & Dev., Jul.-Sep. 2008, pp. 439-447. vol. 52, No. 4/5. |
Akel et al., “Onyx: A Prototype Phase Change Memory Storage Array,” www.flashmemorysummit.com/ . . . /Proceeding_2011/08/11_S301_Akel.pdf, 5 pgs. |
Mearian, “IBM announces computer memory breakthrough Phase-change memory offers 100 times the write performance of Nand flash,” Jun. 30, 2011, 3 pgs. |
Caulfield et al., “Moneta: A High-performance Storage Array Architecture for Next-generation, Non-volatile Memories,” MICRO 43: Proceedings of the 43rd Annual IEEE/ACM International Symposium on Microarchitecture, Atlanta, GA, Dec. 2010, pp. 385-395. |
“The Non-Volatile Systems Laboratory Coding for Non-volatile Memories,” http://nvsl.ucsd.edu/ecc, printed Sep. 1, 2011, 2 pgs. |
Phase change memory-based ‘Moneta’ system points to the future of computer storage, ScienceBlog, Jun. 2, 2011, 7 pgs. |
Quereshi, et al., “Scalable High Performance Main Memory System Using Phase-Change Memory Technology,” ISCA '09, Jun. 20, 2009, 10 pgs. Austin Texas, USA. |
Bailey et al., “Operating System Implications of Fast, Cheap, Non-Volatile Memory” 13th USENIX, HOTOS11 2011, May 9-11, 2011, 5 pgs. |
Raoux et al., “Phase-change random access memory: A scalable technology,” IBM J. Res. & Dev., Jul./Sep. 2008, pp. 465-479, vol. 52, No. 4/5. |
Chen et al., “Rethinking Database Algorithms for Phase Change Memory,” 5th Biennial Conference on Innovative Data Systems Research (CIDR '11) Jan. 9, 2011, 11 pgs. Asilomar, California, USA. |
Jacob et al., “The Memory System You Can't Avoid It, You Can't Ignore it, You Can't Fake It,” 2009, 77 pgs., Morgan & Claypool. |
Mogul et al., “Operating System Support for NVM+DRAM Hybrid Main Memory,” 12th Workshop on Hot Topics in Operating Systems (HatOS XII), May 18, 2009, 9 pgs. |
PCT/US2011/054444 Notification of Transmittal of the International Search Report and the Written Opinion of the International Searching Authority, or the Declaration, dated May 23, 2012, 10 pages. |
PCT/US2011/054444 Notification of Transmittal of the International Search Report and the Written Opinion of the International Searching Authority, or the Declaration, dated Apr. 10, 2014, 7 pages. |
PCT/US2011/054444 Notification Concerning Transmittal of International Preliminary Report on Patentability, dated Apr. 10, 2014, 7 pages. |
Dhiman, et al. “PDRAM: A Hybrid PRAM and DRAM Main Memory System”, Jul. 26, 2009, Department of Computer Science and Engineering, 6 pages. |
Wu, et al., “eNVy: A Non-Volatile, Main Memory Storage System” 1994 ACM., ASPLOS VI. pp. 86-97. |
Number | Date | Country | |
---|---|---|---|
20170031821 A1 | Feb 2017 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13994731 | US | |
Child | 15192871 | US |