A computer system can include a secondary storage (also referred to as mass storage) and a memory, where the memory has a faster access speed than the secondary storage. The secondary storage can be implemented with one or multiple disk-based storage devices or other types of storage devices. The memory can be implemented with one or multiple of memory devices. Data stored in the memory can be accessed by a data requester, such as a processor, with lower latency than data stored in the secondary storage.
Due to the widening performance gap between memory and secondary storage, some applications are increasingly relying on use of the memory (instead of the secondary storage) as the primary data store of data.
Some embodiments are described with respect to the following figures:
A system can use a virtual memory address space to store data in memory. Examples of systems include computer systems (e.g. server computers, desktop computers, notebook computers, tablet computers, etc.), storage systems, or other types of electronic devices. As used here, a memory can be implemented with one or multiple memory devices. Generally, a memory refers to storage that has a lower data access latency than another storage of the system, such as secondary storage implemented with higher latency storage device(s) such as disk-based storage device(s) or other type of storage devices.
A virtual memory address space is not constrained by the actual physical capacity of the memory in the system. As a result, the virtual memory address space can be much larger than the physical address space of the memory. The physical address space includes physical addresses that correspond to physical locations of the memory. In contrast, the virtual address space includes virtual addresses that are mapped to the physical addresses. A virtual address does not point to a physical location of the memory; rather, the virtual address is first translated to a physical address that corresponds to the physical location in memory.
At the time of memory allocation (allocation of portions of the memory 106 to respective processes executing in the system), an operating system (OS) 109 of the system 100 can create mappings between the virtual address space and the respective physical address space for each process.
In some examples, the OS 109 can store each mapping in a data structure referred to as a page table 102. The page table 102 maps a virtual page (which is a data block of a specified size) used by a process to a respective physical memory page (a block of the memory). The OS 109 can maintain a separate page table for each active process that uses the memory 106.
The processor 108 in the system 100 can execute an instruction (e.g. load instruction or store instruction) of the process 108 that results in an access (read access or write access, respectively) of the memory 106. The address of the instruction is a virtual address that points to a location in the virtual address space. The respective page table 102 can be used to translate the virtual address of the instruction to a physical address. To speed up the address translation process, a subset of the page table 102 can be cached in a cache, referred to as a translation lookaside buffer (TLB) 111. The TLB 111 can store the most recently accessed entries of the page table 102, for example.
When a load or store instruction is issued, the processor 109 first accesses the TLB 111 to find the respective physical address. However, if the TLB 111 does not contain an entry for the virtual address of the instruction, then a miss of the TLB 111 has occurred, in which case a page table walk procedure can be invoked to traverse the page table 102 to find the corresponding physical address. The page table walk procedure traverses through the page table 102 to identify an entry that contains a mapping to map the virtual address of the load or store instruction to a physical address.
In accordance with some implementations, to improve performance of the page table walk procedure as compared to traditional techniques or mechanisms, the page table 102 is stored in a memory region 104 that has a lower access latency than that of the memory 106. In implementations according to
Storing the page table 102 in the memory region 104 with reduced access latency improves performance of the page table walk procedure over an arrangement in which a page table is stored in the slower memory 106.
In some examples, a page table can be a multi-level page table. A multi-level page table includes multiple page table portions (at different levels) that are accessed in sequence during the page table walk procedure to find an entry that contains a mapping between the virtual address of the load or store instruction and the corresponding physical address. In response to a miss in the TLB 111, the page table walk procedure uses a portion of the virtual address to index to an entry of the page table portion at a highest level of the different levels. The selected entry contains an index to a page table portion at the next lower level. The foregoing iterative process continues until the page table portion at the lowest level is reached. The selected entry of the lowest level page table portion contains an address portion that is combined with some portion (e.g. lowest M bits) of the virtual address to generate the final physical address. Walking through the multiple levels of page table portions is a relatively slow process, especially in implementations where the multi-level page table is stored in the memory 106.
By implementing the page table 102 in the faster memory region 104, the penalty associated with a miss of the TLB 111 can be reduced, since a page table walk procedure in the memory region 104 would be faster than a page table walk procedure in the slower memory 106.
The page table 102 maintained in the faster memory region 104 can be a multi-level page table. In other examples, the page table 102 can be a single-level page table.
The buffer device 112 can be implemented as an integrated circuit (IC) chip. For example, the buffer device 112 can be a die that is part of a memory stack, which is a stack of multiple dies. The stack of dies includes one or multiple memory dies that include respective memory device(s) for storing data. Another of the dies in the memory stack is a logic die, which can include the buffer device 112 (this logic die can be referred to as a buffer device die).
In different examples, the buffer device 112 can be provided on a memory module, on a main circuit board, and so forth. Although just one buffer device 112 is depicted in
The buffer device 112 can include buffer storage (not shown) for temporarily buffering data that is communicated between the processor 110 and the memory 106. In addition, the buffer device 112 can include logic (not shown) for routing requests and addresses between the processor 110 and the memory 106.
In addition, as depicted in
Although the memory region 104 is shown as being part of the buffer device 112, it is noted that in alternative implementations, the memory region 104 can be implemented separately from the buffer device 112. In such alternative implementations, the memory region 104 can be coupled to the buffer device 112, For example, if the buffer device 112 is in a buffer device die of a memory stack, the memory region 104 can be part of another die that is stacked on top of the buffer device die. Alternatively, the memory region 104 can be part of circuitry directly connected to the buffer device 112 over a point-to-point link. A point-to-point link refers to a link in which two devices connected to the link can communicate directly with each other, without having to seek arbitration for access of the link.
In response to a memory request (e.g. load instruction, store instruction, etc.) of the process 108 that specifies a virtual address, the processor 110 first attempts to determine if the TLB 111 contains an entry corresponding to the virtual address of the memory request. If such entry is not in the TLB 111, then a miss is considered to have occurred.
In response to a miss (as determined at 206) in the TLB 111 responsive to a lookup of a virtual address of the memory request, the processor 110 can send (at 208) a page table lookup indication to the buffer device 112. The page table lookup indication is an indication that a page table walk procedure is to be performed with respect to the page table 102. In response to the page table lookup indication, the page table walk logic 114 performs (at 210) a lookup of the page table 102 in the memory region 104 to find a physical address corresponding to the virtual address of the memory request.
However, if the received address is not in the specified address range, then that is an address for a normal access of the memory 106, in which case the address range detector 304 provides the received address to address logic 306 of the buffer device 112A. The address logic 306 outputs a corresponding address onto a memory address bus 308 that is between the buffer device 112A and the memory 106.
The buffer device 112A is also connected to a host data bus 310 that is between the processor 110 and the buffer device 112A. The host data bus 310 is used to carry data between the processor 110 and the buffer device 112A. In addition, a memory data bus 312 is between the memory 106 and the buffer device 112A.
The buffer device 112A includes data logic 314 that is able to provide data read from the memory 106 to the processor 110 over the host data bus 310, or alternatively, to provide write data from the host data bus 310 to the memory data bus 312 for writing to the memory 106.
In accordance with some implementations, the page table walk logic 114 is also coupled to the host data bus 310. In response to a page table walk procedure, a physical address that is retrieved by the page table walk logic 114 from the page table 102 that corresponds to a virtual address can be output over the host data bus 310 back to the processor 110. The processor 110 can use this physical address to submit a request to access (read access or write access) the memory 106.
In other examples, instead of providing the buffer devices on the memory modules 510 and 512 as those shown in
In a system that has multiple buffer devices, each having its respective page table, a single process (e.g. 108 in
In some implementations, a process identifier (PID) of a process, such as process 108 in
In alternative implementations, a hash can be performed on the virtual address and the PID to identify a single buffer device from the multiple buffer devices. A page table lookup can then be performed in the page table of the identified buffer device,
In alternative implementations, instead of using the XOR gate 606 as the hash logic, other types of hash logic can be provided to apply hashing of the virtual address 604 and the PID.
In
Once a buffer device is selected based on the output of the XOR gate 606606, a page table walk procedure can he performed in the page table of the selected buffer device. In the example of
In accordance with some implementations, a constraint can be specified that constrains a page table walk procedure to a single buffer device. Although one process can be associated with page tables in the multiple buffer devices 608, once a buffer device is selected based on the hash applied by the XOR gate 606, then a pointer from a page table portion in the selected buffer device should not lead to an entry of a page table in another buffer device. This constraint can speed up the page table walk procedure since the lookup would not have to traverse multiple buffer devices.
As noted above, the page table walk logic 114 can be implemented using a hardware controller. In some examples, the hardware controller can execute machine-readable instructions, such as firmware or software.
Data and instructions can be stored in respective storage devices, which are implemented as one or more computer-readable or machine-readable storage media. The storage media include different forms of memory including semiconductor memory devices such as dynamic or static random access memories (DRAMs or SRAMs), erasable and programmable read-only memories (EPROMs), electrically erasable and programmable read-only memories (EEPROMs) and flash memories; magnetic disks such as fixed, floppy and removable disks; other magnetic media including tape; optical media such as compact disks (CDs) or digital video disks (DVDs); or other types of storage devices. Note that the instructions discussed above can be provided on one computer-readable or machine-readable storage medium, or alternatively, can be provided on multiple computer-readable or machine-readable storage media distributed in a large system having possibly plural nodes. Such computer-readable or machine-readable storage medium or media is (are) considered to be part of an article (or article of manufacture). An article or article of manufacture can refer to any manufactured single component or multiple components. The storage medium or media can be located either in the machine running the machine-readable instructions, or located at a remote site from which machine-readable instructions can be downloaded over a network for execution.
In the foregoing description, numerous details are set forth to provide an understanding of the subject disclosed herein. However, implementations may be practiced without some or all of these details. Other implementations may include modifications and variations from the details discussed above. It is intended that the appended claims cover such modifications and variations.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2013/048901 | 7/1/2013 | WO | 00 |