Data processing method, device and system for memory device
Through the serial bus communication between the independent controller and the processor, DRAM and SCM, writing to DRAM is prioritized and flashed to SCM under appropriate conditions, which solves the memory wall problem and achieves memory capacity expansion and cost reduction.
Patent Information
- Application Number
- CN202410819920.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-27
- Filing Date
- 2020-07-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-07-28
AI Technical Summary
Traditional memory controllers are built into the CPU, which results in the number, capacity, and bandwidth of memory channels failing to match the rapidly growing CPU cores, causing a memory wall problem. In addition, existing expansion technology occupies DDR channels, limiting memory capacity expansion.
An independent controller is used to communicate with the processor, DRAM and SCM, and data is exchanged through the serial bus. Data is written to DRAM with high read and write performance first, and the data is flushed to SCM under appropriate conditions to realize memory Capacity expansion to avoid occupying DDR channels.
The memory capacity expansion is not limited by the number of DDR channels, which reduces the expansion cost and does not require modification of the application program or operating system, simplifying the implementation process.
Smart Images

Figure CN118779250A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202010740899.6, and the original application date is July 28, 2020. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of data storage technology, and in particular to a data processing method, device and system for a memory device. Background Art
[0003] In traditional technology, the memory controller is built into the central processing unit (CPU), and the memory controller communicates with the dynamic random access memory (DRAM) through a double data rate (DDR) parallel bus. Figure 1 As shown in Figure 1. The CPU accesses DRAM through the DDR parallel bus.
[0004] With the evolution of technology, the number of CPU cores is growing rapidly. Limited by the physical limitations of CPU area and DRAM process scaling, the growth rate of memory channels, capacity and bandwidth cannot fully match the CPU, which seriously affects the overall performance of the system and forms a memory wall problem. Therefore, solving the memory wall problem is urgent.
[0005] A technical solution to solve the memory wall is as follows Figure 2 As shown, specifically, the memory controller connects the storage class memory (SCM) via a DDR parallel bus to achieve memory expansion. However, this technical solution will occupy additional DDR channels, resulting in the expansion of memory capacity being limited to the number of DDR channels, that is, when the number of DDR channels is occupied, the memory capacity cannot be expanded. Summary of the invention
[0006] The embodiments of the present application provide a data processing method, apparatus and system for a memory device, which can realize memory capacity expansion, and the memory capacity expansion is not limited by the number of original DDR channels.
[0007] In order to achieve the above objectives, this application adopts the following technical solutions:
[0008] In the first aspect, a data processing method for a memory device is provided, wherein the memory device includes a controller, a first memory, and a second memory; the controller communicates with a processor, the first memory, and the second memory respectively; the read and write performance of the first memory is higher than the read and write performance of the second memory. The method includes: receiving an operation request from a processor; the operation request includes a logical address; accessing the first memory or the second memory according to the logical address. The technical solution can achieve memory capacity expansion. Moreover, on the one hand, memory capacity expansion is not limited by the number of original DDR channels. On the other hand, compared with the prior art, the cost of memory capacity expansion is lower. On the other hand, when implementing data operation requests, no application modification and adaptation is required, no operating system installation of corresponding drivers is required, and no BIOS configuration is required, so the implementation is simple. The specific analysis process can be referred to below.
[0009] In a possible design, the operation request is a write operation; accessing the first memory or the second memory according to the logical address specifically includes: writing the data to be written to the storage space indicated by the first physical address of the first memory according to the logical address; the first physical address is the physical address in the first memory corresponding to the logical address. Since the read and write performance of the first memory is higher than the read and write performance of the second memory, data is preferentially written to the first memory, which helps to improve the efficiency of writing data.
[0010] In one possible design, the method further includes: flushing the data in the first memory that meets the first condition to the second memory. The data that meets the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to the first threshold; data whose storage time is greater than or equal to the second threshold; or data whose probability of being read hit is less than or equal to the third threshold. This technical solution can be considered as a process of persisting data. In this way, on the one hand, it helps to free up the storage space of the first memory so that the processor can continue to write data to the first memory, thereby achieving memory capacity expansion. On the other hand, compared with some traditional technologies in which data persistence is performed only when the system is powered off, the present technical solution does not require a large-capacity power supply specially set up to achieve data persistence, thus helping to save costs.
[0011] In a possible design, the method further includes: writing data in the second memory that meets the second condition into the first memory. The data that meets the second condition includes at least one of the following: data to be read predicted based on the read data; data with a probability of being hit by a read greater than or equal to a fourth threshold; or, based on the read operation sent by the processor, data to be read when the first memory is not hit by a read. In this way, if the second condition is set reasonably, it helps to improve the efficiency of subsequent data reading.
[0012] In a possible design, the method further includes: when the operation request is a read operation, accessing the first memory or the second memory according to the logical address, specifically including: when the first memory stores the data to be read, reading the data to be read from the first memory according to the logical address; when the first memory does not store the data to be read, reading the data to be read from the second memory according to the logical address. Since the read and write performance of the first memory is higher than the read and write performance of the second memory, this helps to improve the data reading rate.
[0013] In a second aspect, a controller is provided, which communicates with a processor, a first memory, and a second memory respectively; the read and write performance of the first memory is higher than the read and write performance of the second memory; the controller includes: a bus interface, a first processor, and a memory controller. The bus interface is used to receive an operation request sent by the processor, and the operation request includes a logical address; the first processor is used to send a first instruction to the memory controller according to the logical address; the memory controller is used to access the first memory or the second memory based on the first instruction. Among them, the first processor can be called a CPU processor, such as an ARM processor or an X86 processor.
[0014] In one possible design, the operation request is a write operation; the memory controller is specifically used to write the data to be written to the storage space indicated by the first physical address of the first memory; the first physical address is a physical address in the first memory corresponding to the logical address.
[0015] In a possible design, the first processor is further used to send a second instruction to the memory controller; the memory controller is further used to flush the data in the first memory that meets the first condition to the second memory based on the second instruction. The data that meets the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to the first threshold; data with a storage time greater than or equal to the second threshold; data with a probability of being hit by a read less than or equal to a third threshold; or, based on the read operation sent by the processor, data to be read when the first memory does not have a read hit.
[0016] In a possible design, the first processor is further used to send a third instruction to the memory controller; the memory controller is further used to write data in the second memory that meets the second condition into the first memory based on the third instruction. The data that meets the second condition includes at least one of the following: data to be read predicted based on the read data; or data with a probability of being read hit greater than or equal to a fourth threshold.
[0017] In one possible design, the operation request is a read operation, and the memory controller is specifically used to: when the first memory stores the data to be read, read the data to be read from the first memory according to the logical address; when the first memory does not store the data to be read, read the data to be read from the second memory according to the logical address.
[0018] In one possible design, the controller is applied to a memory device, and the memory device also includes a first memory and a second memory.
[0019] In a third aspect, a controller is provided, which communicates with a processor, a first memory, and a second memory respectively; the read and write performance of the first memory is higher than the read and write performance of the second memory; the controller includes: a receiving unit, used to receive an operation request from the processor; the operation request includes a logical address; and a processing unit, used to access the first memory or the second memory according to the logical address.
[0020] In one possible design, the operation request is a write operation; the processing unit is specifically used to: write the data to be written to the storage space indicated by the first physical address of the first memory according to the logical address; the first physical address is the physical address in the first memory corresponding to the logical address.
[0021] In a possible design, the processing unit is further used to: flush the data in the first memory that meets the first condition to the second memory. The data that meets the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to the first threshold; data whose storage time is greater than or equal to the second threshold; or data whose probability of being read hit is less than or equal to the third threshold.
[0022] In a possible design, the processing unit is further used to: write data in the second memory that meets the second condition into the first memory. The data that meets the second condition includes at least one of the following: data to be read predicted based on the read data; data with a probability of being hit by a read greater than or equal to a fourth threshold; or data to be read when the first memory is determined to have no read hit based on the read operation sent by the processor.
[0023] In one possible design, the operation request is a read operation; the processing unit is specifically used to: when the first memory stores the data to be read, read the data to be read from the first memory according to the logical address; when the first memory does not store the data to be read, read the data to be read from the second memory according to the logical address.
[0024] In one possible design, the controller is applied to a memory device, and the memory device also includes a first memory and a second memory.
[0025] Based on any one of the technical solutions provided in the first to third aspects above, several possible designs are provided below:
[0026] In one possible design, the persistence performance of the first memory is lower than the persistence performance of the second memory.
[0027] In one possible design, the first memory is DRAM and the second memory is SCM;
[0028] In a possible design, the first memory is DRAM and the second memory is NAND Flash.
[0029] In one possible design, the controller communicates with the processor via a serial bus.
[0030] In one possible design, the serial bus includes a PCIe bus.
[0031] In a possible design, the memory device is specifically a memory module. Alternatively, the memory device includes a mainboard and a memory module, the controller is fixed on the mainboard, and the memory module includes a first memory and a second memory.
[0032] In a fourth aspect, a computer system is provided, comprising: a processor, a controller, a first memory, and a second memory. The controller communicates with the processor, the first memory, and the second memory respectively; the read and write performance of the first memory is higher than the read and write performance of the second memory. The controller is used to execute any method in the first aspect or any possible design provided in the first aspect.
[0033] In a fifth aspect, a chip system is provided, which includes the second aspect or any controller in any possible involvement provided by the second aspect, or includes the third aspect or any controller in any possible involvement provided by the third aspect.
[0034] In a sixth aspect, a computer-readable storage medium is provided, such as a non-transitory computer-readable storage medium, on which a computer program (or instruction) is stored, and when the computer program (or instruction) is executed on a computer, the computer executes any method provided by any possible implementation of the first aspect.
[0035] According to a seventh aspect, a computer program product is provided, which, when executed on a computer, enables any method provided by the first aspect or any possible implementation of the first aspect to be executed.
[0036] It can be understood that any of the controllers, computer systems, computer storage media, computer program products or chip systems provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be repeated here.
[0037] In this application, the names of the above controllers or functional modules do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.
[0038] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of the connection relationship between a CPU and a DRAM in conventional technology;
[0040] Figure 2 A schematic diagram of a system for expanding memory capacity in conventional technology;
[0041] Figure 3 A schematic diagram of the structure of a computer system provided in an embodiment of the present application;
[0042] Figure 4A A schematic diagram of the structure of another computer system provided in an embodiment of the present application;
[0043] Figure 4B A schematic diagram of the structure of another computer system provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of another computer system provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of a controller provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the hardware structure of a computer system provided in an embodiment of the present application;
[0047] Figure 8 A schematic diagram of the hardware structure of another computer system provided in an embodiment of the present application;
[0048] Fig. 9 A schematic diagram of the hardware structure of another computer system provided in an embodiment of the present application;
[0049] Fig. 10A A flowchart of a method for writing data provided by an embodiment of the present application;
[0050] Fig. 10B The embodiments of this application are based on Fig. 10A A schematic diagram of a process of a controller executing a method of writing data is provided;
[0051] Fig.11A A flowchart of a method for exchanging data from a first memory to a second memory provided in an embodiment of the present application;
[0052] Fig. 11B The embodiments of this application are based on Fig.11AA schematic diagram of a process of a controller executing a method for exchanging data from a first memory to a second memory is provided;
[0053] Fig.12 A flowchart of a method for writing data and exchanging data from a first memory to a second memory provided in an embodiment of the present application;
[0054] Fig.13A A flowchart of a method for reading data provided in an embodiment of the present application;
[0055] Fig. 13B The embodiments of this application are based on Fig.13A A schematic diagram of a controller performing a process of reading data is provided;
[0056] Fig.14A A flowchart of a method for exchanging data from a first memory to a second memory provided in an embodiment of the present application;
[0057] Fig. 14B The embodiments of this application are based on Fig.14A A schematic diagram of a process of a controller executing a method of exchanging data from a second memory to a first memory is provided;
[0058] Fig.15 A schematic diagram of the structure of another controller provided for the implementation of this application;
[0059] Fig.16 A schematic diagram of the structure of another controller provided for the implementation of the present application. DETAILED DESCRIPTION
[0060] The following is an explanation of some of the terms involved in the embodiments of the present application:
[0061] 1) Memory expansion
[0062] Memory expansion refers to increasing memory capacity, bandwidth, etc.
[0063] 2) Memory persistence
[0064] Traditional DRAM memory is a volatile solution, that is, the data disappears after power failure, and critical data in the memory needs to be backed up at all times and reloaded after power failure. In scenarios with strict requirements on data integrity, the demand for memory persistence will become increasingly greater.
[0065] Data persisted in memory will not be lost after the system power is turned off.
[0066] A product (hereinafter referred to as a traditional product) is proposed to solve the problem of persistent memory expansion. The traditional product is a traditional 288-pin dual inline memory module (DIMM) strip. The traditional product is essentially an SCM. The technical essence of the traditional product is as follows Figure 2 This technical solution will occupy additional DDR channels, resulting in the expansion of memory capacity being limited by the number of DDR channels.
[0067] 3) Other terms
[0068] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0069] In the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, "plurality" means two or more.
[0070] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0071] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0072] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0073] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0074] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0075] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0076] It should also be understood that the term "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0077] It should be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0078] The following describes a computer system provided by an embodiment of the present application in conjunction with the accompanying drawings.
[0079] like Figure 3 , which is a schematic diagram of the structure of a computer system 1 provided in an embodiment of the present application. Figure 3 The computer system 1 shown includes: a processor 11, a controller 12, a first memory 13 and a second memory 14. The controller 12 communicates with the processor 11, the first memory 13 and the second memory 14 respectively. In the embodiment of the present application, the controller 12, the first memory and the second memory can constitute a memory device, and the specific product form is not limited in the embodiment of the present application, for example, it can be a memory module, etc., and for example, it can include a motherboard and a memory module, etc.
[0080] Optionally, the controller 12 and the processor 11 may communicate via a serial bus. For example, the serial bus may be a peripheral component interconnect express (PCIe) bus, etc. The specific examples below are all described using this as an example.
[0081] Optionally, the controller 12 and the processor 11 may communicate via a parallel bus.
[0082] The first memory 13 and the second memory 14 are different types of memories, and the read and write performance of the first memory 13 is higher than the read and write performance of the second memory 14 (for example, the read and write rate of the first memory 13 is higher than the read and write rate of the second memory). The first memory 13 and the second memory 14 are connected to the controller 12 through memory interfaces respectively.
[0083] Optionally, the persistence performance of the first memory 13 is lower than the persistence performance of the second memory 14 .
[0084] For example, the first memory 13 is a DRAM, and the second memory 14 is an SCM. In this case, the first memory 13 is connected to the controller 12 based on a DRAM interface, and the second memory 14 is connected to the controller 12 based on an SCM interface.
[0085] For another example, the first memory 13 is a DRAM, and the second memory 14 is a NAND (Not AND, NAND) flash memory. NAND Flash is hereinafter referred to as NAND. In this case, the first memory 13 communicates with the controller 12 based on a DRAM interface, and the second memory 14 communicates with the controller 12 based on a NAND interface.
[0086] The processor 11 is used to send a read instruction and / or a write instruction to the controller 12. The processor 11 may be a CPU or the like.
[0087] The controller 12 is used to read the data stored in the first memory 13 based on the read instruction sent by the processor 11, and feed the read data back to the processor 11. And, based on the write instruction sent by the processor 11, write data to the first memory 13. In addition, the controller 12 also has one or more functions of controlling the exchange of data between the first memory 13 and the second memory 14, localized memory management, address mapping, hot data analysis or data pre-fetching unloading management. For the relevant introduction of these functions, please refer to the following.
[0088] Specifically, the controller 12 may include a first memory controller and a second memory controller. The first memory controller is used to read and write the first memory 13, and the second memory controller is used to read and write the second memory 14. For example, the first memory 13 is a DRAM and the second memory 14 is an SCM. The first memory controller is specifically a DRAM controller (which is equivalent to the "memory controller" described in the traditional technology, such as Figure 1 The second memory controller is specifically a SCM controller.
[0089] Optionally, the processor 11 may or may not have a built-in memory controller.
[0090] The following is a specific example of Figure 3 The computer system 1 shown is specifically described as follows:
[0091] For example, the processor 11 is specifically a CPU, the first memory 13 is specifically a DRAM, and the second memory 14 is specifically an SCM. The first memory controller in the controller 12 is used to read and write the DRAM. The second memory controller in the controller 12 is used to read and write the SCM. The first memory controller communicates with the DRAM via a DDR parallel bus. Figure 4A and Figure 4B The figure shows a schematic diagram of the structure of two computer systems provided in this application based on this example.
[0092] Figure 4A In the computer system shown, the CPU does not have a built-in memory controller. Figure 1 The computer system shown can be considered Figure 4A The improvements of the computer system shown include: first, Figure 1 The memory controller built into the CPU shown in the figure has been moved outside the CPU. In other words, Figure 1 The CPU's built-in memory controller is shown with Figure 4A The first memory controller in the controller shown can be considered as the same device. Second, a second memory controller is set in the controller to implement reading and writing of the newly added SCM. Third, the connection relationship between the controller and the CPU is increased.
[0093] Figure 4A The computer system shown in FIG. 1 increases the memory capacity by adding an SCM. The solution does not use the original memory controller (equivalent to Figure 1 The memory controller in the Figure 1 The DDR parallel bus between the original memory controller and the original DRAM is specifically Figure 4A A DDR parallel bus between the first memory controller and the DRAM.
[0094] Figure 4B In the computer system shown, the CPU has a built-in memory controller. Figure 1 The computer system shown can be considered Figure 4B The improvements of the computer system shown include: Figure 1 On the basis of the CPU, the controller is connected to the CPU through a serial bus. In addition, the controller is also connected to the DRAM and SCM respectively, and the controller is provided with a first memory controller and a second memory controller to realize the reading and writing of the newly added DRAM and SCM. In this embodiment, in order to distinguish the DRAM connected to the CPU built-in memory controller and the DRAM connected to the first memory controller, Figure 4B In the DRAM memory controller built into the CPU, the DRAM connected to the CPU is called "original DRAM".
[0095] Figure 4B The computer system shown in the figure increases the memory capacity by adding DRAM and SCM. The technical solution does not use the DDR parallel bus between the original memory controller and the original DRAM. Therefore, the memory capacity expansion is not limited by the number of original DDR channels. Figure 4B The DDR parallel bus between the CPU's built-in memory controller and the original DRAM.
[0096] In addition, Figure 4A and Figure 4B In the computer system shown, since the controller is responsible for reading, writing and exchanging data in the memory (including DRAM and SCM), if the controller can write data to DRAM first when writing data, and read data from DRAM first when reading data, then the CPU will perceive that it has been accessing a large-capacity DRAM (the large capacity here is actually the capacity of the SCM, which is relative to the capacity of the DRAM itself), but will not perceive that the large-capacity DRAM is actually the SCM. For example, assuming that the capacity of the DRAM is 1G and the capacity of the SCM is 10G, then the CPU can perceive a memory capacity of 10G, where the 1G DRAM is used as a cache for the 10G SCM.
[0097] On the one hand, since the CPU will not perceive the newly added SCM, the CPU will not perceive the data reading and writing process and the data exchange process performed by the controller. Therefore, the data reading and writing process and the data exchange process do not require application modification and adaptation, do not require the operating system to install the corresponding driver, and do not require the basic input output system (BIOS) configuration.
[0098] It should be noted that when traditional products implement data persistence, the application needs to be modified and adapted, the operating system needs to install the corresponding driver, and the BIOS needs to be configured.
[0099] It should also be noted that the technical solution provided by the embodiment of the present application supports partial and full persistence of data written by the CPU. Data persistence can be considered as data written from DRAM to SCM. For the specific process of persistence, please refer to the following. Based on the description above, when applied to the scenario of data persistence, comparing the technical solution provided by traditional products and the embodiment of the present application: traditional products tend to move up the persistence management, with a high degree of "softening (i.e., softwareization)"; the technical solution provided by the embodiment of the present application tends to push down the persistence management, with a high degree of "hardening (i.e., hardwareization)".
[0100] On the other hand, since the cost of SCM is lower than that of DRAM, it is more cost-effective than the technical solution of "expanding memory capacity by adding additional DRAM" in the prior art (for example, Figure 2 For the technical solution shown in the figure), this technical solution helps to achieve low-cost memory capacity expansion.
[0101] It should be noted that even if the controller does not have the data to be read in the DRAM during actual implementation, it will read the data to be read from the SCM. This requires adjusting the data exchange strategy between the DRAM and the SCM, etc., so as to balance the overall read and write performance and cost of the computer system, thereby optimizing the overall performance of the computer system. For a detailed description of the data exchange strategy provided in the embodiment of the present application, please refer to the following.
[0102] In summary, the computer system provided by the embodiment of the present application can realize memory capacity expansion. Moreover, on the one hand, the memory capacity expansion is not limited by the number of original DDR channels. On the other hand, compared with the prior art (such as Figure 2The technical solution shown in the figure has a low cost for memory capacity expansion. On the other hand, when the computer system implements data read and write operations, it does not require the application to be modified and adapted, the operating system does not need to install the corresponding driver, and BIOS configuration is not required, so the implementation is simple. In addition, the technical solution can achieve the expansion of memory bandwidth while expanding memory capacity. Among them, the expansion of memory bandwidth is from the perspective of the serial bus. Since the serial bus does not occupy the original DDR channel of the CPU, it is possible to expand (or increase) the memory bandwidth.
[0103] The following is a description of the embodiments of the present application. Figure 3 The computer system 1 shown is described in detail:
[0104] like Figure 5 , which is a schematic diagram of the structure of another computer system 1 provided in an embodiment of the present application. Figure 5 is Figure 3 Specifically, Figure 3 The controller 12 may include the following modules / devices:
[0105] The serial host interface 121 is used for the controller 12 to communicate with the processor 11. Optionally, the serial host interface 121 can be a front-end bus interface that supports memory semantics based on a low-latency serial bus and high-speed Serdes serial-to-parallel conversion. Serdes is the abbreviation of serializer (SERializer) / deserializer (DESerializer).
[0106] A hybrid memory management unit (HMMU) 122 is used to combine the characteristics of the first memory 13 and the second memory 14 to implement functions such as localized memory management, address mapping, hot data analysis, and data pre-fetching and unloading management.
[0107] The first memory controller 123 is used for controlling and managing data reading and writing of the first memory 13 .
[0108] The second memory controller 124 is used for controlling and managing data reading and writing of the second memory 14 .
[0109] Data switch engine 125: It is a key module for opening up the hybrid media data path. The data switch engine 125 is connected to the first memory controller 123 and the second memory controller 124 respectively, and is used to realize the data exchange between the first memory 13 and the second memory 14 by controlling the first memory controller 123 and the second memory controller 124. For example, the data stored in the first memory 13 is read and written to the second memory 14 to realize data persistence. For another example, the data stored in the second memory 14 is read and written to the first memory 13 to realize the controller 12 to read data quickly.
[0110] Firmware module 127: a module for implementing key algorithms such as memory persistence, mixed media management, and table entry mapping.
[0111] It should be noted that Figure 5 The connection relationship between the modules / devices shown in Figure 5 , I will not go into details here.
[0112] like Figure 6 , which is a schematic diagram of the structure of a controller 12 provided in an embodiment of the present application. Figure 6 is Figure 5 And, Figure 6 The description is made by taking “the processor 11 is specifically a CPU, the first memory 13 is specifically a DRAM, and the second memory 14 is specifically an SCM” as an example.
[0113] The serial bus interface 121 may include a port physical layer (PHY), a high-speed Serdes (HS Serdes), and a memory protocol module, etc. Among them, PHY represents the physical layer of the storage medium, HS Serdes is used for serial-to-parallel conversion, and the memory protocol module is used to parse protocols related to data storage, etc.
[0114] The first memory controller 123 (specifically a DRAM controller) may include:
[0115] Read queue: a queue control module composed of all read requests in the first memory controller 12 .
[0116] Write queue: a queue control module composed of all write requests in the first memory controller 123 .
[0117] Operation (transactions) module: is a control module for initiating read and write operation commands to the DRAM in the first memory controller 123. The operation module can also be called an interaction module.
[0118] DDR interface: It is a module that initiates the timing of read and write operation commands to DRAM.
[0119] DDR PHY: is the physical interface of the DRAM controller.
[0120] The second memory controller (specifically, the SCM controller) 124 may include:
[0121] IO sequencer: A module that schedules SCM read and write IO requests. Optionally, the IO sequencer can include a normal queue and an urgent queue.
[0122] Backend datapath: A module that processes data on the SCM, including but not limited to at least one of the following modules: an error checking and correcting (ECC) module, a scrambling (SCR) module, or an encryption and decryption (crypto) module.
[0123] SCM interface: It is a module that initiates read and write operation command sequences to the SCM.
[0124] SCM PHY: is the physical interface of the SCM controller.
[0125] Optionally, the second memory controller 124 may further include:
[0126] Redundant array of independent disks (RAID) module: A module that performs RAID operations on SCM data.
[0127] Data buffer: Serves as a cache for SCM to read and write data, such as static random-access memory (SRAM).
[0128] The firmware module 127 may include:
[0129] Hybrid flash translation layer (HFTL): a Hybrid-FTL algorithm that supports hybrid media table entry management provided in an embodiment of the present application, which is a memory semantic optimization and is used to access the first memory or the second memory according to the logical address in the operation request from the processor, that is, to realize the mapping of the logical address to the physical address of the first memory or the second memory. HFTL can be used to implement some functions of the firmware module 127. Of course, the firmware module 127 can also include other functional modules to implement other functions of the firmware module 127. In addition, as an example, HFTL and HMMU122 can be located in the CPU system of the controller 12. In addition, the CPU system can also include a CPU processor, such as an ARM (advanced RISC machines) processor. Among them, RSIC is the English abbreviation for reduced instruction set computer. It should be noted that the ARM processor can also be replaced by other types of processors, such as an X86 processor. The specific examples below are all explained by taking the ARM processor as an example.
[0130] exist Figure 5 On the basis of, the controller 12 may further include:
[0131] DDR datapath control module 128: a control module for initiating a read request to the DRAM controller.
[0132] SCM datapath control module 129: a control module that initiates a read request to the SCM controller.
[0133] Optionally, the controller 12 may further include:
[0134] Compression / decompression module (compression / de-compression) 130: is a hardware implementation of a high-performance memory compression / decompression algorithm. The compression module and the decompression module may be implemented by the same hardware or by different hardware. Of course, at least one of the compression module and the decompression module may also be implemented by software, or by a combination of software and hardware. This embodiment of the present application does not limit this.
[0135] Hardware acceleration system (gardware accelerator system) 131: is a high-performance hardware acceleration unit that can help accelerate the algorithms of HMMU and HFTL.
[0136] It should be noted that, in actual implementation, the management of table entries in HMMU and HFTL (such as adding, modifying or deleting, etc.) can be performed by a CPU processor in a CPU system (such as the ARM processor described in this article), or by the hardware acceleration system 131. For the convenience of explanation, the specific examples below are all based on the example that the management of table entries in HMMU and HFTL is performed by an ARM processor.
[0137] Understandably, Figure 6 This is only an example. In actual implementation, the controller 12 may also include Figure 6 More or fewer devices / modules than those shown. And, Figure 6 The specific implementation of each module shown in the figure can refer to the corresponding prior art if it does not conflict with the technical solution described in the embodiments of the present application.
[0138] It should be noted that when the first memory 13 and the second memory 14 are other types of memories, those skilled in the art may Figure 6 The specific implementation method of the controller 12 is determined by the description, which will not be repeated here.
[0139] The following describes a specific implementation of the computer system 1 in terms of hardware implementation. In terms of hardware implementation, the controller 12 may be implemented by a chip.
[0140] In one implementation, Figure 7 As shown, the controller 12, the first memory 13 and the second memory 14 can be implemented on a hardware module, and the hardware module can be interconnected with the processor 11 via a serial bus. This implementation scheme can achieve single module memory persistence. Optionally, the hardware module can be customized. As an example, the hardware module can also be referred to as a memory expansion module or a memory module, that is, the memory device described above specifically exists in the form of a memory module.
[0141] Taking the first memory 13 as DRAM and the second memory 14 as SCM as an example, the hardware module form can be similar to the standard DIMM form, the difference is that the DIMM is attached with DRAM particles and uses a parallel bus, while the hardware module is attached with mixed medium particles (i.e., DRAM particles and SCM particles) and uses a serial bus. In specific implementation, the processor 11 can support access to the hardware module through custom semantics on the serial bus.
[0142] Optionally, the hardware module may be a standard PCIe module. The PCIe module is interconnected with the processor 11 via a PCIe bus. Figure 8As shown. This implementation scheme can customize the hardware module. In specific implementation, the processor 11 can support access to the hardware module on the PCIe bus. The module form is similar to the form of a standard PCIe disk. Taking the first memory 13 as DRAM and the second memory 14 as SCM as an example, the difference between the module form and the standard PCIe disk form is that the standard PCIe disk is affixed with NAND, which only supports IO semantics (Block semantics), while the module is affixed with mixed media particles, which only supports memory semantics.
[0143] In actual implementation, this implementation requires customized hardware, and the IO semantics must be converted into memory semantics through the standard PCIe bus. The access bandwidth is limited by the PCIe standard (for example, the bandwidth of a single lane of PCIe 4.0 is 2GB / s).
[0144] In another implementation, Fig. 9 As shown, the controller 12 can be soldered on the mainboard, and one side is interconnected with the processor 11 through a serial bus. The other side can be connected to the first memory 13 and the second memory 14. Taking the first memory 13 as DRAM and the second memory 14 as SCM as an example, the other side can be connected to a DRAM memory bar in the form of a standard DIMM, and an SCM memory bar in the form of a customized DIMM. In this case, the memory device described above specifically exists in the form of a mainboard, a first memory, and a second memory. Optionally, the first memory and the second memory are located in a hardware module (or a memory module). In this case, the memory device described above specifically exists in the form of a mainboard and a memory module.
[0145] In the specific implementation, this implementation scheme solders the controller 12 to the motherboard, and inserts the DRAM memory stick and the customized SCM memory stick into the standard DIMM slot of the motherboard to achieve memory expansion and persistence. The hybrid media memory stick can also be directly customized. This implementation scheme requires a reserved position for the controller 12 on the motherboard to achieve memory expansion and persistence, and the expansion capability is limited by the maximum number of channels supported by a single chip.
[0146] It can be understood that, based on any of the above-mentioned implementation methods, the capacity of the first memory 13 and the capacity of the second memory 14 can be configured according to one or more of the conditions such as the respective performance of the first memory 13 and the second memory 14, the cost of the hardware module and the application scenario, and the embodiments of the present application are not limited to this.
[0147] The following is a data reading and writing process and a data exchange process provided in the embodiment of the present application in conjunction with the accompanying drawings:
[0148] The process of writing data
[0149] like Fig. 10AFIG. 1 is a flow chart of a method for writing data provided in an embodiment of the present application. Fig. 10A The method shown can be applied to Figure 3 The computer system shown. Fig. 10A The method shown may include the following steps:
[0150] S101: The processor sends a write operation to the controller, where the write operation includes data to be written and a first logical address.
[0151] It should be noted that, for a processor, the address carried in a write operation is a physical address, and for a controller, the address carried in a write operation is a logical address. Here, the controller is used as an example for description.
[0152] S102: The controller converts the first logical address into a first physical address of the first memory, and writes the data to be written into the storage space indicated by the first physical address in the first memory. The controller then updates the HMMU information maintained by itself.
[0153] Optionally, the controller updates the HMMU information maintained by itself, which may include: the controller writes first information into the HMMU information maintained by itself, where the first information is used to indicate that data at the first logical address has been cached in the first memory.
[0154] As an example, S102 may be considered as a data caching process.
[0155] S103: The controller determines whether there is old data corresponding to the first logical address in the second memory, that is, whether there is data stored in the storage space indicated by the physical address of the second memory obtained by converting the first logical address.
[0156] If so, it means that the old data corresponding to the first logical address has been flushed to the second memory, and then S104 is executed.
[0157] If not, the data writing process ends.
[0158] The old data here refers to the data to be written in S101. Both the old data and the data to be written are data corresponding to the first logical address. However, in terms of writing time, the old data is written first and the data to be written is written later.
[0159] S104: The controller marks the old data corresponding to the first logical address recorded in the second memory as invalid data.
[0160] It should be noted that, subsequently, invalid data can be deleted when garbage collection (GC) is performed, thereby saving storage space.
[0161] After executing S104, the data writing process ends.
[0162] In this embodiment, the controller preferentially writes data into the first memory. Since the read and write performance of the first memory is higher than that of the second memory, this embodiment helps to improve the data writing efficiency.
[0163] like Fig. 10B As shown, the embodiment of this application is based on Fig. 10A A process diagram of a controller executing a method for writing data is provided. Fig. 10B The method shown can be applied to Figure 6 Controller shown. Fig. 10B The method shown may include the following steps:
[0164] S201: The serial bus interface receives a write operation sent by a processor and parses the write operation, wherein the write operation includes data to be written and a first logical address.
[0165] Specifically, the PHY in the serial bus interface receives the write operation sent by the processor, and the HS Serdes performs serial-to-parallel conversion on the write operation in combination with the memory protocol (ie, parallel transmission protocol). The process of performing serial-to-parallel conversion on the write operation can be considered as a specific implementation of parsing the write operation.
[0166] S202: The serial bus interface sends the first logical address obtained after parsing the write operation to the CPU system.
[0167] S203: The ARM processor in the CPU system converts the first logical address into a first physical address based on the correspondence between the logical address and the DRAM physical address. Then, the first physical address is sent to the DDR data path control module, and the DDR data path control module sends a DRAM write instruction to the write queue in the DRAM controller, and the DRAM write instruction includes the first physical address.
[0168] S204: the serial bus interface sends the data to be written obtained after parsing the write operation to the compression module for compression, and the compression module sends the compressed data to be written to the operation module of the DRAM controller via the DDR interface of the DRAM controller.
[0169] The embodiment of the present application does not limit the order in which S203 and S204 are executed.
[0170] S205: The operation module in the DRAM controller writes the data to be written into the storage space indicated by the first physical address of the DRAM based on the DRAM write instruction received by the write queue. Subsequently, the DRAM controller sends a response of completion of writing the data to be written to the ARM processor in the CPU system, so that the ARM processor in the CPU system executes S206.
[0171] Optionally, S203 and S206 may be executed in parallel, that is, the execution of S206 does not need to wait for the DRAM controller to send a response indicating that the writing of the data to be written is completed to the ARM processor in the CPU system, which helps to reduce the pressure on the ARM processor.
[0172] S206: The ARM processor in the CPU system updates the HMMU information. Specifically, first information is added to the HMMU information, where the first information is used to indicate that the data at the first logical address has been cached in the DRAM.
[0173] S207: If the ARM processor in the CPU system determines that old data corresponding to the first logical address already exists in the SCM, the old data is marked as invalid data.
[0174] Subsequently, when the SCM controller executes the invalid data recovery mechanism, the data in the storage space corresponding to the second physical address in the SCM may be deleted based on the execution result of S207, wherein the second physical address is the physical address of the SCM converted from the first logical address.
[0175] Above Fig. 10A and Fig. 10BIn the technical solution shown, the data reading and writing granularity of the first memory is used to write and read data as an example for explanation. The specific implementation is not limited to this. For example, usually the data reading and writing granularity of the second memory is greater than the data reading and writing granularity of the first memory. Taking the first memory as DRAM and the second memory as SCM as an example, the data reading and writing granularity of DRAM can be 8 bytes, and the data reading granularity of SCM is a page (or page). For example, the size of the page is 4K bytes. In one example, after receiving a write operation including the data to be written and the first logical address, the controller can determine whether the data of the logical page where the first logical address is located already exists in the first memory. If so, the data to be written is written into the storage space indicated by the physical address corresponding to the first logical address in the first memory. If not, then read the data corresponding to the logical page where the first logical address is located from the second memory, and use the data to be written to replace the data corresponding to the first logical address in the read data, obtain the new data corresponding to the logical page where the first logical address is located, and write the new data corresponding to the logical page where the first logical address is located into the storage space indicated by the physical address corresponding to the logical page in the first memory, and subsequently, the controller can mark the data corresponding to the logical page where the first logical address is located in the second memory as invalid data. In this technical solution, it can ensure that all data corresponding to a page are in the first memory and / or the second memory, thereby improving data reading efficiency. Regarding the process of how to read data in this case, it is not repeated here.
[0176] The process of exchanging data from the first memory to the second memory
[0177] like Fig.11A , which is a flow chart of a method for exchanging data from a first memory to a second memory provided in an embodiment of the present application. Fig.11A The method shown can be applied to Figure 3 The computer system shown. Fig.11A The method shown may include the following steps:
[0178] S301: The controller determines whether there is data satisfying a first condition in the first memory. The presence of data satisfying the first condition in the first memory can be considered as data in the first memory that meets the standard of being refreshed to the second memory.
[0179] If yes, then S302 is executed. If no, then the process may return to S301 when the triggering condition of S301 is met next time.
[0180] Optionally, the data satisfying the first condition includes at least one of the following:
[0181] Data when the amount of data in the first memory is greater than or equal to a first threshold;
[0182] Data whose storage time is greater than or equal to a second threshold;
[0183] Data with a probability of being hit by reading less than or equal to a third threshold. For example, data with a probability of being hit by reading less than or equal to a third threshold in the first memory within a preset time period.
[0184] As an example, the above-mentioned first threshold, second threshold and third threshold can be respectively considered as a spatial threshold, a time threshold and a heat threshold. That is to say, the embodiment of the present application can determine whether the data in the first memory meets the standard of being refreshed to the second memory based on at least one of the spatial threshold, the time threshold, the heat threshold, etc. Of course, it is not limited to this when it is specifically implemented. For example, if the amount of data stored in the first memory accounts for a proportion of the total amount of data in the first memory that is greater than or equal to the fourth threshold, it is considered that the data stored in the first memory meets the first condition, etc.
[0185] The present application embodiment does not limit the starting conditions for the controller to execute S301. For example, the controller may execute S301 periodically or trigger-based. For example, the controller trigger-based execution of S301 may include: the controller executes S301 after executing the above S104 one or more times. That is, the controller executes S301 after executing the data writing process one or more times. For another example, a specific example of the controller trigger-based execution of S301 may include the following: Fig.12 In the illustrated embodiment, details may be found below.
[0186] S302: The controller flushes the data in the first memory that meets the first condition to the second memory. Specifically, the controller reads the data in the first memory that meets the first condition, and stores the read data in the second memory.
[0187] As an example, since the persistence performance of the first memory is lower than the persistence performance of the second memory, the process of flushing the data in the first memory to the second memory can be considered as a process of data persistence. In an embodiment of the present application, when there is data that meets the first condition in the first memory, the controller executes the process of data persistence. In this way, on the one hand, it helps to free up the storage space of the first memory so that the processor can continue to store data in the first memory, thereby achieving memory capacity expansion. On the other hand, compared with some traditional technologies in which data persistence is performed only when the system is powered off, the present technical solution does not require a large-capacity power supply specially set up to achieve data persistence, thus helping to save costs.
[0188] After executing S302, the data persistence process ends.
[0189] In this embodiment, when there is data satisfying the first condition in the first memory, the controller exchanges the data satisfying the first condition from the first memory to the second memory. Optionally, the controller can delete the swapped out data from the first memory. In this way, on the one hand, it helps to free up the storage space of the first memory, so that the processor can write more data to the first memory; on the other hand, the data stored in the second memory is usually not lost when the system loses power, so data persistence can be achieved. Of course, the persistence here can refer to the persistence of part or all of the data written by the processor.
[0190] like Fig. 11B As shown, the embodiment of this application is based on Fig.11A A process diagram of a method for a controller to execute data exchange from a first memory to a second memory is provided. Fig. 11B The method shown can be applied to Figure 6 Controller shown. Fig. 11B The method shown may include the following steps:
[0191] S401: The ARM processor in the CPU system determines whether there is data satisfying a first condition in the DRAM.
[0192] If yes, then S402 is executed. If no, then the process may return to S401 when the triggering condition of S401 is met next time.
[0193] S402: The ARM processor in the CPU system sends a DRAM data swap command to the data exchange engine. The DRAM data swap command is used to swap out the data to be swapped out in the DRAM to the SCM.
[0194] Optionally, the ARM processor in the CPU system may also send the physical address of the data to be swapped out in the DRAM, the page size, and the physical page information of the SCM to the data swap engine. Alternatively, optionally, one or more of the physical address of the data to be swapped out in the DRAM, the page size, or the physical page information of the SCM may be carried in the DRAM data swap command.
[0195] S403: The data exchange engine sends the memory read instruction to the read queue of the DRAM controller through the DDR data channel control module, wherein the memory read instruction includes the physical address of the data to be swapped out in the DRAM.
[0196] S404: The operation module in the DRAM controller reads the data to be swapped out from the DRAM based on the memory read instruction received by the read queue.
[0197] S405: The operation module in the DRAM controller returns the read data to be swapped out to the data exchange engine.
[0198] S406: The data exchange engine writes the to-be-swapped-out data returned by the DRAM controller to the pre-allocated data cache space.
[0199] S407: The data exchange engine sends an instruction to the IO sequencer to flush the data to be swapped out to the SCM, and informs the IO sequencer of the location information of the data to be swapped out in the data cache space.
[0200] S408: The IO sequencer sends a write data instruction to the SCM data channel control module to activate the operation corresponding to the data to be swapped out and allocate the channel resources of the data to be swapped out. The write data instruction includes the location information of the data to be swapped out in the data cache space, etc. The operation includes but is not limited to at least one of the following: cyclic redundancy check (CRC) check, scrambling operation, ECC operation, RAID operation or encryption operation, etc.
[0201] S409: The SCM data channel control module captures the data to be swapped out from the data cache space based on the write data instruction issued by the IO sequence generator.
[0202] Subsequently, the SCM data channel control module sends a response to the IO sequencer that the data to be swapped out has been completed ( Fig. 11B (not shown in the figure) Subsequently, the data to be swapped out is sent from the data cache space to the SCM interface via the RAID module and the back-end data channel. Fig. 11B The dashed line with an arrow in the figure shows the data flow direction of the data to be swapped out. It should be noted that, in actual implementation, the SCM data channel control module can send instructions to the backend data channel to open the data flow channel of the data to be swapped out.
[0203] S410: The IO sequencer sends a write data instruction to the SCM interface and configures the corresponding physical information of the SCM.
[0204] The embodiment of the present application does not limit the execution order of S408 and S410. For example, they can be executed simultaneously or sequentially.
[0205] S411: After receiving the data to be swapped out, the SCM interface issues a write command sequence to the SCM based on the write data instruction issued by the IO sequencer and the physical information configured in S410, and transmits the data to be swapped out to the SCM.
[0206] Subsequently, the SCM interface sends a response to the IO sequencer indicating that the data to be swapped out has been written into the SCM.
[0207] S412: The IO sequencer sends a HFTL report writing command completion to the ARM processor in the CPU system, so that the ARM processor updates the corresponding table entry information of the HFTL. For a specific example of the updated table entry information, refer to S207.
[0208] Specifically, the IO sequencer may execute S412 after receiving a response from the SCM data channel control module indicating that the data to be swapped out has been captured (as described in S409) and a response from the SCM interface indicating that the data to be swapped out has been written into the SCM (as described in S411).
[0209] S413: The ARM processor in the CPU system updates the corresponding entry information of the HMMU. For a specific example of the updated entry information, reference may be made to S206.
[0210] The process of writing data and exchanging data from the first memory to the second memory
[0211] Above Fig. 10A The process of writing data is described in detail. Fig.11A The following describes the data persistence process in detail. Fig.12 An application example combining the two processes is specifically described.
[0212] like Fig.12 , which is a flow chart of a method for writing data and exchanging data from a first memory to a second memory provided in an embodiment of the present application. Fig.12 The method shown comprises the following steps:
[0213] S501~S502: Please refer to the above S101~S102.
[0214] S503: The controller determines whether there is data satisfying the first condition in the first memory. For details, please refer to S301.
[0215] If yes, execute S504; if no, execute S505.
[0216] S504: The controller flushes the data in the first memory that meets the first condition to the second memory. For details, please refer to S302.
[0217] After executing S504, the data persistence process ends.
[0218] S505: The controller determines whether there is old data corresponding to the first logical address in the second memory. For details, please refer to S103.
[0219] If yes, then S506 is executed. If no, then the data writing process ends.
[0220] S506: The controller marks the old data corresponding to the first logical address recorded in the second memory as invalid data. For details, please refer to S104.
[0221] After executing S506, the data writing process ends.
[0222] contrast Fig.12 and Fig. 10A It can be seen that: Fig. 10A In the technical solution shown, the controller marks the old data corresponding to the first logical address recorded in the second memory as invalid data under the premise that: after caching the data in the first memory, it is determined that the old data corresponding to the first logical address exists in the second memory. Fig.12 In the technical solution shown, the controller marks the old data corresponding to the first logical address recorded in the second memory as invalid data under the following conditions: after caching the data in the first memory, it is determined that the old data corresponding to the first logical address exists in the second memory, and the refresh execution standard is met. This is because if the refresh execution standard is met, the data corresponding to the first logical address in the second memory has been updated to the latest data, so it does not need to be marked as invalid data, which can save processing flow and improve processing efficiency.
[0223] Data reading process
[0224] like Fig.13A FIG. 1 is a flow chart of a method for reading data provided by an embodiment of the present application. Fig.13A The method shown can be applied to Figure 3 The computer system shown. Fig.13A The method shown may include the following steps:
[0225] S601: The processor sends a read operation to the controller, where the read operation includes a logic address to be read.
[0226] S602: The controller converts the to-be-read logical address into a physical address of the first memory.
[0227] S603: The controller determines whether data is stored in the storage space indicated by the physical address of the first memory.
[0228] If not, execute S604; if so, execute S606.
[0229] S604: The controller converts the to-be-read logical address into a physical address of the second memory.
[0230] S605: The controller reads data from the storage space indicated by the physical address of the second memory, and writes the read data into the first memory.
[0231] S606: The controller reads data from the storage space indicated by the physical address of the first memory.
[0232] S607: The controller returns the read data to the processor.
[0233] After executing S607, the data reading process ends.
[0234] In this embodiment, the controller preferentially reads the to-be-read data from the first memory. Since the read-write performance of the first memory is higher than that of the second memory, this technical solution helps to improve the data reading rate.
[0235] like Fig. 13B As shown, the embodiment of this application is based on Fig.13A A schematic diagram of a process in which a controller executes data reading is provided. Fig. 13B The method shown can be applied to Figure 6 Controller shown. Fig. 13B The method shown may include the following steps:
[0236] S701: The serial bus interface receives a read operation sent by a processor and parses the read operation, wherein the operation includes a logic address to be read.
[0237] Specifically, the PHY in the serial bus interface receives the read operation sent by the processor, and the HS Serdes performs serial-to-parallel conversion on the read operation in combination with the memory protocol (ie, parallel transmission protocol). The process of performing serial-to-parallel conversion on the read operation can be considered as a specific implementation of parsing the read operation.
[0238] S702: The serial bus interface sends the to-be-read logical address obtained by parsing the read operation to the DDR data channel control module.
[0239] S703: The DDR data channel control queries the ARM processor in the CPU system whether the data stored in the storage space indicated by the to-be-read logical address (ie, the to-be-read data) is located in the DRAM.
[0240] If the ARM processor in the CPU system determines that the data to be read is located in the DRAM, that is, a DRAM read hit (Hit), S704 is executed.
[0241] If the ARM processor in the CPU system determines that the data to be read is not located in the DRAM, that is, the DRAM does not have a read hit, then the process of exchanging the data to be read from the second memory to the first memory is executed. The specific implementation method of the process can refer to the following Fig. 14B Then, S704 is executed.
[0242] Whether the DRAM is read hit and the physical address of the to-be-read data in the DRAM can be obtained by the ARM processor in the CPU system by querying the HMMU.
[0243] S704: The ARM processor in the CPU system returns information such as the physical address of the data to be read in the DRAM to the DDR data channel control module, wherein the physical address of the data to be read in the DRAM is obtained by converting the logical address to be read.
[0244] S705: The DDR data channel control module sends a memory read instruction to the read queue of the DRAM controller, wherein the memory read instruction includes information such as the physical address of the data to be read in the DRAM.
[0245] S706: The operation module in the DRAM controller reads the data to be read based on the memory read instruction received by the read queue. The DRAM controller can send the read data to the decompression module, and the decompression module decompresses the data and returns the decompressed data to the processor through the serial bus interface. Fig. 13B The dashed line with an arrow in the middle indicates the data flow direction of the data to be read.
[0246] The process of exchanging data from the second memory to the first memory
[0247] like Fig.14A , which is a flow chart of a method for exchanging data from a second memory to a first memory provided in an embodiment of the present application. Fig.14A The method shown can be applied to Figure 3 The computer system shown. Fig.14A The method shown may include the following steps:
[0248] S801: The controller determines whether there is data satisfying a second condition in the second memory. The presence of data satisfying the second condition in the second memory can be considered as standard data in the second memory that is exchanged to the first memory.
[0249] If yes, then S802 is executed. If no, then the process ends. Subsequently, the controller may return to execute S801 the next time the triggering condition of S801 is met.
[0250] Optionally, the data satisfying the second condition includes at least one of the following:
[0251] To-be-read data predicted based on the read data;
[0252] Data having a probability of being read hit greater than or equal to a fourth threshold;
[0253] Alternatively, based on the read operation sent by the processor, the data to be read when there is no read hit in the first memory is determined.
[0254] It should be noted that, in a specific implementation, the data read by the processor in chronological order have a certain correlation, so the controller can predict the data to be read based on the historical data that has been read. Among them, the prediction method can refer to the prior art and will not be repeated here. The predicted data to be read has a high probability of being read by the processor later, so the controller can exchange the predicted data to be read from the second memory to the first memory, which can improve the efficiency of subsequent data reading.
[0255] The fourth threshold mentioned above can be considered as a time threshold heat threshold. In other words, data with a probability of being read hit greater than or equal to the fourth threshold can be considered as hot data. Hot data has a higher probability of being read by the processor later. Therefore, the controller can exchange the predicted data to be read from the second memory to the first memory, which can improve the efficiency of subsequent data reading.
[0256] Based on the read operation sent by the processor, determine the data to be read when there is no read hit in the first memory, which can be specifically Fig.13A That is, one of the triggering conditions for the controller to execute the exchange of data in the second memory to the first memory may be that, during the process of the controller executing the read operation, there is no read hit in the first memory.
[0257] S802: The controller exchanges the data in the second memory that meets the second condition to the first memory. Specifically, the controller reads the data in the second memory that meets the second condition, and stores the read data in the first memory.
[0258] After executing S802, this data exchange process ends.
[0259] In this embodiment, when there are data satisfying the second condition in the second memory, the controller exchanges the data satisfying the second condition from the second memory to the first memory. In this way, if the second condition is set reasonably, it is helpful to improve the subsequent data reading efficiency.
[0260] like Fig. 14B As shown, the embodiment of this application is based on Fig.14A A process diagram of a method for a controller to execute data exchange from a second memory to a first memory is provided. Fig. 14B The method shown can be applied to Figure 6 Controller shown. Fig. 14B The method shown may include the following steps:
[0261] S901: The ARM processor in the CPU system determines whether there is data satisfying a second condition in the second memory.
[0262] If yes, then S902 is executed. If no, then the process ends. Subsequently, the controller may return to execute S901 the next time the triggering condition of S901 is met.
[0263] S902: The ARM processor in the CPU system determines the physical address of the data in the second memory that meets the second condition, and uses the physical address as the third physical address; and sends a read command to the IO sequencer, wherein the read command includes the third physical address.
[0264] S903: The IO sequencer sends a read data instruction to the SCM interface and configures corresponding physical information.
[0265] S904: The SCM interface sends a read command sequence to the SCM and waits for the SCM to prepare data.
[0266] S905: After the SCM data preparation is completed, the SCM interface returns the relevant IO preparation completion information to the IO sequencer.
[0267] S906: The IO sequencer sends a read data instruction to the SCM data channel control module to activate operations corresponding to the data, including but not limited to: CRC / De-scramble / ECC / RAID / Decryption, etc., and allocates data channel resources.
[0268] Subsequently, the data to be swapped out is transmitted from the SCM to the back-end data channel through the SCM interface. After the data is error-corrected and decoded by the back-end data channel, it is sent to the data cache space through the RAID module. Fig. 14B The dashed line with an arrow in the middle indicates the data flow direction of the data to be swapped out. In specific implementation, the SCM data channel control module sends an instruction to the backend data channel to open the data flow direction channel of the data to be swapped out.
[0269] S907: After the data is written to the data cache space, the IO sequence generator notifies the data exchange engine that the data to be flushed to the DRAM is ready in the data cache space, and informs the location of the data in the data cache space.
[0270] S908: The data exchange engine issues a DRAM write command and sends it to the write queue of the DRAM controller through the DDR data channel control module.
[0271] S909: The data exchange engine reads data from the corresponding position of the data cache space.
[0272] S910: The data exchange engine writes the data returned by the data cache space to the physical address of the specified DRAM through the DRAM controller, wherein the physical address of the specified DRAM corresponds to the same physical address as the third physical address.
[0273] S911: The data exchange engine sends a read command to the ARM processor in the CPU system to complete.
[0274] S912: The ARM processor in the CPU system updates the corresponding table entry information in the HMMU. Specifically, after executing S915, the HMMU information maintained by the HMMU is marked with "the data corresponding to the third physical address (or the logical address corresponding to the third physical address, or the third physical address corresponding to the physical address in the DRAM) has been written into the DRAM".
[0275] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0276] The embodiment of the present application can divide the controller into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0277] like Fig.15 , which is a schematic diagram of the structure of a controller provided in an embodiment of the present application. Fig.15 The controller 150 shown communicates with the processor, the first memory and the second memory respectively; the read and write performance of the first memory is higher than the read and write performance of the second memory. The control device 150 includes: a receiving unit 1501 and a processing unit 1502. The receiving unit 1501 is used to receive an operation request sent by the processor, and the operation request includes a logical address. The processing unit 1502 is used to access the first memory or the second memory according to the logical address.
[0278] Specifically, the operation request is a write operation, and the processing unit 1502 is specifically used to write the data to be written to the storage space indicated by the first physical address in the first memory according to the logical address; the first physical address is the physical address in the first memory corresponding to the logical address of the write operation. Fig. 10A The receiving unit 1501 can be used to execute the receiving step corresponding to S101, and the processing unit 1502 can be used to execute S102.
[0279] Optionally, the processing unit 1502 is further configured to flush the data in the first memory that meets the first condition to the second memory. The data that meets the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to the first threshold; data when the storage time is greater than or equal to the second threshold; or data when the probability of being read hit is less than or equal to the third threshold. For example, in combination with Fig.11A The processing unit 1502 can be used to execute S301 and S302. When the amount of data in the first memory is greater than or equal to the first threshold, all data in the first memory is flushed to disk.
[0280] Optionally, the processing unit 1502 is further configured to write data in the second memory that meets the second condition into the first memory. The data that meets the second condition includes at least one of the following: data to be read predicted based on the read data; data with a probability of being hit by a read greater than or equal to a fourth threshold; or data to be read when the first memory is not hit by a read operation determined based on the read operation sent by the processor. Fig.14A , the processing unit 1502 can be used to execute S801 and S802.
[0281] Specifically, the operation request is a read operation, and the processing unit 1502 is specifically configured to read the data to be read from the first memory according to the logical address when the data to be read is stored in the first memory; and to read the data to be read from the second memory according to the logical address when the data to be read is not stored in the first memory. Fig.13A The receiving unit 1501 is further used to execute the receiving step corresponding to S601, and the processing unit 1502 is further used to execute S603 to S606.
[0282] Optionally, the persistence performance of the first memory is lower than the persistence performance of the second memory. For example, the first memory is DRAM and the second memory is SCM; or the first memory is DRAM and the second memory is NAND.
[0283] Optionally, the controller 150 communicates with the processor via a serial bus, such as a PCIe bus.
[0284] Optionally, the controller 150 is applied to a memory device, and the memory device also includes a first memory and a second memory.
[0285] Optionally, the memory device is specifically a memory module. Alternatively, the memory device includes a mainboard and a memory module, the controller 150 is fixed on the mainboard, and the memory module includes a first memory and a second memory.
[0286] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any controller 150 provided above and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0287] As an example, combining Figure 5 The functions implemented by the above receiving unit 1501 can be Figure 5 The functions implemented by the processing unit 1502 can be realized by the serial bus interface 121 in Figure 5 The controller 12 is implemented by other devices / modules except the serial bus interface 121.
[0288] like Fig.16 , which is a schematic diagram of the structure of another controller provided in an embodiment of the present application. Fig.16 The controller 160 shown communicates with the processor, the first memory, and the second memory respectively; the read and write performance of the first memory is higher than that of the second memory. The controller 160 includes: a bus interface 1601, a first processor 1602, and a memory controller 1603. The bus interface 1601 is used to receive an operation request sent by the processor, and the operation request includes a logical address. The first processor 1602 is used to send a first instruction to the memory controller according to the logical address. The memory controller 1603 is used to access the first memory or the second memory based on the first instruction. For example, in combination Fig. 10B The bus interface 1601 may be used to execute S201, the first processor 1602 may be used to execute S203, and the memory controller 1603 may be used to execute S205.
[0289] Optionally, the operation request is a write operation; the memory controller 1603 is specifically used to write the data to be written to the storage space indicated by the first physical address of the first memory; the first physical address is a physical address in the first memory corresponding to the logical address.
[0290] Optionally, the first processor 1603 is further used to send a second instruction to the memory controller 1603; the memory controller 1603 is further used to, based on the second instruction, flush the data in the first memory that meets the first condition to the second memory. The data that meets the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to the first threshold; data whose storage time is greater than or equal to the second threshold; data whose probability of being read hit is less than or equal to the third threshold; or, based on the read operation sent by the processor, determine the data to be read when there is no read hit in the first memory. For example, in combination Fig. 11B , the first processor 1603 can be used to execute S402.
[0291] Optionally, the first processor 1602 is further configured to send a third instruction to the memory controller 1603; the memory controller 1603 is further configured to write the data in the second memory that meets the second condition into the first memory based on the third instruction. The data that meets the second condition includes at least one of the following: data to be read predicted based on the read data; or data with a probability of being read hit greater than or equal to a fourth threshold.
[0292] Optionally, the operation request is a read operation, and the memory controller 1603 is specifically used to read the data to be read from the first memory according to the logical address when the data to be read is stored in the first memory; when the data to be read is not stored in the first memory, read the data to be read from the second memory according to the logical address.
[0293] Optionally, the persistence performance of the first memory is lower than the persistence performance of the second memory. For example, the first memory is DRAM and the second memory is SCM; or the first memory is DRAM and the second memory is NAND.
[0294] Optionally, the controller 160 communicates with the processor via a serial bus, such as a PCIe bus.
[0295] Optionally, the controller 160 is applied to a memory device, and the memory device also includes a first memory and a second memory.
[0296] Optionally, the controller 160 is fixed to a memory module, for example, the memory device is specifically a memory module.
[0297] Optionally, the controller 160 is fixed on the mainboard. For example, the memory device includes a mainboard and a memory module, and the memory module includes a first memory and a second memory.
[0298] Optionally, the memory controller 1603 may include a first memory controller and a second memory controller. The first memory controller is used to control the first memory access, and the second memory controller is used to control the second memory access.
[0299] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any controller 160 provided above and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0300] The embodiment of the present application also provides a chip system, which includes at least one controller. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiment of the present application.
[0301] Another embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a controller, the controller executes each step executed by the controller in the method flow shown in the above method embodiment.
[0302] In some embodiments, the disclosed methods may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of manufacture.
[0303] In some embodiments, a computer program product is also provided, the computer program product comprising a computer program for executing a computer process on a computing device.
[0304] In one embodiment, the computer program product is provided using a signal bearing medium. The signal bearing medium may include one or more program instructions, which when executed by one or more processors may provide some or all of the functions performed by the controller described above, which will not be described in detail herein.
[0305] In some examples, the signal bearing medium may include computer readable media such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM), or a random access memory (RAM), and the like.
[0306] In some embodiments, the signal bearing medium may include a computer recordable medium such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, and the like.
[0307] In some embodiments, the signal bearing medium may include communication media such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, wave guides, wired communication links, wireless communication links, etc.).
[0308] The signal bearing medium may be communicated by a wireless form of communication media (eg, wireless communication media conforming to the IEEE 802.11 standard or other transmission protocols).The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.
[0309] It should be understood that the arrangement described here is only for illustrative purposes. Thus, it will be appreciated by those skilled in the art that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted together according to the desired result. In addition, many of the described elements can be implemented as discrete or distributed components, or in any appropriate combination and position to combine other components to implement functional entities.
[0310] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer execution instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
Claims
1. A data processing method for a memory device, characterized in that: The method is executed by a memory device and includes: receiving an operation request from a processor; the operation request comprising a logical address; A first memory in the memory device or a second memory in the memory device is accessed according to the logical address, and the read and write performance of the first memory is higher than the read and write performance of the second memory.
2. The method according to claim 1, characterized in that The operation request is a write operation; and accessing the first memory or the second memory according to the logical address specifically includes: According to the logical address, the data to be written is written to the storage space indicated by the first physical address of the first memory; the first physical address is a physical address in the first memory corresponding to the logical address.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: flushing the data in the first memory that meets the first condition to the second memory; The data satisfying the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to a first threshold; Data whose storage time is greater than or equal to a second threshold; Alternatively, data having a probability of being read hit is less than or equal to a third threshold.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Writing the data in the second memory that meets the second condition into the first memory; The data satisfying the second condition includes at least one of the following: To-be-read data predicted based on the read data; Data having a probability of being read hit greater than or equal to a fourth threshold; Alternatively, based on the read operation sent by the processor, the data to be read when there is no read hit in the first memory is determined.
5. The method according to any one of claims 1 to 3, characterized in that: The operation request is a read operation, and accessing the first memory or the second memory according to the logical address specifically includes: When the first memory stores the data to be read, the data to be read is read from the first memory according to the logical address; When the data to be read is not stored in the first memory, the data to be read is read from the second memory according to the logical address.
6. The method according to any one of claims 1 to 5, characterized in that: The persistence performance of the first memory is lower than the persistence performance of the second memory.
7. The method according to claim 6, characterized in that The first memory is a dynamic random access memory DRAM, and the second memory is a storage class memory SCM; Alternatively, the first memory is DRAM, and the second memory is NAND Flash.
8. The method according to any one of claims 1 to 7, characterized in that: The controller communicates with the processor via a serial bus.
9. The method according to claim 8, characterized in that The serial bus includes a Peripheral Component Interconnect Express (PCIe) bus.
10. The method according to any one of claims 1 to 9, characterized in that: The memory device is specifically a memory module; Alternatively, the memory device includes a mainboard and a memory module, the controller is fixed on the mainboard, and the memory module includes the first memory and the second memory.
11. A controller, characterized in that: include: a bus interface, a first processor, and a memory controller; The bus interface is used to receive an operation request sent by the processor, wherein the operation request includes a logical address; The first processor is used to send a first instruction to the memory controller according to the logical address; The memory controller is used to access the first memory or the second memory based on the first instruction, and the read and write performance of the first memory is higher than the read and write performance of the second memory.
12. The controller according to claim 11, characterized in that: The operation request is a write operation; the memory controller is specifically used to write the data to be written to the storage space indicated by the first physical address of the first memory; the first physical address is the physical address in the first memory corresponding to the logical address.
13. The controller according to claim 11 or 12, characterized in that: The first processor is further configured to send a second instruction to the memory controller; The memory controller is further configured to flush the data in the first memory that meets the first condition to the second memory based on the second instruction; The data satisfying the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to a first threshold; Data whose storage time is greater than or equal to a second threshold; Data with a probability of being read hit less than or equal to a third threshold; Alternatively, based on the read operation sent by the processor, the data to be read when there is no read hit in the first memory is determined.
14. The controller according to any one of claims 11 to 13, characterized in that: The first processor is further configured to send a third instruction to the memory controller; The memory controller is further configured to write data in the second memory that meets a second condition into the first memory based on the third instruction; The data satisfying the second condition includes at least one of the following: To-be-read data predicted based on the read data; Alternatively, data having a probability of being read hit greater than or equal to a fourth threshold.
15. The controller according to claim 11, characterized in that: The operation request is a read operation, and the memory controller is specifically configured to: When the first memory stores the data to be read, the data to be read is read from the first memory according to the logical address; When the data to be read is not stored in the first memory, the data to be read is read from the second memory according to the logical address.
16. The controller according to any one of claims 11 to 15, characterized in that: The persistence performance of the first memory is lower than the persistence performance of the second memory.
17. The controller according to claim 16, characterized in that: The first memory is a dynamic random access memory DRAM, and the second memory is a storage class memory SCM; Alternatively, the first memory is DRAM, and the second memory is NAND Flash.
18. The controller according to any one of claims 11 to 17, characterized in that: The controller communicates with the processor via a serial bus.
19. The controller according to claim 18, characterized in that The serial bus includes a Peripheral Component Interconnect Express (PCIe) bus.
20. The controller according to any one of claims 11 to 19, characterized in that: The controller is applied to a memory device, and the memory device further includes the first memory and the second memory; The memory device is specifically a memory module; Alternatively, the memory device includes a mainboard and a memory module, the controller is fixed on the mainboard, and the memory module includes the first memory and the second memory.
21. A controller, characterized in that: include: A receiving unit, configured to receive an operation request from the processor; The operation request includes a logical address; A processing unit is used to access a first memory or a second memory according to the logical address, and the read and write performance of the first memory is higher than the read and write performance of the second memory.
22. The controller according to claim 21, characterized in that The operation request is a write operation; The processing unit is specifically used to: write the data to be written to the storage space indicated by the first physical address of the first memory according to the logical address; the first physical address is the physical address in the first memory corresponding to the logical address.
23. The controller according to claim 21 or 22, characterized in that: The processing unit is also used for: flushing the data in the first memory that meets the first condition to the second memory; The data satisfying the first condition includes at least one of the following: data when the amount of data in the first memory is greater than or equal to a first threshold; Data whose storage time is greater than or equal to a second threshold; Alternatively, data having a probability of being read hit is less than or equal to a third threshold.
24. The controller according to any one of claims 21 to 23, characterized in that: The processing unit is also used for: Writing the data in the second memory that meets the second condition into the first memory; The data satisfying the second condition includes at least one of the following: To-be-read data predicted based on the read data; Data having a probability of being read hit greater than or equal to a fourth threshold; Alternatively, based on the read operation sent by the processor, the data to be read when there is no read hit in the first memory is determined.
25. The controller according to claim 21 or 22, characterized in that: The operation request is a read operation; The processing unit is specifically used for: When the first memory stores the data to be read, the data to be read is read from the first memory according to the logical address; When the data to be read is not stored in the first memory, the data to be read is read from the second memory according to the logical address.
26. The controller according to any one of claims 21 to 25, characterized in that: The persistence performance of the first memory is lower than the persistence performance of the second memory.
27. The controller according to claim 26, characterized in that The first memory is a dynamic random access memory DRAM, and the second memory is a storage class memory SCM; Alternatively, the first memory is DRAM, and the second memory is NAND Flash.
28. The controller according to any one of claims 21 to 27, characterized in that: The controller communicates with the processor via a serial bus.
29. The controller according to claim 28, characterized in that The serial bus includes a Peripheral Component Interconnect Express (PCIe) bus.
30. The controller according to any one of claims 21 to 29, characterized in that: The controller is applied to a memory device, and the memory device further includes the first memory and the second memory; The memory device is specifically a memory module; Alternatively, the memory device includes a mainboard and a memory module, the controller is fixed on the mainboard, and the memory module includes the first memory and the second memory.
31. A computer system, characterized in that: include: A processor, a controller, a first memory, and a second memory; The controller communicates with the processor, the first memory and the second memory respectively; The read and write performance of the first memory is higher than the read and write performance of the second memory; The controller is used to execute the method according to any one of claims 1 to 10.
32. A chip system, characterized in that: The chip system comprises a controller as described in any one of claims 11 to 30.
Citation Information
Patent Citations
Storage system and reading / writing method adopting storage system
CN105630405A
Memory access method, storage-class memory and computer system
CN105808455A
Reduction of NVM access conflicts of IO command
CN107885456A
Parallel processing big data storage system and method based on memory calculation mode
CN108920110A
Data access method and computer system
CN109582214A
