CXL memory module, memory data replacement method, and computer system
By combining flash memory chips and DRAM chips in the CXL memory module, and using the controller chip for data replacement, the traditional problems of high memory expansion cost and difficulty in data replacement are solved, and low-cost and efficient memory expansion and data management are achieved.
Patent Information
- Application Number
- PCT/CN2023/097840
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-17
- Filing Date
- 2023-06-01
- Publication Date
- 2024-09-26
AI Technical Summary
Traditional CXL memory modules are more expensive to expand computer memory, and the limit on the number of erasing and writing of flash memory chips makes data replacement difficult.
The CXL memory module that combines flash memory chips and DRAM chips is used to realize the replacement of memory data through the controller chip. The flash memory chip is used to store part of the data when the memory space is insufficient, and the data is read back into the memory when needed, and read-only pages are replaced first. data to extend flash memory life.
It realizes the expansion of memory capacity at a lower cost, improves product cost performance, and solves the difficulty of data replacement caused by the limit of the number of erasing and writing of flash memory chips.
Smart Images

Figure CN2023097840_26092024_PF_FP
Abstract
Description
A CXL memory module, memory data replacement method and computer system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Chinese patent application number 202310266121.X, filed with CNIPA on March 17, 2023, entitled “A CXL memory module, memory data replacement method and computer system,” the contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to, but is not limited to, storage technology, and in particular to a CXL memory module, a memory data replacement method, and a computer system. Background Art
[0004] CXL is a memory interface protocol based on the PCIe physical layer. It enables computer memory expansion using CXL memory modules. CXL memory modules typically consist of a CXL controller chip and a set of DRAM chips.
[0005] As a memory expansion, CXL memory modules are cheaper than traditional DIMMs at the same capacity. However, the limitations of DRAM chips themselves prevent costs from being reduced.
[0006] SUMMARY OF THE INVENTION
[0007] The following is an overview of the subject matter described in detail in this disclosure. This overview is not intended to limit the scope of the claims.
[0008] An embodiment of the present disclosure provides a CXL memory module, including a flash memory chip, a memory chip, and a controller chip connected to the flash memory chip and the memory chip, wherein the controller chip is configured to replace part of the data in the memory chip with the flash memory chip.
[0009] The present disclosure also provides a method for replacing memory data, which is applied to a host connected to a CXL memory module provided with a flash memory chip and a memory chip, comprising:
[0010] The host runs virtual memory and maintains the correspondence between the logical address, memory address and flash memory address of the data in the logical-physical address translation table;
[0011] When the host determines that the memory space is insufficient, it sends a swap-out instruction to the CXL memory module, carrying the address of the first memory page storing data and the address of the first free flash memory page, or carrying the address of the first memory page storing data;
[0012] After receiving the swap completion response or the address of the first flash memory page sent by the CXL memory module, the host releases the first memory page, marks the memory address of the data as invalid, records the flash memory address of the data as the address of the first flash memory page and marks it as valid.
[0013] The present disclosure also provides a method for replacing memory data, which is applied to a CXL memory module provided with a flash memory chip and a memory chip, comprising:
[0014] The CXL memory module can replace part of the data in the memory chip with the flash memory chip.
[0015] An embodiment of the present disclosure also provides a controller chip for a CXL memory module, the controller chip including a memory interface, a flash memory interface, and a storage controller connected to the memory interface and the flash memory interface. The storage controller is configured to execute the memory data replacement method as described in any embodiment of the CXL memory module.
[0016] An embodiment of the present disclosure further provides a host, comprising a memory and a processor, wherein the memory is used to store execution instructions; the processor calls the execution instructions and is configured to execute the memory data replacement method as described in any embodiment of the host side.
[0017] An embodiment of the present disclosure further provides a computer system, comprising the host described in any embodiment and the CXL memory module described in any embodiment.
[0018] Compared with the prior art, the CXL memory module, memory data replacement method, and computer system provided by at least one embodiment of the present disclosure have the following advantages: the CXL memory module also includes at least one set of flash memory chips. When the memory (DRAM chip) space is insufficient, some of the data in the memory is replaced with the flash memory chips. This can significantly expand the capacity using lower-cost flash memory chips, improve the product's cost-effectiveness, and solve the replacement difficulties caused by the limited number of flash memory erase and write times.
[0019] Still other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.
[0020] Summary of the Figures
[0021] The accompanying drawings are used to provide an understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation to the technical solution of the present disclosure.
[0022] FIG1 is a structural block diagram of a CXL memory module provided by an exemplary embodiment of the present disclosure;
[0023] FIG2 is a structural block diagram of a CXL memory module provided by another exemplary embodiment of the present disclosure;
[0024] FIG3 is a block diagram of a controller chip of a CXL memory module provided by an embodiment of the present disclosure;
[0025] FIG4 is a flowchart of a method for replacing memory data provided by an exemplary embodiment of the present disclosure;
[0026] FIG5 is a structural block diagram of a host provided by an embodiment of the present disclosure;
[0027] FIG6 is a structural block diagram of a computer system provided by an embodiment of the present disclosure.
[0028] Details
[0029] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Unless there is any conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other in any manner.
[0030] The present disclosure describes multiple embodiments, but this description is exemplary rather than restrictive, and it will be apparent to those skilled in the art that more embodiments and implementations may be included within the scope of the embodiments described in the present disclosure. Although many possible feature combinations are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0031] The present disclosure includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The disclosed embodiments, features, and elements of the present disclosure may also be combined with any conventional features or elements to form schemes defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other disclosed schemes to form another scheme defined by the claims. Therefore, it should be understood that any features shown and discussed in this disclosure may be implemented individually or in any appropriate combination. Therefore, the embodiments are not subject to other limitations except for the limitations made according to the appended claims and their equivalents. In addition, various modifications and changes may be made within the scope of protection of the appended claims.
[0032] In addition, when describing representative embodiments, the specification may have presented the method and process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described in the present disclosure, the method or process should not be limited to the steps in the specific order described. As one of ordinary skill in the art will understand, other orders of steps are also possible. Therefore, the specific order of the steps set forth in the specification should not be interpreted as a limitation on the claims. In addition, the claims to the method and process should not be limited to performing their steps in the order written, and those skilled in the art can readily understand that these orders can be changed and still remain within the spirit and scope of the embodiments of the present disclosure.
[0033] Figure 1 is a structural block diagram of a CXL memory module provided by an exemplary embodiment of the present disclosure, and Figure 2 is a structural block diagram of a CXL memory module provided by another exemplary embodiment of the present disclosure. As shown in Figures 1 and 2, the CXL memory module may include: a flash memory chip 11, a memory chip, and a controller chip 13 connected to the flash memory chip and the memory chip. The memory chip may be a DRAM chip 12. The controller chip is configured to be able to replace part of the data in the memory chip (such as a DRAM chip) with the flash memory chip.
[0034] The CXL memory module provided in the embodiments of the present disclosure includes, in addition to memory chips, at least one set of flash memory chips. When the memory (e.g., DRAM chip) runs out of space, some of the data in the memory is swapped into the flash memory chips and then read out of them when needed. Data swapping can include data out and data in. Data out refers to writing data from the memory chip into the flash memory chip, while data in refers to writing data from the flash memory into the memory chip.
[0035] The disclosed embodiments can significantly expand the capacity using low-cost flash memory chips, improve product cost-effectiveness, and solve the replacement difficulties caused by the limited number of flash memory erase and write times.
[0036] In an exemplary embodiment of the present disclosure, a method of using flash memory can be that the controller chip of the CXL memory module is connected to a flash memory control chip (such as the NAND controller in Figure 2), and then a group of flash memory chips (such as the NAND chip in Figure 2) are connected through the flash memory control chip and managed. A group of flash memory chips may include one or more flash memory chips.
[0037] In an exemplary embodiment of the present disclosure, as shown in Figure 2, a CXL memory module controller chip can connect to multiple flash memory controller chips. A single flash memory controller chip can connect to and manage a group of flash memory chips, which can include one or more flash memory chips. Connecting multiple flash memory controller chips to a CXL memory module controller chip increases flash memory read and write bandwidth.
[0038] In an exemplary embodiment of the present disclosure, the controller chip may be configured to perform data replacement in the following manner:
[0039] Upon receiving a swap instruction from an external device, the swap instruction carrying the address of a first memory page storing data, the controller chip selects an idle first flash memory page from the flash memory chip, swaps the data in the first memory page into the first flash memory page, and returns the address of the first flash memory page to the external device, where the external device may include a host.
[0040] In the disclosed embodiment, a host-dominated mode can be adopted, where the host detects whether the memory is sufficient and, when the memory space is insufficient, detects the data information that needs to be replaced with the flash memory chip. The data information may include the address of the data to be replaced with the flash memory chip in the memory.
[0041] The CXL memory module sends information about the total available DRAM memory space to the host. The host runs virtual memory, maintaining a logical-physical address translation table that maps logical addresses, memory addresses, and flash memory addresses. When the host determines that memory space is insufficient, it sends a swap-out command to the CXL module, carrying the address of the first memory page containing data.
[0042] Insufficient memory space may be caused by the remaining memory space being less than a threshold, or the remaining memory space being less than the requested memory space, etc.
[0043] A software application typically consists of many memory pages, most of which are read-only. These pages can contain program code and read-only data, such as large icons or weights used in artificial intelligence inference. Only a small portion of these pages can be both read and written. The operating system marks the read / write properties of each memory page.
[0044] In one example, the first memory page is a read-only page or is prioritized as a read-only page. The host records the read / write attributes of each memory page, including whether it is a read-only page or a read / write page. During data replacement, only data in the read-only memory page is replaced, or data in the read-only memory page is replaced preferentially.
[0045] Priority replacement means that read-only memory pages have a higher priority than other memory pages (such as read-write memory pages). For example, for memory pages that have not been used recently, data replacement is performed on all memory pages storing read-only data before data replacement is performed on memory pages storing read-write data.
[0046] The CXL memory module receives the swap-out instruction, selects an idle first flash memory page from the flash memory chip, replaces the data in the first memory page to the first flash memory page, and returns the address of the first flash memory page to the host.
[0047] In this embodiment, when a host detects insufficient memory, it can send a swap-out command via the cxl.io protocol, instructing the CXL memory module to store data from a specific address segment into the flash memory chip. The CXL memory module can then select a flash memory address, read the data from the memory segment into the flash memory address, and return the flash memory address to the host.
[0048] After receiving the address of the first flash memory page sent by the CXL memory module, the host releases the first memory page, marks the memory address of the data as invalid, records the flash memory address of the data as the address of the first flash memory page and marks it as valid.
[0049] The host uses virtual memory for management. The data replaced in the flash memory still retains the same logical address, but the information of the data is marked accordingly, and the mark includes the address of the data in the flash memory.
[0050] In another exemplary embodiment, the controller chip is configured to perform data replacement in the following manner:
[0051] Upon receiving a swap-out instruction sent by an external device, which carries the address of a first memory page storing data and the address of an idle first flash memory page, the controller chip replaces the data in the first memory page with the first flash memory page and returns a swap-out completion response to the external device.
[0052] In the disclosed embodiment, a host-dominated mode is employed. The host detects whether memory is sufficient and, when determining that memory space is insufficient, provides information about the data that needs to be swapped to the flash memory chip. This information may include the address of the data to be swapped to the flash memory chip in the memory and the address of the flash memory page to which the data will be swapped.
[0053] The present embodiment differs from the aforementioned host-led embodiment in that the swap-out instruction sent by the host in the aforementioned host-led embodiment carries only the address of the first memory page storing the data, and does not carry or specify the address of the flash memory page required for data replacement in the flash memory chip. The flash memory page required for data replacement in the flash memory chip is determined by the CXL memory module. In the present embodiment, the swap-out instruction sent by the host carries not only the address of the first memory page storing the data, but also the address of the flash memory page required for data replacement in the flash memory chip. That is, the flash memory page required for data replacement in the flash memory chip is determined by the host.
[0054] The CXL memory module sends information about the total available DRAM memory space to the host. The host runs virtual memory, maintaining a logical-physical address translation table that maps logical addresses, memory addresses, and flash memory addresses. When the host determines that memory space is insufficient, it sends a swap-out instruction to the CXL module, carrying the address of the first memory page containing data and the address of the first free flash memory page.
[0055] Upon receiving the swap-out command, the CXL memory module swaps the data in the first memory page to the first flash memory page specified by the host and returns a swap-out completion response to the host. Upon receiving the swap-out completion response from the CXL memory module, the host releases the first memory page, marks the memory address of the data as invalid, and records the flash memory address of the data as the address of the first flash memory page, marking it valid.
[0056] In this embodiment, when a host detects insufficient memory, it can send a swap-out command via the cxl.io protocol, instructing the CXL memory module to store data in a specific address segment into a specific flash memory page in the flash memory chip. CXL then reads the data in that address segment from the memory into the flash memory address specified by the host and returns a swap-out completion response to the host.
[0057] In an exemplary embodiment of the present disclosure, the controller chip may include a CXL interface configured to connect to a host. The host may send instructions via the cxl.io protocol, including swap-out instructions, swap-in instructions described in the following embodiments, and memory request instructions.
[0058] In an exemplary embodiment of the present disclosure, the controller chip may further be configured as follows:
[0059] The controller chip receives a swap-in instruction sent by an external device, which carries the address of the first flash memory page and the address of the idle second memory page; the controller chip reads data from the first flash memory page, writes it to the second memory page, and returns a swap-in completion response to the external device.
[0060] When the host receives a request to read data (such as one sent by a process), it searches for the data's memory address and flash memory address based on the data's logical address. If the memory address is invalid but the flash memory address is valid, the host sends a swap-in instruction to the CXL memory module, carrying the address of the first flash memory page and the address of a free second memory page.
[0061] After the data of the read-only page is replaced in the flash memory, the data in the flash memory is still retained and the corresponding flash memory address is retained in the data information. When the data of the read-only page is used again, the data is restored from the same flash memory address.
[0062] After receiving the swap-in command from the host, the CXL memory module reads the data from the first flash memory page, writes it to the second memory page, and returns a swap-in completion response to the host. Upon receiving the swap-in completion response from the CXL memory module, the host records the memory address of the data as the address of the second memory page and marks it as valid.
[0063] When the displaced data needs to be used, the read and write operations on the corresponding logical address will trigger the host's virtual memory management mechanism. The host will read the data from the corresponding address in the flash memory back to a new memory address based on the corresponding tag, and modify the correspondence between the logical address, memory address, and flash address of the data in the logical-physical address translation table so that the new memory address corresponds to the same logical address. If there is not enough free space in the memory, other memory pages can be replaced first.
[0064] In an exemplary embodiment of the present disclosure, the controller chip may also be configured as:
[0065] The controller chip receives a swap-in instruction sent by an external device, which carries the address of a first flash memory page; the controller chip selects an idle second memory page from a memory (such as a DRAM chip), reads data from the first flash memory page, writes it to the second memory page, and returns a swap-in completion response to the external device.
[0066] The present embodiment differs from the aforementioned embodiment in that: in the aforementioned embodiment, the swap-in instruction sent by the host carries not only the address of the first flash memory page where the data to be read is located, but also the address of the memory page required to read the data into the DRAM chip. That is, the memory page required to read the data into the memory (e.g., the DRAM chip) is determined by the host. In the present embodiment, the swap-in instruction sent by the host carries only the address of the first flash memory page where the data to be read is located, and does not carry or specify the address of the flash memory page required to read the data into the flash memory chip. The memory page required to swap the data into the memory (e.g., the DRAM chip) is determined by the CXL memory module.
[0067] In an example embodiment of the present disclosure, when the host determines to release the second memory page storing data, it searches for the correspondence and status of the logical address, memory address and flash memory address of the data. When it determines that the flash memory address of the data is valid, it directly releases the second memory page and marks the memory address of the data as invalid.
[0068] When the host is in control, it can release the memory space occupied by the data. After the replacement is completed, or when the data of the read-only page needs to be replaced out of memory again, the host can mark the corresponding memory page as free and release the corresponding memory page.
[0069] When the data on the read-only page needs to be swapped out of the memory again, that is, when the data is not swapped out for the first time, since the data is stored in the flash memory page where it was first swapped out, no further flash memory writing is performed. The memory space occupied by the data is directly released, and the memory address of the data is marked as invalid, and the data is no longer swapped into the flash memory chip.
[0070] By searching for the corresponding relationship and status of the data logical address, memory address, and flash memory address, it can be determined that the data is not swapped out for the first time when the flash memory address of the data is valid.
[0071] In an exemplary embodiment of the present disclosure, when a process using memory ends, all read-only pages and flash memory pages used by the process's data are released. When the host is in control, the host can release the memory space occupied by the data. When the process using memory ends and confirms that the read-only pages are no longer in use, the host releases the corresponding memory and flash memory space.
[0072] In an exemplary embodiment of the present disclosure, the controller chip runs virtual memory and maintains the correspondence between the logical address, memory address, and flash memory address of the data in the logical-physical address translation table. The controller chip is configured to perform data replacement in the following manner:
[0073] When the controller chip receives a memory request instruction from an external device and / or manages memory, it determines that the allocable memory in the memory chip is insufficient, starts data replacement, and replaces part of the data in the memory chip to the free area of the flash memory chip.
[0074] The disclosed embodiment can determine whether the memory space is sufficient and the data information that needs to be replaced to the flash memory chip when the memory space is insufficient through the self-directed mode of the CXL memory module.
[0075] The self-directed mode can determine whether the allocatable memory in the memory chip is insufficient in at least one of the following two ways:
[0076] The first implementation method: Upon receiving a memory request command from an external device, the CXL memory module determines whether the available memory in the memory chip is insufficient. The memory request command carries the read / write attributes of each memory page requested, which can be read-only or read-write.
[0077] The CXL memory module runs virtual memory, and external devices (such as the host) read and write the memory through logical addresses. When the host needs to increase capacity, it can send a memory request instruction to the CXL memory module, carrying the read and write attributes of each memory page requested, which can be read-only or read-write.
[0078] The host sends a memory request command to the CXL memory module to inform the CXL memory module of the memory page information it needs. For example, the memory request command may indicate that space for 5 memory pages needs to be requested, and that 3 of the 5 memory pages need to be read-only pages and 2 read-write pages.
[0079] After receiving the memory request instruction from the host, the CXL memory module compares the remaining memory space with the memory space requested by the memory request instruction. If the remaining memory space is less than the requested memory space, it is determined that the allocable memory in the memory chip is insufficient.
[0080] When the CXL memory module determines that the available memory in the memory chip is insufficient, it initiates data replacement. During data replacement, only the data in the read-only pages of the memory chip is replaced, or the data in the read-only pages of the memory chip are replaced first.
[0081] The CXL memory module can obtain the read and write properties of the memory pages that already store data in the DRAM chip based on the memory page properties of previously written data, and replace or prioritize the data in the read-only pages of the memory chip to the free area (free flash memory page) of the flash memory chip.
[0082] After the CXL memory module replaces or prioritizes data from the read-only page of the memory chip with a free area (free flash page) on the flash memory chip, it marks the information in that free area accordingly: it updates the correspondence table between the data's logical address, memory address, and flash memory address, updates the data's flash memory address to the address of the free flash page, marks it valid, and marks the memory address invalid. The data replaced in the flash memory chip retains the same logical address, meaning the CXL memory module marks the data's information accordingly, including its address in the flash memory chip.
[0083] The second implementation method: When the controller chip manages the memory, it determines whether the allocatable memory in the memory chip is insufficient.
[0084] The CXL memory module uses a virtual memory management mechanism. When it detects that the remaining memory space is less than a threshold, it determines that the allocatable memory in the memory chip is insufficient.
[0085] When the CXL memory module determines that the available memory in the memory chip is insufficient, it initiates data replacement. During data replacement, only the data in the memory pages that are not expected to be used within the specified timeframe is replaced.
[0086] The controller chip can also be configured to count the usage time of memory pages in the memory chip. The CXL memory module runs virtual memory, counting the usage time of each memory page in the DRAM chip. When the available memory in the DRAM chip is insufficient, data replacement is initiated, replacing the data in the memory page that is not expected to be used in the near future with the free flash memory pages in the flash memory chip.
[0087] After the CXL memory module replaces data from memory pages in the memory chip that are not expected to be used within a certain timeframe into a free area (free flash page) on the flash memory chip, it then marks the free area accordingly: it updates the table that represents the data's logical address, memory address, and flash memory address, updates the data's flash memory address to the address of the free flash page, marks it valid, and marks the memory address invalid. The data replaced into the flash memory chip retains the same logical address; that is, the CXL memory module marks the data accordingly, including its address in the flash memory chip.
[0088] In an example embodiment of the present disclosure, part of the data in the memory chip may include first data in a read-only page of the memory chip, and the controller chip replacing part of the data in the memory chip to a free area of the flash memory chip may include:
[0089] Detect whether the first data is swapped out for the first time; when the first data is swapped out for the first time, replace the first data to the idle flash memory page of the flash memory chip, record the flash memory address of the first data as the address of the idle flash memory page and mark it as valid.
[0090] The first data refers to data in the read-only page that needs to be replaced from the memory chip to the flash memory chip. The first data may also be referred to as replacement data or swapped-out data.
[0091] For the replacement of read-only page data, the CXL memory module detects whether the first data that needs to be replaced from the memory chip to the flash memory chip is swapped out for the first time. When the first data is swapped out for the first time, the first data is swapped into the free flash memory page of the flash memory chip, and the address of the free flash memory page is recorded and marked as valid.
[0092] In an exemplary embodiment of the present disclosure, the controller chip detecting whether the first data is swapped out for the first time may include:
[0093] Searching for the states of the memory address and the flash memory address of the first data; determining that the first data is swapped out for the first time when the memory address of the first data is valid and the flash memory address is invalid; and determining that the first data is not swapped out for the first time when the flash memory address of the first data is valid.
[0094] When replacing read-only page data, the CXL memory module searches a table that lists the data's logical address, memory address, and flash memory address, as well as their flag status. It then determines the memory address and flash memory address status of the first data to be swapped from the memory chip to the flash memory chip. If the memory address of the first data is valid and the flash memory address is invalid, it determines that this is the first time the first data has been swapped out. If the flash memory address of the first data is valid, it determines that this is not the first time the first data has been swapped out. The table that lists the logical address, memory address, and flash memory address, as well as their flag status, allows the user to determine whether the data is being swapped out for the first time.
[0095] After the first data is swapped into a free flash page on the flash memory chip, the CXL memory module marks the information in that free area accordingly: it updates the table that lists the data's logical address, memory address, and flash memory address. It then updates the data's flash memory address to the address of the free flash page, marking it valid and invalidating the memory address. After the read-only page data is swapped into the flash memory chip, the CXL memory module marks the data's information accordingly, including its address in the flash memory chip, to preserve the corresponding flash memory address in the data information.
[0096] In an exemplary embodiment of the present disclosure, the controller chip may be further configured to: directly release the read-only page and mark the memory address of the first data as invalid when the first data is not swapped out for the first time.
[0097] When it is determined that the first data is not swapped out for the first time, that is, the first data needs to be swapped out of the memory again, no further writing is performed on the flash memory, and the memory space is directly released.
[0098] In an exemplary embodiment of the present disclosure, the controller chip may further be configured as follows:
[0099] After the first data is replaced to the free area of the flash memory chip, when it is determined that the first data needs to be swapped in, the first data is read from the recorded flash memory address of the first data and written to the free memory page selected from the memory chip, and the memory address of the first data is updated to the address of the free memory page and marked as valid.
[0100] After the first data is replaced to the free area of the flash memory chip, when the first data is used again, the first data can be restored from the same flash memory address.
[0101] When the replaced first data needs to be used, the read and write operations on the corresponding logical address will trigger the virtual memory management mechanism of the CXL memory module. The CXL memory module will read the first data from the corresponding address in the flash memory back to a new memory address according to the corresponding mark, and modify the correspondence between the logical address, memory address and flash memory address of the data in the logical-physical address translation table so that the new memory address corresponds to the same logical address.
[0102] In an exemplary embodiment of the present disclosure, the controller chip determining that the first data needs to be swapped in may include:
[0103] receiving a request from an external device to read first data, the request carrying a logical address of the first data; finding that the flash memory address of the first data is valid and the memory address is invalid, and determining that the first data needs to be swapped in;
[0104] The controller chip may also be configured to: after reading the first data from the flash memory address where the first data is recorded, return the read first data to the external device.
[0105] After an external device (such as a host) receives a request to read first data, the host sends a data read instruction to the CXL memory module. The data read instruction carries the logical address of the data to be read. The CXL memory module searches the table of correspondences between the logical address, memory address, and flash memory address of the data, as well as the flag status. If the memory address corresponding to the logical address is invalid, but the flash memory address is valid, the CXL memory module determines that the first data needs to be swapped in. Based on the corresponding flag, the CXL memory module reads the first data from the corresponding address in the flash memory back to a new memory address. Based on the flash memory address of the first data in the flash memory chip, the CXL memory module reads the first data from the flash memory address where the first data is recorded, and returns the read first data to the host.
[0106] In an exemplary embodiment of the present disclosure, the controller chip may be further configured to release all read-only pages and flash memory pages used by data of a process when the process using the memory ends.
[0107] In an exemplary embodiment of the present disclosure, when a process using memory ends, all read-only pages and flash memory pages used by that process's data are released. When the CXL memory module is in control, the CXL memory module releases the corresponding memory and flash memory space when the process using memory ends and confirms that the read-only pages will no longer be used.
[0108] The present disclosure also provides a method for replacing memory data, which is applied to a CXL memory module provided with a flash memory chip and a memory chip. The method for replacing memory data may include:
[0109] The CXL memory module can replace part of the data in the memory chip with the flash memory chip.
[0110] The memory data replacement method provided in the disclosed embodiments is applicable to a CXL memory module that includes at least one set of flash memory chips. When the memory (DRAM chip) is running low, some of the data in the memory is replaced with the flash memory chips, and then read from the flash memory chips when needed.
[0111] The execution subject of the memory data replacement method provided in the embodiments of the present disclosure is the CXL memory module shown in any embodiment. The implementation principle and effect are similar and will not be repeated here.
[0112] In an exemplary embodiment of the present disclosure, the CXL memory module operates virtual memory and maintains the correspondence between the logical address, memory address, and flash memory address of data in the logical-physical address translation table. The CXL memory module can perform data replacement in the following manner:
[0113] When receiving a memory application instruction and / or managing memory sent by an external device, it is determined that the allocatable memory in the memory chip is insufficient, and data replacement is started to replace part of the data in the memory chip to the free area of the flash memory chip.
[0114] In an exemplary embodiment of the present disclosure, the memory application instruction may carry the read / write attribute of each memory page applied for, and the read / write attribute is a read-only page or a read / write page;
[0115] When the CXL memory module starts data replacement, it only replaces the data in the read-only pages of the memory chip, or preferentially replaces the data in the read-only pages of the memory chip.
[0116] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include: counting usage time of memory pages in the memory chip;
[0117] When the CXL memory module starts data replacement, it only replaces data of memory pages that will not be used within a predicted time.
[0118] In an example embodiment of the present disclosure, the portion of data in the memory chip may include first data in a read-only page of the memory chip, and the CXL memory module replacing the portion of data in the memory chip to a free area of the flash memory chip may include:
[0119] detecting whether the first data is swapped out for the first time;
[0120] When the first data is swapped out for the first time, the first data is swapped into a free flash memory page of the flash memory chip, and the flash memory address of the first data is recorded as the address of the free flash memory page and marked as valid.
[0121] In an exemplary embodiment of the present disclosure, the CXL memory module detecting whether the first data is swapped out for the first time may include:
[0122] Finding the states of the memory address and the flash memory address of the first data;
[0123] When it is determined that the memory address of the first data is valid and the flash memory address is invalid, determining that the first data is swapped out for the first time;
[0124] When it is determined that the flash memory address of the first data is valid, it is determined that the first data is not swapped out for the first time.
[0125] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0126] After the first data is replaced to the free area of the flash memory chip, when it is determined that the first data needs to be swapped in, the first data is read out from the recorded flash memory address of the first data, written to the free memory page selected from the memory chip, and the memory address of the first data is updated to the address of the free memory page and marked as valid.
[0127] In an example embodiment of the present disclosure, the CXL memory module determining that the first data needs to be swapped in may include:
[0128] receiving a request from an external device to read the first data, where the request carries a logical address of the first data;
[0129] Finding that the flash memory address of the first data is valid and the memory address is invalid, and determining that the first data needs to be swapped in;
[0130] The method for replacing memory data may further include: after reading the first data from the flash memory address where the first data is recorded, returning the read first data to the external device.
[0131] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include: when the first data is not swapped out for the first time, directly releasing the read-only page and marking the memory address of the first data as invalid.
[0132] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0133] When the process using the memory ends, all read-only and flash pages used by the process's data are released.
[0134] In an exemplary embodiment of the present disclosure, the CXL memory module may perform data replacement in the following manner:
[0135] receiving a swap-out instruction sent by an external device, the swap-out instruction carrying the address of a first memory page storing data and the address of an idle first flash memory page, the CXL memory module swapping the data in the first memory page into the first flash memory page, and returning a swap-out completion response to the external device;
[0136] or,
[0137] Upon receiving a swap-out instruction sent by an external device, the swap-out instruction carries the address of a first memory page storing data, the CXL memory module selects an idle first flash memory page from the flash memory chip, replaces the data in the first memory page into the first flash memory page, and returns the address of the first flash memory page to the external device.
[0138] In an exemplary embodiment of the present disclosure, the first memory page may be a read-only page.
[0139] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0140] The CXL memory module receives a swap-in instruction sent by the external device, where the swap-in instruction carries the address of the first flash memory page and the address of the idle second memory page;
[0141] The CXL memory module reads the data from the first flash memory page, writes the data into the second memory page, and returns a swap-in completion response to the external device.
[0142] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0143] The CXL memory module receives a swap-in instruction sent by the external device, where the swap-in instruction carries the address of the first flash memory page;
[0144] The CXL memory module selects an idle second memory page in the memory (such as a DRAM chip), reads the data from the first flash memory page, writes the data into the second memory page, and returns a swap-in completion response to the external device.
[0145] FIG3 is a block diagram of a controller chip of a CXL memory module according to an embodiment of the present disclosure. As shown in FIG3 , the controller chip includes a memory interface 31 , a flash memory interface 32 , and a storage controller 33 connected to the memory interface and the flash memory interface.
[0146] The memory controller can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that implement the embodiments of the present disclosure. The memory controller is configured to execute the memory data replacement method described in any embodiment of the CXL memory module.
[0147] In an exemplary embodiment of the present disclosure, as shown in FIG2 , an implementation of a controller chip may be implemented by an embedded CPU core and dedicated hardware (such as programmable hardware).
[0148] In an exemplary embodiment of the present disclosure, as shown in FIG3 , the controller chip may further include a CXL interface 34 configured to connect to a host. The host may connect to the CXL memory module via the CXL interface of the controller chip.
[0149] The present disclosure also provides a method for replacing memory data, which is applied to a host connected to a CXL memory module equipped with a flash memory chip and a memory chip (such as a DRAM chip). FIG4 is a flowchart of the method for replacing memory data provided by an example embodiment of the present disclosure. As shown in FIG4, the method for replacing memory data may include:
[0150] S401: The host runs a virtual memory and maintains a correspondence between the logical address, memory address, and flash memory address of data in a logical-physical address translation table.
[0151] In the disclosed embodiment, a host-dominated mode can be adopted, where the host detects whether the memory is sufficient and, when the memory space is insufficient, detects the data information that needs to be replaced with the flash memory chip. The data information may include the address of the data to be replaced with the flash memory chip in the memory.
[0152] The CXL memory module sends information about the total amount of available DRAM memory space to the host computer. The host computer runs virtual memory and maintains the correspondence between the logical address, memory address, and flash memory address of the data in the logical-physical address translation table.
[0153] S402: When the host determines that the memory space is insufficient, it sends a swap instruction to the CXL memory module, carrying the address of the first memory page storing data and the address of the first free flash memory page, or carrying the address of the first memory page storing data.
[0154] When the host detects insufficient memory, it can send a command via the cxl.io protocol to the CXL memory module to store data from a specific address segment into the flash memory chip. The CXL memory module selects the flash memory address, reads the data from the memory segment into the flash memory address, and returns the flash memory address to the host. Alternatively, the host can specify a flash memory address to the CXL memory module, which then reads the data from the memory segment into the host-specified flash memory address and returns a swap completion response to the host.
[0155] S403: After receiving the swap-out completion response or the address of the first flash memory page from the CXL memory module, the host releases the first memory page, marks the memory address of the data as invalid, records the flash memory address of the data as the address of the first flash memory page and marks it as valid.
[0156] The host uses virtual memory for management. The data replaced in the flash memory still retains the same logical address, but the information of the data is marked accordingly, and the mark includes the address of the data in the flash memory.
[0157] The execution subject of the memory data replacement method provided in the embodiments of the present disclosure is the host shown in any embodiment, and its implementation principle and implementation effect are similar, which will not be repeated here.
[0158] In an exemplary embodiment of the present disclosure, the first memory page may be a read-only page. The host records the read / write attributes of each memory page, including whether it is a read-only page or a read / write page. During data replacement, only data in the read-only memory page is replaced, or data in the read-only memory page is replaced preferentially.
[0159] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0160] When the host receives a request to read the data, it searches for the memory address and the flash memory address of the data according to the logical address of the data;
[0161] When the found memory address is invalid and the flash memory address is valid, sending a swap-in instruction to the CXL memory module, carrying the address of the first flash memory page and the address of the idle second memory page;
[0162] After receiving the swap-in completion response returned by the CXL memory module, the memory address of the data is recorded as the address of the second memory page and marked as valid.
[0163] When the host receives a request to read data, it searches for the data's memory address and flash memory address based on the data's logical address. If the memory address is invalid but the flash memory address is valid, the host sends a swap-in command to the CXL memory module, carrying the address of the first flash memory page and the address of a free second memory page.
[0164] After the data of the read-only page is replaced in the flash memory, the data in the flash memory is still retained and the corresponding flash memory address is retained in the data information. When the data of the read-only page is used again, the data is restored from the same flash memory address.
[0165] After receiving the swap-in command from the host, the CXL memory module reads the data from the first flash memory page, writes it to the second memory page, and returns a swap-in completion response to the host. Upon receiving the swap-in completion response from the CXL memory module, the host records the memory address of the data as the address of the second memory page and marks it as valid.
[0166] When the displaced data needs to be used, the read and write operations on the corresponding logical address will trigger the host's virtual memory management mechanism. The host will read the data from the corresponding address in the flash memory back to a new memory address based on the corresponding tag, and modify the correspondence between the logical address, memory address, and flash memory address of the data in the logical-physical address translation table so that the new memory address corresponds to the same logical address. If there is not enough free space in the memory, other memory pages will be replaced.
[0167] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0168] When determining to release the second memory page storing the data, searching for a correspondence and a state among the data logical address, the memory address, and the flash memory address;
[0169] When it is determined that the flash memory address of the data is valid, the second memory page is directly released and the memory address of the data is marked as invalid.
[0170] When the host is in control, it can release the memory space occupied by the data. After the replacement is completed, or when the data of the read-only page needs to be replaced out of memory again, the host can mark the corresponding memory page as free and release the corresponding memory page.
[0171] When the data in the read-only page needs to be replaced out of the memory again, that is, when the data is not replaced for the first time, no further writing to the flash memory is performed, the memory space occupied by the data is directly released, the memory address of the data is marked as invalid, and the data that needs to be replaced again is no longer replaced into the flash memory chip.
[0172] By searching for the corresponding relationship and status of the logical address, memory address, and flash memory address of the data, it can be determined that the data is not swapped out for the first time when the flash memory address of the data is valid.
[0173] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0174] The host reads and writes memory through logical addresses;
[0175] When the host needs to increase capacity, it sends a memory application instruction to the CXL memory module, carrying the read-write attribute of each memory page applied for, where the read-write attribute is read-only page or read-write page.
[0176] The disclosed embodiment can determine whether the memory space is sufficient and the data information that needs to be replaced to the flash memory chip when the memory space is insufficient through the self-directed mode of the CXL memory module.
[0177] The CXL memory module runs virtual memory, and external devices (such as the host) read and write the memory through logical addresses. When the host needs to increase capacity, it can send a memory request instruction to the CXL memory module, carrying the read and write attributes of each memory page requested, which can be read-only or read-write.
[0178] The host sends a memory request command to the CXL memory module to inform the CXL memory module of the memory page information it needs. For example, the memory request command may indicate that space for 5 memory pages needs to be requested, and that 3 of the 5 memory pages need to be read-only pages and 2 read-write pages.
[0179] When the CXL memory module receives a memory request instruction from the host and determines that the allocable memory in the memory chip is insufficient, it performs data replacement. The CXL memory module replaces or prioritizes the data in the read-only page of the memory chip to the free area (free flash memory page) of the flash memory chip.
[0180] In an exemplary embodiment of the present disclosure, the method for replacing memory data may further include:
[0181] When a process using memory ends, all read-only pages and flash memory pages used by that process's data are released. If the host is in control, the host can release the memory space occupied by the data. When a process using memory ends and confirms that the read-only pages are no longer in use, the host releases the corresponding memory and flash memory space.
[0182] FIG5 is a block diagram of a host provided in an embodiment of the present disclosure. The host may be connected to a CXL memory module provided with a flash memory chip and a memory chip (such as a DRAM chip) through a CXL interface. As shown in FIG5 , the host may include a memory 51 and a processor 52 .
[0183] The memory is used to store execution instructions. The processor can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that implement the embodiments of the present disclosure. When the host is running, the processor communicates with the memory, and the processor calls the execution instructions to execute the memory data replacement method described in any embodiment of the host.
[0184] FIG6 is a structural block diagram of a computer system provided by an embodiment of the present disclosure. As shown in FIG6 , the computer system may include a host 61 shown in any embodiment and a CXL memory module 62 shown in any embodiment.
[0185] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. A CXL memory module, comprising a flash memory chip, a memory chip, and a controller chip connected to the flash memory chip and the memory chip, wherein the controller chip is configured to replace part of the data in the memory chip with the flash memory chip.
2. The CXL memory module according to claim 1, wherein: The controller chip runs virtual memory and maintains the correspondence between the logical address, memory address and flash address of the data in the logical-physical address translation table: the controller chip is configured to perform data replacement in the following manner: When the controller chip receives a memory request instruction sent by an external device and / or the controller chip manages memory, it determines that the allocatable memory in the memory chip is insufficient, starts data replacement, and replaces part of the data in the memory chip to the free area of the flash memory chip.
3. The CXL memory module according to claim 2, wherein: The memory application instruction carries the read / write attribute of each memory page applied for, and the read / write attribute is a read-only page or a read / write page; When the controller chip starts data replacement, only the data in the read-only page in the memory chip is replaced, or the data in the read-only page in the memory chip is replaced preferentially.
4. The CXL memory module according to claim 2, wherein: The controller chip is further configured to count usage time of memory pages in the memory chip; When the controller chip starts data replacement, it only replaces the data of the memory pages that will not be used within the expected time.
5. The CXL memory module according to claim 3 or 4, wherein: The part of the data in the memory chip includes the first data in the read-only page in the memory chip, and the controller chip replaces the part of the data in the memory chip into the free area of the flash memory chip, including: Detecting whether the first data is swapped out for the first time; When the first data is swapped out for the first time, the first data is replaced into a free flash memory page of the flash memory chip, and the flash memory address of the first data is recorded as the address of the free flash memory page and marked as valid.
6. The CXL memory module according to claim 5, wherein: The controller chip detects whether the first data is swapped out for the first time, including: Finding the states of the memory address and the flash memory address of the first data; When it is determined that the memory address of the first data is valid and the flash memory address is invalid, determining that the first data is swapped out for the first time; When it is determined that the flash memory address of the first data is valid, it is determined that the first data is not swapped out for the first time.
7. The CXL memory module according to claim 6, wherein: The controller chip is also configured as: After the first data is replaced to the free area of the flash memory chip, when it is determined that the first data needs to be swapped in, the first data is read out from the recorded flash memory address of the first data, written to the free memory page selected from the memory chip, and the memory address of the first data is updated to the address of the free memory page and marked as valid.
8. The CXL memory module according to claim 6, wherein: The controller chip determines that the first data needs to be swapped in, including: receiving a request from an external device to read the first data, wherein the request carries a logical address of the first data; Finding that the flash memory address of the first data is valid and the memory address is invalid, and determining that the first data needs to be swapped in; The controller chip is further configured to: after reading out the first data from the flash memory address recording the first data, return the read first data to the external device.
9. The CXL memory module according to claim 5, wherein: The controller chip is further configured to: directly release the read-only page and mark the memory address of the first data as invalid when the first data is not swapped out for the first time.
10. The CXL memory module according to claim 2, wherein: The controller chip is also configured to release all read-only pages and flash memory pages used by data of a process using the memory when the process ends.
11. The CXL memory module according to claim 1, wherein: The controller chip is configured to perform data replacement in the following manner: Upon receiving a swap-out instruction sent by an external device, the swap-out instruction carries the address of a first memory page storing data and the address of an idle first flash memory page, the controller chip replaces the data in the first memory page into the first flash memory page, and returns a swap-out completion response to the external device; or, Upon receiving a swap-out instruction sent by an external device, the swap-out instruction carries the address of a first memory page storing data, the controller chip selects a free first flash memory page from the flash memory chip, replaces the data in the first memory page into the first flash memory page, and returns the address of the first flash memory page to the external device.
12. The CXL memory module according to claim 11, wherein: The first memory page is a read-only page.
13. The CXL memory module according to claim 11, wherein: The controller chip is also configured as: receiving a swap-in instruction sent by the external device, wherein the swap-in instruction carries the address of the first flash memory page and the address of the idle second memory page; The controller chip reads the data from the first flash memory page, writes the data into the second memory page, and returns a swap-in completion response to the external device.
14. A method for replacing memory data, applied to a host connected to a CXL memory module provided with a flash memory chip and a memory chip, comprising: The host runs virtual memory and maintains the correspondence between the logical address, memory address and flash memory address of the data in the logical-physical address translation table; When the host determines that the memory space is insufficient, it sends a swap instruction to the CXL memory module, carrying the address of the first memory page storing the data and the address of the first free flash memory page, or carrying the address of the first memory page storing the data; After receiving the swap-out completion response or the address of the first flash memory page sent by the CXL memory module, the host releases the first memory page, marks the memory address of the data as invalid, and records the The flash memory address of the data is the address of the first flash memory page and is marked as valid.
15. The method according to claim 14, wherein: The first memory page is a read-only page.
16. The method according to claim 14, wherein: The method further comprises: When the host receives a request to read the data, it searches for the memory address and the flash memory address of the data according to the logical address of the data; When the found memory address is invalid and the flash memory address is valid, sending a swap-in instruction to the CXL memory module, carrying the address of the first flash memory page and the address of the idle second memory page; After receiving the swap-in completion response returned by the CXL memory module, the memory address of the data is recorded as the address of the second memory page and marked as valid.
17. The method according to claim 16, wherein: The method further comprises: When determining to release the second memory page storing the data, searching for the corresponding relationship and state of the logical address, memory address and flash memory address of the data; When it is determined that the flash memory address of the data is valid, the second memory page is directly released and the memory address of the data is marked as invalid.
18. The method according to claim 14, wherein: The method further comprises: The host reads and writes memory through logical addresses; When the host needs to increase capacity, it sends a memory application instruction to the CXL memory module, carrying the read-write attribute of each memory page applied for, where the read-write attribute is a read-only page or a read-write page.
19. The method according to claim 14, wherein: The method further comprises: When a process using memory ends, all read-only pages and flash pages used by the process's data are released.
20. A method for replacing memory data, applied to a CXL memory module provided with a flash memory chip and a memory chip, comprising: The CXL memory module can replace part of the data in the memory chip into the flash memory chip.
21. The method according to claim 20, wherein: The CXL memory module runs virtual memory and maintains the correspondence between the logical address, memory address and flash address of the data in the logical-physical address translation table. The CXL memory module performs data replacement in the following manner: When receiving a memory application instruction and / or managing memory sent by an external device, it is determined that the allocatable memory in the memory chip is insufficient, and data replacement is started to replace part of the data in the memory chip to the free area of the flash memory chip.
22. The CXL memory module of claim 21, wherein: The memory application instruction carries the read / write attribute of each memory page applied for, and the read / write attribute is a read-only page or a read / write page; When the CXL memory module starts data replacement, it only replaces the data in the read-only page of the memory chip, or preferentially replaces the data in the read-only page of the memory chip.
23. The CXL memory module of claim 21, wherein: The method further comprises: counting usage time of memory pages in the memory chip; When the CXL memory module starts data replacement, it only replaces data of memory pages that will not be used within a predicted time.
24. The CXL memory module according to claim 22 or 23, wherein: The part of the data in the memory chip includes the first data in the read-only page of the memory chip, and the CXL memory module replaces the part of the data in the memory chip into the free area of the flash memory chip, including: Detecting whether the first data is swapped out for the first time; When the first data is swapped out for the first time, the first data is replaced into a free flash memory page of the flash memory chip, and the flash memory address of the first data is recorded as the address of the free flash memory page and marked as valid.
25. The CXL memory module of claim 24, wherein: The CXL memory module detects whether the first data is swapped out for the first time, including: Finding the states of the memory address and the flash memory address of the first data; When it is determined that the memory address of the first data is valid and the flash memory address is invalid, determining that the first data is swapped out for the first time; When it is determined that the flash memory address of the first data is valid, it is determined that the first data is not swapped out for the first time.
26. The CXL memory module of claim 25, wherein: The method further comprises: After the first data is replaced to the free area of the flash memory chip, when it is determined that the first data needs to be swapped in, the first data is read out from the recorded flash memory address of the first data, written to the free memory page selected from the memory chip, and the memory address of the first data is updated to the address of the free memory page and marked as valid.
27. The CXL memory module of claim 25, wherein: The CXL memory module determines that the first data needs to be swapped in, including: receiving a request from an external device to read the first data, wherein the request carries a logical address of the first data; Finding that the flash memory address of the first data is valid and the memory address is invalid, and determining that the first data needs to be swapped in; The method further includes: after reading the first data from the flash memory address recording the first data, returning the read first data to the external device.
28. The CXL memory module of claim 24, wherein: The method further includes: when the first data is not swapped out for the first time, directly releasing the read-only page and marking the memory address of the first data as invalid.
29. The CXL memory module of claim 21, wherein: The method further comprises: When a process using memory ends, all read-only pages and flash pages used by the process's data are released.
30. The CXL memory module of claim 20, wherein: The CXL memory module performs data replacement in the following manner: Receiving a swap-out instruction sent by an external device, the swap-out instruction carries the address of a first memory page storing data and the address of an idle first flash memory page, the CXL memory module replaces the data in the first memory page into the first flash memory page, and returns a swap-out completion response to the external device; or, A swap instruction sent by an external device is received, wherein the swap instruction carries a first The CXL memory module selects an idle first flash memory page from the flash memory chip, replaces the data in the first memory page to the first flash memory page, and returns the address of the first flash memory page to the external device.
31. The CXL memory module of claim 30, wherein: The first memory page is a read-only page.
32. The CXL memory module of claim 30, wherein: The method further comprises: The CXL memory module receives a swap-in instruction sent by the external device, wherein the swap-in instruction carries an address of the first flash memory page and an address of an idle second memory page; The CXL memory module reads the data from the first flash memory page, writes the data into the second memory page, and returns a swap-in completion response to the external device.
33. A controller chip of a CXL memory module, the controller chip comprising a memory interface, a flash memory interface, and a storage controller connected to the memory interface and the flash memory interface, the storage controller being configured to execute the method according to any one of claims 20 to 32.
34. A host, comprising a memory and a processor, wherein the memory is used to store execution instructions; the processor calls the execution instructions and is configured to execute any one of the methods according to claims 14 to 19.
35. A computer system comprising the host according to claim 34, and the CXL memory module according to any one of claims 1-13.
Citation Information
Patent Citations
Computing system and method for performing remote direct memory access therein
CN113742257A
Memory device, host system and method of operating memory device
CN114442916A
System and method for load balancing in heterogeneous memory system
CN115617503A
Memory module, system including same, and operating method of memory module
CN115687193A
Semiconductor memory device
JP2008159013A
Cited By
CXL memory module, data processing method, task processing method, and controller
WO2026076780A1
