Memory system
The memory system addresses inefficiencies in wear leveling by dynamically managing connections and data movement across memory modules, reducing management information and write amplification, and optimizing fatigue distribution.
Patent Information
- Application Number
- JP2023048421
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2024-10-07
- Estimated Expiration
- 2043-03-24
AI Technical Summary
Existing memory systems face challenges in managing the amount of management information at the wear level between memory modules, leading to inefficiencies in wear leveling processes.
A memory system that controls connections between memory areas and a host device, utilizing interleave configuration information to select memory areas based on fatigue accumulation, and updates settings to distribute wear leveling across multiple memory modules, employing copy-on-write processing to manage data movement.
Reduces the amount of management information required for wear leveling, minimizes write amplification, and dynamically distributes fatigue load among memory modules, enhancing efficiency and reducing costs.
Smart Images

Figure 2024137066000001_ABST
Abstract
Description
[Technical field]
[0001] FIELD OF THE DISCLOSURE Embodiments of the present invention relate to a memory system. [Background technology]
[0002] CXL (Compute Express Link) (registered trademark) is one of the connection standards between a host device and a memory system. CXL uses the same physical signals as PCIe (Peripheral Component Interconnect-Express) (registered trademark). CXL consists of three protocols: (CXL.io), (CXL.cache), and (CXL.mem). CXL.io is a PCIe-based protocol. CXL.cache is a protocol for host devices and memory systems to access while maintaining cache coherency. CXL.mem is a protocol for coherently accessing memory devices included in a memory system. In addition, a memory system compatible with CXL2.0 supports multiple host devices. A memory system compatible with CXL2.0 has a memory pooling function that can virtually divide one memory device into multiple devices. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] US Patent Application Publication No. 2022 / 0308766 [Patent Document 2] US Patent Application Publication No. 2022 / 0050610 [Patent Document 3] U.S. Pat. No. 1,143,6137 [Patent Document 4] US Patent Application Publication No. 2021 / 0294739 [Patent Document 5] US Patent Application Publication No. 2022 / 0261160 [Patent Document 6] U.S. Pat. No. 10,733,110 Summary of the Invention [Problem to be solved by the invention]
[0004] An embodiment of the present invention provides a memory system capable of reducing the amount of data of management information at the hardware level between memory modules. [Means for solving the problem]
[0005] A memory system according to an embodiment includes a first memory area, a second memory area, and a control unit configured to control a connection between the first memory area and the second memory area and a host device, generate first interleave configuration information corresponding to the first memory area, and when an access request is received from the host device, select the first memory area based on the first interleave setting information, and update the first interleave setting information to second interleave setting information that does not correspond to the first memory area but corresponds to the second memory area based on an accumulated amount of fatigue in the first memory area. [Brief description of the drawings]
[0006] [Figure 1] 1 is a block diagram showing the overall configuration of a data processing device including a memory system according to a first embodiment. [Diagram 2] 1 is a block diagram showing a logical configuration of a memory in a memory module included in a memory system according to a first embodiment. [Diagram 3] 4 is a table showing a specific example of the fatigue counter table 31 included in the memory system according to the first embodiment. [Figure 4] 4 is a table showing a specific example of interleave setting information provided in the memory system according to the first embodiment. [Diagram 5] 4 is a table showing a specific example of a copy status table included in the memory system according to the first embodiment. [Figure 6]11 is a flowchart of an interleave setting update process in the memory system according to the first embodiment. [Figure 7] 4 is a diagram showing a specific example of determining the number of interleaves in the memory system according to the first embodiment. [Figure 8] 4 is a diagram showing a specific example of determining the number of interleaves in the memory system according to the first embodiment. [Figure 9] 4 is a diagram showing a specific example of determining an interleave granularity in the memory system according to the first embodiment. [Figure 10] 6 is a flowchart showing selection of a target logic device in the memory system according to the first embodiment. [Figure 11] 6 is a flowchart of copy-on-write processing in the memory system according to the first embodiment. [Figure 12] FIG. 4 is a configuration diagram of a logical device showing a specific example of copy-on-write processing in the memory system according to the first embodiment. [Figure 13] 11 is a diagram showing a specific example of identifying the address of an interleave set of a transfer source and reading data in the memory system according to the first embodiment. FIG. [Figure 14] 11 is a flowchart of a copy completion process in the memory system according to the first embodiment. [Figure 15] 6 is a flowchart of a background copy process in the memory system according to the first embodiment. [Figure 16] 11 is a flowchart of a target logic device selection in a memory system according to a first modified example of the first embodiment. [Figure 17] FIG. 11 is a diagram for explaining selection of a target logic device in a memory system according to a second modified example of the first embodiment. [Figure 18] FIG. 13 is a block diagram showing the overall configuration of a data processing device including a memory system according to a third modification of the first embodiment. [Figure 19] FIG. 11 is a block diagram showing the overall configuration of a data processing device including a memory system according to a second embodiment. [Figure 20]13 is a table showing a specific example of a mapping table included in the memory system according to the second embodiment. [Figure 21] 13 is a table showing a specific example of module management information included in the memory system according to the second embodiment. [Figure 22] 13 is a table showing a specific example of wear leveling history information provided in the memory system according to the second embodiment. [Figure 23] 10 is a flowchart showing data movement in wear leveling in a memory system according to a second embodiment. [Figure 24] 13 is a flowchart for determining a transfer source page in a memory system according to the second embodiment. [Diagram 25] 13 is a flowchart for determining a destination page in a memory system according to the second embodiment. [Figure 26] 13 is a table showing a specific example of wear leveling history information included in a memory system according to a first modified example of the second embodiment. [Figure 27] 13 is a table showing a specific example of a logical address list included in a memory system according to a second modification of the second embodiment. [Figure 28] 13 is a flowchart showing data movement in wear leveling in a memory system according to a second modification of the second embodiment. [Figure 29] 13 is a flowchart for determining a transfer source page in a memory system according to a second modification of the second embodiment. [Diagram 30] 13 is a flowchart for determining a destination page in a memory system according to a second modification of the second embodiment. [Diagram 31] 13 is a flowchart for determining a destination page in a memory system according to a third modified example of the second embodiment. [Diagram 32] 13 is a flowchart for determining a destination page in a memory system according to a fourth modified example of the second embodiment. [Diagram 33] FIG. 13 is a block diagram showing the overall configuration of a data processing device including a memory system according to a fifth modification of the second embodiment. [Diagram 34]FIG. 11 is a block diagram showing the overall configuration of a data processing device including a memory system according to a third embodiment. [Diagram 35] 13 is a flowchart showing data movement in wear leveling in a memory system according to a third embodiment. [Diagram 36] FIG. 13 is a diagram illustrating a first specific example of selection of a source interleave set in the memory system according to the third embodiment. [Figure 37] FIG. 13 is a diagram illustrating a second specific example of selection of a source interleave set in the memory system according to the third embodiment. [Figure 38] FIG. 13 is a diagram illustrating a third specific example of selection of a source interleave set in the memory system according to the third embodiment. [Figure 39] FIG. 13 is a diagram for explaining a first specific example of target logic device selection in the memory system according to the third embodiment. [Diagram 40] FIG. 13 is a diagram for explaining a second specific example of target logic device selection in the memory system according to the third embodiment. [Diagram 41] FIG. 13 is a diagram for explaining a third specific example of target logic device selection in the memory system according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] Hereinafter, embodiments will be described with reference to the drawings. Each embodiment illustrates an apparatus or method for embodying the technical idea of the invention. The drawings are schematic or conceptual, and the dimensions and ratios of each drawing are not necessarily the same as those in reality. All descriptions of one embodiment also apply to descriptions of other embodiments unless explicitly or obviously excluded. The technical idea of the present invention is not specified by the shape, structure, arrangement, etc. of components.
[0008] In the following description, components having substantially the same functions and configurations are given the same reference numerals. The numbers following the letters that make up the reference numerals are used to distinguish between elements that are referred to by the reference numerals containing the same letters and have similar configurations. When there is no need to distinguish between elements indicated by reference numerals containing the same letters, these elements are each referred to by the reference numerals containing the letters.
[0009] 1. First embodiment 1.1 Configuration 1.1.1 Data Processing Device Configuration First, an example of the configuration of a data processing device 1 will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the overall configuration of the data processing device 1.
[0010] 1, a data processing device 1 includes a host device 2 and a memory system 3. A plurality of host devices 2 may be connected to the memory system 3. In this embodiment, a case will be described in which CXL2.0 (registered trademark) is applied as a connection standard for interconnecting the host device 2 and the memory system 3. The connection standard is not limited to CXL2.0.
[0011] The host device 2 is an information processing device (computing device) that accesses the memory system 3. For example, the host device 2 requests (commands) the memory system 3 to write or read data. For example, a write request includes data, a command, and a host physical address (HPA). A read request includes a command and a host physical address HPA. For example, the host device 2 transmits a request (access request) to the memory system 3 based on the CXL.mem protocol.
[0012] The memory system 3 is connected to the host device 2 via a host bus. The memory system 3 may be connected to the host device 2 via a network or wireless communication. The memory system 3 executes a write operation, a read operation, or the like based on an access request from the host device 2. When the memory system 3 completes an operation based on the access request (command), it transmits a command response to the host device 2.
[0013] The fabric manager (FM) 4 is used for dynamic management of memory resources in the memory system 3 and for managing allocation of memory resources to the host device 2. In other words, the fabric manager 4 manages the configuration of memory resources in the memory system 3 as seen from the host device 2. For example, the fabric manager 4 is software that runs on any hardware of the data processing device 1. Note that a dedicated circuit for the fabric manager 4 may be provided. The fabric manager 4 may be executed in the host device 2 or in the memory system 3. The fabric manager 4 transmits management commands to the system management unit 12 via a fabric manager API (Application Programming Interface).
[0014] 1.1.2 Memory System Configuration Continuing with reference to FIG. 1, an example of the configuration of the memory system 3 will be described.
[0015] As shown in Fig. 1, the memory system 3 includes a control unit 10 and a plurality of memory modules (storage units) 20. In the example of Fig. 1, the memory system 3 includes four memory modules 20_0 to 20_3. Hereinafter, the memory module 20 is also referred to as a "device" or simply as a "module."
[0016] The control unit 10 corresponds to a CXL switch in CXL2.0. The control unit 10 controls the connection between the host device 2 and the memory module 20. The control unit 10 controls the allocation of memory resources of the memory module 20 to the host device 2.
[0017] The control unit 10 can virtually divide the memory area of one memory module 20. The control unit 10 manages each divided memory area as one "logical device." The control unit 10 has a function of dividing one piece of data and storing the divided data in multiple logical devices (hereinafter referred to as "interleaving").
[0018] The control unit 10 can execute wear leveling (hereinafter also referred to as "inter-module wear leveling") between a plurality of memory modules 20 (logical devices). Inter-module wear leveling is a process of leveling out the amount of accumulated fatigue, for example, by replacing data of a memory module 20 (logical device) having a relatively large amount of accumulated fatigue with data of a memory module 20 (logical device) having a relatively small amount of accumulated fatigue. The amount of accumulated fatigue is an amount that indicates the degree of deterioration of the memory in the memory module 20. The amount of accumulated fatigue is based on, for example, the amount of memory fatigue due to a write operation, an erase operation, a read operation, or the like, and the number of times the operation is performed.
[0019] The control unit 10 includes a system decoder 11, a system management unit 12, an access management unit 13, and a buffer 14. The system decoder 11, the system management unit 12, the access management unit 13, and the buffer 14 are connected to each other via an internal bus. The functions of the system decoder 11, the system management unit 12, and the access management unit 13 may be realized by a program executed by a CPU (Central Processing Unit) provided in the control unit 10, or may be configured by individual circuits.
[0020] The system decoder 11 corresponds to a host-managed device memory (HDM) decoder in CXL2.0. For example, the control unit 10 includes an upstream port (USP) or a virtual upstream port (vUSP), not shown. The control unit 10 is connected to the host device 2 via the upstream port (USP) or the virtual upstream port (vUSP). For example, the system decoder 11 is provided within the upstream port or the virtual upstream port.
[0021] For example, when a plurality of host devices 2 are connected to the memory system 3, the memory system 3 includes a plurality of system decoders 11 corresponding to the plurality of host devices 2, respectively. The system decoder 11 sets a connection between the corresponding host device 2 and one or a plurality of memory modules 20 based on the interleave setting information 32 received from the system management unit 12. The system decoder 11 controls the connection between the access management unit 13 and the memory module 20 based on the setting. The system decoder 11 transmits an access request received from the host device 2 to the access management unit 13. The system decoder 11 of this embodiment does not convert the host physical address HPA included in the access request (write request or read request) received from the host device 2. The system decoder 11 transmits the host physical address HPA to the access management unit 13 as it is.
[0022] The system management unit 12 receives management commands from the fabric manager 4. When the fabric manager 4 is configured in the host device 2, the system management unit 12 may be connected to the fabric manager 4 via a host bus, or may be connected to the fabric manager 4 via another bus (compatible with a communication standard such as Ethernet (registered trademark)). The system management unit 12 has a function as a fabric manager endpoint (FM Endpoint) in CXL2.0. The system management unit 12 controls the system decoder 11 based on the management commands received via the fabric manager API and the interleave setting information 32.
[0023] The system management unit 12 controls inter-module wear leveling (hereinafter also simply referred to as "wear leveling"). For example, the system management unit 12 generates interleave setting information 32. Furthermore, the system management unit 12 updates the interleave setting information 32 during wear leveling. That is, the system management unit 12 can dynamically configure the interleave setting. The system management unit 12 transmits the updated interleave setting information 32 to the system decoder 11.
[0024] The system management unit 12 controls data movement in wear leveling. The system management unit 12 executes copy-on-write (CoW) processing as data movement in wear leveling. The copy-on-write processing is an operation that executes data movement (copying) from a source address to a destination address at the timing of a write operation (data update) in the memory module 20. The copy-on-write processing will be described in detail later.
[0025] The system management unit 12 updates the exhaustion counter table 31, the interleave setting information 32, and the copy status table 33 stored in the buffer 14.
[0026] The fatigue counter table 31 is a table relating to the accumulated fatigue amount and storage capacity of each logical device. The system management unit 12 updates the fatigue counter table 31 based on the information on the accumulated fatigue amount received from each memory module 20.
[0027] The interleave setting information 32 is information on the number of logical devices connected to the host device 2 (system decoder 11) (hereinafter also referred to as the "number of interleaves"), the order of data allocation to the target logical devices, and the data size of the memory area in the logical device corresponding to the interleave (hereinafter also referred to as the "interleave granularity"). When the system management unit 12 decides to perform wear leveling based on the fatigue counter table 31, it updates the interleave setting information 32.
[0028] The copy status table 33 is a table related to the copy status of data in copy-on-write processing. The system management unit 12 updates the copy status table 33 when data is copied, that is, when a write operation is executed.
[0029] The access management unit 13 manages the connection with the memory module 20 under the control of the system decoder 11. The access management unit 13 is connected to each memory module 20 via a downstream port (DSP: Downstream Port) or a virtual downstream port (vDSP: Virtual Downstream Port) (not shown) corresponding to each memory module 20. For example, the access management unit 13 transmits an access request to the memory module 20 based on the CXL.mem protocol. For example, when the access request is a write request, the access management unit 13 transmits data, a command, and a host physical address HPA to the target memory module 20. Also, for example, the access management unit 13 transmits interleave setting information 32 to each memory module 20 based on the CXL.io protocol.
[0030] The buffer 14 is a volatile memory. The buffer 14 temporarily stores data. For example, the buffer 14 is a static random access memory (SRAM). The buffer 14 stores a fatigue counter table 31, interleave setting information 32, a copy status table 33, and the like. In order to store data permanently, a non-volatile memory (not shown) may be provided outside or inside the control unit 10, or a non-volatile memory area of any of the memory modules 20 may be used.
[0031] Next, the configuration of the memory module 20 will be described. The memory module 20 corresponds to a CXL memory in CXL2.0. For example, the memory module 20 is a Type3 device in CXL2.0. The memory module 20 is a storage medium (semiconductor storage device). The memory module 20 may be a volatile storage medium or a non-volatile storage medium. The configuration of each memory module 20 may be different. In the following, a case will be described in which the memory modules 20_0 to 20_3 are SSDs (Solid State Drives) equipped with NAND flash memories as non-volatile memories. The NAND flash memories are memories that have a relatively low durability against fatigue (hereinafter, also referred to as "low endurance"). In this case, the control unit 10 can perform inter-module wear leveling on the memory modules 20_0 to 20_3.
[0032] The memory module 20 includes a memory decoder 21, a memory control unit 22, and a memory 23.
[0033] The memory decoder 21 corresponds to a host-managed device memory (HDM) decoder in CXL2.0. The memory decoder 21 converts the host physical address HPA into a device physical address (DPA: Device Physical Address) corresponding to the memory 23 based on the interleave setting information 32 received from the control unit 10. For example, the memory decoder 21 converts the discontinuous host physical addresses HPA distributed by interleaving into continuous device physical addresses.
[0034] The memory control unit 22 controls the entire memory module 20. The memory control unit 22 manages the memory area of the memory 23. The memory control unit 22 executes a write operation, a read operation, or an erase operation based on a signal received from the control unit 10. For example, the memory control unit 22 transmits information regarding the amount of accumulated fatigue to the control unit 40.
[0035] The memory 23 includes, for example, a plurality of NAND flash memories. The memory 23 may include a plurality of memory chips. In this case, each of the plurality of memory chips may operate independently.
[0036] 1.1.3 Logical memory organization of memory modules Next, an example of a logical configuration of the memory 23 of the memory module 20 will be described with reference to Fig. 2. Fig. 2 is a block diagram showing the logical configuration of the memory 23 of the memory module 20.
[0037] As shown in FIG. 2, the memory 23 of each memory module 20 is virtually divided into, for example, two logical devices LD. The number of logical devices LD in each memory 23 is arbitrary. The memory 23 may be one logical device LD. In the following description, when distinguishing between the logical devices LD of the memory modules 20_0 to 20_3, the two logical devices LD of the memory module 20_0 are written as logical devices LD0 and LD1. The two logical devices LD of the memory module 20_1 are written as logical devices LD2 and LD3. The two logical devices LD of the memory module 20_2 are written as logical devices LD4 and LD5. The two logical devices LD of the memory module 20_3 are written as logical devices LD6 and LD7.
[0038] Each logical device LD is divided into a plurality of chunks CK. A chunk CK is a unit of memory area corresponding to interleaving. That is, the data size of a chunk CK is the interleaving granularity. For example, if a memory area to which data is written in a lump in one write operation is defined as a "page", the data size of a chunk CK (interleaving granularity) is larger than the data size of a page. That is, a chunk CK includes a plurality of pages. In the example of FIG. 2, each logical device LD includes eight chunks CK0 to CK7.
[0039] 1.2 Example of exhaustion counter table Next, a specific example of the fatigue counter table 31 will be described with reference to Fig. 3. Fig. 3 is a table showing a specific example of the fatigue counter table 31.
[0040] As shown in FIG. 3, the fatigue counter table 31 includes information on the fatigue accumulation amount and the storage capacity for each logical device LD. For example, the fatigue accumulation amount is a result of adding the product of the fatigue amount by one write operation and the number of write operations and the product of the fatigue amount by one read operation and the number of read operations. For example, the fatigue amount by one operation differs between a write operation and a read operation. In the example of FIG. 3, the fatigue accumulation amount of the logical device LD0 is 1000. The fatigue accumulation amount of the logical device LD1 is 30. The fatigue accumulation amount of the logical device LD2 is 5000. The fatigue accumulation amount of the logical device LD3 is 2500. The storage capacity of each of the logical devices LD0, LD1, LD2, and LD3 is 1 TB. In the example of FIG. 3, the fatigue counter table 31 has information on the fatigue accumulation amount for each logical device LD, but is not limited to this. The fatigue counter table 31 may have information regarding the amount of accumulated fatigue for each memory module 20, may have information regarding the amount of accumulated fatigue for each chunk CK, or may have information regarding the amount of accumulated fatigue for each device physical address, i.e., for each page.
[0041] 1.3 Example of interleave setting information Next, a specific example of the interleave setting information 32 will be described with reference to Fig. 4. Fig. 4 is a table showing a specific example of the interleave setting information 32. The example of Fig. 4 shows interleave setting information 32 corresponding to one system decoder 11 (host device 2). The control unit 10 has different interleave settings for each system decoder 11.
[0042] As shown in Fig. 4, for example, the interleave setting information 32 includes information on the number of interleaves IW (also referred to as the number of interleave ways IW), the interleave granularity IG (i.e., the size of a chunk CK), and the target logical device LD (hereinafter also referred to as "target LD"). Hereinafter, a combination of the number of interleaves IW, the interleave granularity IG, and the target logical device LD is referred to as an interleave set IS. For example, the interleave set IS conforms to the CXL standard. The interleave setting information 32 may include multiple interleave sets IS corresponding to multiple system decoders 11.
[0043] A copy-on-write process is applied to the wear leveling of this embodiment. In the case of the copy-on-write process, the data is stored in the logical device LD corresponding to the interleave set IS before the update until the data movement (copy) is completed. Therefore, until the copy-on-write process is completed, the buffer 14 may store the interleave set IS before the update (before the wear leveling is executed) and the interleave set IS after the update (after the wear leveling is executed). The interleave set IS before the update may be saved in a memory area other than the buffer 14.
[0044] In the example of FIG. 4, the interleave count IW before the update is 1, and the interleave granularity IG is 1KB. The target logical device LD is LD0. In contrast, the interleave count IW after the update is 4, and the interleave granularity is 1KB. The target logical devices LD are LD3→LD4→LD2→LD6. This indicates that the chunks CK of the logical devices LD3, LD4, LD2, and LD6 are repeatedly selected in this order. Note that in the example of FIG. 4, the target logical device LD after the update does not include the logical device LD1 in the same memory module 20_0 as the logical device LD0, but the logical device LD1 may be included.
[0045] 1.4 Example of copy status table Next, a specific example of the copy status table 33 will be described with reference to Fig. 5. Fig. 5 is a table showing a specific example of the copy status table 33.
[0046] 5, the copy status table 33 corresponds to a plurality of interleave sets IS. In the example of Fig. 5, the copy status table 33 corresponds to three interleave sets IS. The number of wear leveling that can be performed simultaneously is based on the number of identification numbers ID of the interleave sets IS in the copy status table 33.
[0047] The copy status table 33 includes information on copy sizes and copy flags corresponding to each of the identification numbers ID0 to ID2 of the interleave set IS. The copy size is a unit of data movement in wear leveling. In other words, the copy size is a management unit of wear leveling. The copy size can be set to an integer multiple of the interleave granularity IG. For example, the copy size may be the same as the size of the chunk CK. For example, the copy size represents a multiple of the interleave granularity IG. In the example of FIG. 5, the copy size of ID0 of the interleave set IS is 1. That is, the copy size indicates 1 time the interleave granularity IG. Also, the copy size of ID1 of the interleave set IS is 16. The copy size of ID4 of the interleave set IS is 4.
[0048] The copy flag is a flag indicating the copy status (whether or not copied) for each management unit of wear leveling. For example, when the copy size is the same as the size of the chunk CK, one bit of information corresponds to one chunk CK. In the example of FIG. 5, "1" indicates that copying has been completed, and "0" indicates that copying has not been completed. When all copy flags become "1", the system management unit 12 determines that the copy-on-write process is completed. In other words, the system management unit 12 determines that wear leveling has ended. The copy flag may be compressed.
[0049] 1.5 Interleave setting update process Next, an example of the interleave setting update process will be described. The interleave setting update process is an operation that is executed when well-leveling is activated.
[0050] 1.5.1 Interleave setting update process flow First, an example of the flow of the interleave setting update process will be described with reference to Fig. 6. Fig. 6 is a flowchart of the interleave setting update process.
[0051] 6, first, when the system management unit 12 decides to activate wear leveling, it selects an interleave set IS (hereinafter, also referred to as "source IS") to be subjected to wear leveling (W / L) (S1101). For example, when the bias in the amount of accumulated fatigue between logical devices LD is equal to or greater than a preset threshold, the system management unit 12 selects the interleave set IS having the largest amount of accumulated fatigue as the source interleave set IS. Alternatively, the system management unit 12 refers to the fatigue counter table 31, and when the amount of accumulated fatigue of a logical device LD corresponding to the interleave set IS is equal to or greater than a preset threshold, it selects the interleave set IS as the source interleave set IS.
[0052] The system management unit 12 determines the number of interleaves IW and the interleave granularity IG of the migration destination (S1102).
[0053] The system management unit 12 selects the target logical device LD that constitutes the interleave set IS of the migration destination (S1103), thereby determining the configuration of the interleave set IS of the migration destination (after update).
[0054] The system management unit 12 saves the interleave set IS of the source (before update) of the interleave setting information 32 (S1104). For example, the system management unit 12 saves the interleave set IS of the source (before update) of the interleave setting information 32 from the interleave setting information 32 to another memory area.
[0055] The system manager 12 initializes the copy status in the copy status table 33 (S1105). More specifically, the system manager 12 sets the copy flags corresponding to the interleave set IS of the migration source in the copy status table 33 to all "0".
[0056] The system management unit 12 updates the interleave setting information 32 to the interleave set IS of the destination (S1106). More specifically, the system management unit 12 updates the interleave setting information 32 to the interleave number IW, interleave granularity IG, and target logical device LD determined in S1102 and S1103. For example, the system management unit 12 transmits the updated interleave setting information 32 to the system decoder 11.
[0057] The system management unit 12 transmits the updated interleave set IS to the logical device LD corresponding to the destination interleave set IS (hereinafter also referred to as the "destination logical device LD"), i.e., the memory module 20, and updates the interleave setting for the logical device LD (S1107).
[0058] 1.5.2 Example of determining the number of interleaves Next, with reference to Fig. 7 and Fig. 8, a specific example of the determination of the interleave number IW described in step S1102 of Fig. 6 will be described. Fig. 7 and Fig. 8 are diagrams showing a specific example of the determination of the interleave number IW.
[0059] 7, for example, the system management unit 12 may double the number of interleaves IW when updating the interleave set IS. For example, if the number of interleaves IW of the source interleave set IS is 1, the number of interleaves IW is updated to 2 by updating the interleave set IS. Also, for example, if the number of interleaves IW of the source interleave set IS is 2, the number of interleaves IW is updated to 4 by updating the interleave set IS. Note that in CXL2.0, the maximum number of interleaves is 8.
[0060] The increment of the number of interleaves IW may be determined according to the amount of accumulated fatigue of the source interleave set IS. For example, the number of interleaves IW may be updated from 1 to 4, as in the interleave setting information 32 described with reference to FIG.
[0061] 8, when there is a bias in the amount of accumulated fatigue of a plurality of logical devices LD corresponding to the source interleave set IS, the system management unit 12 may reduce the number of interleaves IW and move data to a logical device LD with a smaller amount of accumulated fatigue. This may equalize the amount of accumulated fatigue among the logical devices LD. For example, when the number of interleaves IW of the source interleave set IS is 4, the number of interleaves IW may be updated to 1 by updating the interleave set IS.
[0062] 1.5.3 Example of determining interleave granularity Next, with reference to Fig. 9, a specific example of the determination of the interleaving granularity IG described in step S1102 of Fig. 6 will be described. Fig. 9 is a diagram showing a specific example of the determination of the interleaving granularity IG.
[0063] As shown in Fig. 9, for example, the interleaving granularity IG is an integer multiple of the data movement unit in wear leveling executed in the logical device LD (or in the memory module 20). In the example of Fig. 9, the size (granularity) of data movement in wear leveling in the logical device LD is 1 KiB. In contrast, the interleaving granularity IG in inter-module wear leveling is set to 4 KiB, which is four times larger. In this case, the memory module 20 may present to the control unit 10 the granularity of wear leveling in the logical device LD or a preferred granularity as the interleaving granularity IG as designated vendor-specific extended capabilities (DVSEC).
[0064] 1.5.4 Selecting the target logical device (LD) Next, an example of the flow of the selection of the target logical device LD described in step S1103 of Fig. 6 will be described with reference to Fig. 10. Fig. 10 is a flowchart of the selection of the target logical device LD.
[0065] 10, the system management unit 12 checks whether there is an unused logical device LD (S1201). For example, the system management unit 12 checks whether there is an unused logical device LD that is not assigned to any interleave set IS.
[0066] If there is an unused logical device LD (S1201_Yes), the system management unit 12 selects the logical device LD with the least accumulated fatigue amount from among the unused logical devices LD as the target logical device LD (S1202).
[0067] The system management unit 12 checks whether the allocation of unused logical devices LD to the target logical devices LD has been completed (S1203). If the allocation of all target logical devices LD has been completed (S1203_Yes), the system management unit 12 ends the selection of target logical devices LD. On the other hand, if there is a target logical device LD that has not yet been allocated (S1203_No), the system management unit 12 proceeds to step S1201 and checks whether there is an unused logical device LD.
[0068] Furthermore, if there is no unused logical device LD in step S1201 (S1201_No), the system management unit 12 executes allocation error processing (S1204). As the allocation error processing, the system management unit 12 may wait for a certain period of time until an unused logical device LD is created. Alternatively, the system management unit 12 may cause the memory module 20 to execute garbage collection to secure an unused logical device LD. Furthermore, the system management unit 12 may cancel the wear leveling processing. After the allocation error processing, the system management unit 12 proceeds to step S1201 and checks whether there is an unused logical device LD.
[0069] 1.6 Copy-on-write processing Next, the copy-on-write process will be described.
[0070] 1.6.1 Copy-on-write processing flow First, an example of the flow of copy-on-write processing will be described with reference to Fig. 11. Fig. 11 is a flowchart of copy-on-write processing. The example of Fig. 11 shows a case where an access request (write request or read request) of the host device 2 is executed after wear leveling is executed.
[0071] 11, the memory system 3 receives a command (access request) from the host device 2 (S1301). For example, the command corresponds to a write request or a read request.
[0072] The system management unit 12 refers to the copy status table 33 and checks whether the target data has been copied from the logical device LD corresponding to the source interleave set IS (hereinafter also referred to as the "source logical device LD") to the destination logical device LD (S1302). That is, the system management unit 12 checks whether data exists in the target chunk CK of the destination logical device LD.
[0073] If the target data has not been copied (S1302_No), the system management unit 12 identifies the target address of the source interleave set IS where the target data is stored, and reads the data (S1303). That is, the system management unit 12 identifies the address where the data of the source logical device LD is stored, and reads the data.
[0074] The system management unit 12 checks whether the command is a write request command (S1304).
[0075] If the command is a write request command (S1304_Yes), the system management unit 12 updates the read data based on the write data received from the host device 2. The system management unit 12 writes the update data to the destination logical device LD (S1305).
[0076] When the write operation is completed, the system management unit 12 executes a copy completion process (S1306). The copy completion process is an operation for updating the copy status table 33.
[0077] If the command is not a write request (S1304_No), that is, if the command is a read request, the system management unit 12 proceeds directly to S1308.
[0078] Furthermore, in step S1302, if the target data has already been copied from the source logical device LD to the destination logical device LD (S1302_Yes), the system management unit 12 accesses the data at the target address of the destination logical device LD (S1307). For example, if the command is a read request command, the system management unit 12 reads out the data at the target address of the destination logical device LD. For example, if the command is a write request command, the system management unit 12 writes the write data to the destination logical device LD.
[0079] The system management unit 12 transmits a command response notifying the host device 2 that the processing corresponding to the command has been completed. For example, in the case of a read request, the system management unit 12 transmits read data to the host device 2 as the command response.
[0080] 1.6.2 Example of copy-on-write processing Next, a specific example of copy-on-write processing will be described with reference to FIG. 12. FIG. 12 is a configuration diagram of a logical device LD showing a specific example of copy-on-write processing. The example of FIG. 12 shows a case where the logical device LD0 is the source logical device LD, and the logical devices LD2, LD3, LD4, and LD6 are the destination logical devices LD, that is, the target logical devices LD, as shown in the interleave setting information 32 of FIG. 4. For example, the target logical device LD transitions in the order of logical devices LD3, LD4, LD2, and LD6. In the example of FIG. 12, the original data stored in chunks CK0 to CK7 of the source logical device LD0 are represented as OG-0 to OG-7. The copy data (update data) corresponding to the original data OG-0 to OG-7 are represented as CP-0 to CP-7, respectively.
[0081] As shown in FIG. 12, original data OG-0 to OG-7 are stored in eight chunks CK of the logical device LD0. When wear leveling is performed in this state, two chunks CK corresponding to the copy data CP-0 and CP-4 are assigned in the destination logical device LD3 based on the destination interleave set IS. The device physical addresses of the two chunks are determined by the memory decoder 21 of the memory module 20_1. Therefore, the device physical addresses of the chunks CK in which the original data OG-0 and OG-4 of the source logical device LD0 are stored may be different from the device physical addresses of the chunks CK assigned to the copy data CP-0 and CP-4 of the destination logical device LD3. In the example of FIG. 12, the chunk CK corresponding to the copy data CP-0 of the destination logical device LD3 is in a state where copying is not completed. In this case, the copy data CP-0 is not stored in the chunk CK corresponding to the copy data CP-0, and the original data OG-0 remains in the source logical device LD0. Also, the chunk CK corresponding to the copy data CP-4 is in a copied state. In this case, the copy data CP-4 is stored in the chunk CK corresponding to the copy data CP-4.
[0082] In the destination logical device LD4, two chunks CK corresponding to the copy data CP-1 and CP-5 are allocated. The chunks CK corresponding to the copy data CP-1 and the copy data CP-5 are in a copied state. In this case, the copy data CP-1 and CP-5 are stored in the chunks CK corresponding to the copy data CP-1 and CP-5, respectively.
[0083] In the destination logical device LD2, two chunks CK corresponding to the copy data CP-2 and CP-6 are allocated. The chunks CK corresponding to the copy data CP-2 and the copy data CP-6 are in a state where copying is not completed. In this case, the copy data CP-2 and CP-6 are not stored in the chunks CK corresponding to the copy data CP-2 and CP-6, respectively, and the original data OG-2 and OG-6 remain in the source logical device LD0.
[0084] In the destination logical device LD6, two chunks CK corresponding to the copy data CP-3 and CP-7, respectively, are assigned. The chunk CK corresponding to the copy data CP-3 is in an uncopied state. In this case, the copy data CP-3 is not stored in the chunk CK corresponding to the copy data CP-3, and the original data OG-3 remains in the source logical device LD0. In addition, the chunk CK corresponding to the copy data CP-7 is in a copied state. In this case, the copy data CP-7 is stored in the chunk CK corresponding to the copy data CP-7.
[0085] 1.6.3 Example of reading data by specifying the address of the source interleave set Next, a specific example of the case where the address of the source interleave set IS is specified and data is read out as described in step S1302 of Fig. 11 will be described with reference to Fig. 13. Fig. 13 is a diagram showing a specific example of the case where the address of the source interleave set IS is specified and data is read out.
[0086] 13, for example, the system decoder 11 receives an access request including a host physical address HPA from the host device 2. If the target data has not been copied from the source logical device LD0 to the destination logical device LD3, the system decoder 11 refers to the source interleave set IS and transmits the host physical address HPA to the source logical device LD0 (memory module 20_0). The memory decoder 21 of the memory module 20_0 identifies the device physical address from the host physical address HPA. The memory control unit 22 of the memory module 20_0 reads out data that has not been copied (hereinafter also referred to as "uncopied data") from a page corresponding to the device physical address of the logical device LD0, and transmits it to the control unit 10.
[0087] If the request from the host device 2 is a write request, the read data of the source logical device LD0 is updated based on the write data received from the host device 2, and the updated data (and the host physical address HPA) is sent to the destination logical device LD3.
[0088] 1.6.4 Copy completion process flow Next, an example of the flow of the copy completion process described in step S1306 of Fig. 11 will be described with reference to Fig. 14. Fig. 14 is a flowchart of the copy completion process.
[0089] 14, when data of the source logical device LD is copied, the system management unit 12 updates the copy status in the copy status table 33 (S1401). For example, the system management unit 12 updates the copy flag corresponding to the chunk CK for which copying has been executed from "0" (copy not completed) to "1" (copied).
[0090] The system management unit 12 checks whether all data in the source interleave set IS has been copied (S1402) by referring to the copy status table 33. That is, the system management unit 12 checks whether the copy flags corresponding to the source interleave set IS are all "1".
[0091] If all copying has been completed (S1402_Yes), the system management unit 12 deletes the interleave set IS of the migration source (S1403).
[0092] Next, the system management unit 12 deletes the information of the identification number ID corresponding to the interleave set IS of the migration source from the copy status table 33 (S1404).
[0093] Furthermore, in step S1402, if copying of all data is not complete (S1402_No), the system management unit 12 ends the copy completion process as is. In other words, the system management unit 12 does not delete information related to the source interleave set IS.
[0094] 1.6.5 Background copy process Next, an example of the flow of background copy processing will be described with reference to Fig. 15. Fig. 15 is a flowchart of the background copy processing.
[0095] For example, if there is no write request from the host device 2, uncopied data remains and the copy-on-write process is not completed. In other words, wear leveling is not completed. In such a case, background copy processing is executed. The background copy processing is a process of copying the uncopied data of the source logical device LD to the destination logical device LD periodically or when the memory system 3 is in a standby state. For example, in the background copy processing, the uncopied data read from the source logical device LD is copied directly to the destination logical device LD. The background copy processing allows the system management unit 12 to update the copy status.
[0096] 15, the system management unit 12 refers to the copy status table 33 (S1501) and checks whether all copies are complete (S1502). That is, the system management unit 12 checks whether there is any wear leveling (copy-on-write processing) that has not been completed.
[0097] If all copying is not complete (S1502_No), the system management unit 12 identifies the address of the source logical device LD corresponding to the uncopied data, and reads the uncopied data from the source logical device LD (S1503).
[0098] The system management unit 12 writes the read uncopied data to the corresponding chunk CK of the destination interleave set IS (S1504). That is, the system management unit 12 copies the uncopied data to the destination logical device LD.
[0099] The system management unit 12 refers to the copy status table 33 and updates the copy status of the source interleave set IS (S1505).
[0100] The system management unit 12 puts the background copy process to sleep for a certain period of time (S1506). The sleep period can be set arbitrarily. For example, the sleep period may be shortened or extended depending on the frequency of occurrence of wear leveling. After the sleep period ends, the system management unit 12 proceeds to step S1501.
[0101] Furthermore, in step S1502, if all copying has been completed (S1502_Yes), the system management unit 12 deletes the interleave set IS of the migration source (S1507).
[0102] Next, the system management unit 12 deletes the information of the identification number ID corresponding to the interleave set IS of the migration source from the copy status table 33 (S1508).
[0103] 1.7 Effects of this embodiment With the configuration according to this embodiment, the memory system 3 can reduce the amount of management information data at the hardware level between memory modules. This effect will be described in detail.
[0104] For example, when executing wear levels among multiple memory modules, a mapping table is used to manage the addresses of the memory areas of each memory module. As memory increases, the amount of data in the mapping table increases. For example, if there are eight memory modules with a storage capacity of 256 GiB, the amount of data in the corresponding mapping table reaches 2 GiB.
[0105] In contrast, in the configuration according to this embodiment, the control unit 10 can execute wear leveling between modules using the interleave setting information 32 and the copy status table 33. Furthermore, the control unit 10 can transmit the host physical address HPA directly to the memory module 20. This makes it possible to omit the mapping table. As a result, for example, when there are eight memory modules each having a storage capacity of 256 GiB, the data amount of management information including the interleave setting information 32 and the copy status table 33 can be suppressed to a maximum of about several tens of MiB. Therefore, the memory system 3 can reduce the data amount of management information at the wear level between memory modules.
[0106] Furthermore, with the configuration according to this embodiment, copy-on-write processing can be applied to data movement in inter-module wear leveling. In copy-on-write processing, a write operation is executed when data is updated. This makes it possible to suppress an increase in the write amplification factor (WAF) caused by an increase in invalid data. This makes it possible to reduce the cost of data movement.
[0107] Furthermore, with the configuration according to this embodiment, the control unit 10 can dynamically change the setting of the interleave set during inter-module wear leveling according to the fatigue state of the memory module 20. By setting the interleave and changing the target logical device LD, the fatigue load can be distributed among the memory modules.
[0108] 1.8 Modification of the first embodiment Next, three modifications of the first embodiment will be described, focusing on the differences from the first embodiment.
[0109] 1.8.1 First variant First, a first modified example of the first embodiment will be described. In the first modified example, an example of a flow of selection of a target logical device LD different from that of the first embodiment will be described. Fig. 16 is a flowchart of the selection of a target logical device LD.
[0110] As shown in FIG. 16, the system management unit 12 searches for an interleave set IS having a larger interleave number IW than the interleave number IW of the source interleave set IS (S1601).
[0111] If one or more interleave sets IS are found (Yes at step S1602), the system management unit 12 selects, from among the found interleave sets IS, the interleave set IS with the least accumulated fatigue amount of the corresponding logical device LD (S1603).
[0112] The system management unit 12 compares the accumulated fatigue amount of the logical device LD corresponding to the source interleave set IS (hereinafter also referred to as the "source IS accumulated fatigue amount") with the accumulated fatigue amount of the logical device LD corresponding to the selected interleave set IS (hereinafter also referred to as the "selected IS accumulated fatigue amount") (S1604).
[0113] If the difference between the source IS fatigue accumulation amount and the selected IS fatigue accumulation amount is greater than a preset threshold (S1604_Yes), that is, if the selected IS fatigue accumulation amount is sufficiently smaller than the source IS fatigue accumulation amount, the system management unit 12 selects, from among the multiple logical devices LD corresponding to the selected interleave set IS, the same number of logical devices LD as the number of interleaves IW of the destination interleave set IS, in order from the logical device LD with the least amount of fatigue accumulation (S1605).
[0114] If the interleave set IS is not found (step S1602_No), or if the difference between the source IS fatigue accumulation amount and the selected IS fatigue accumulation amount is equal to or less than a preset threshold (S1604_No), the system management unit 12 executes allocation error processing (S1606). As the allocation error processing, the system management unit 12 may wait for a certain period of time before selecting a target logical device LD. Also, the system management unit 12 may cancel the wear leveling processing. After the allocation error processing, the system management unit 12 proceeds to step S1601.
[0115] 1.8.2 Second variant Next, a second modified example of the first embodiment will be described. In the second modified example, an example of selection of a target logical device LD different from the first embodiment and the first modified example of the first embodiment will be described. Fig. 17 is a diagram for explaining the selection of a target logical device LD.
[0116] As shown in FIG. 17, the system management unit 12 may swap the interleave set IS associated with the system decoder 11. More specifically, for example, the control unit 10 includes two system decoders 11_0 and 11_1. Hereinafter, the system decoder 11_0 is referred to as the system decoder #0. The system decoder 11_1 is referred to as the system decoder #1. For example, the interleave set IS#0 is associated with the system decoder #0. The system decoder #0 is connected to the logical device LD0 corresponding to the interleave set IS#0. The interleave set IS#1 is associated with the system decoder #1. The system decoder #1 is connected to the logical devices LD4 and LD5 of the interleave set IS#1. In this state, for example, wear leveling of the interleave set IS#0 is performed, and the interleave set IS#0 is swapped with the interleave set IS#1 having a relatively small amount of accumulated fatigue. That is, the interleave set IS#0 is associated with the system decoder #1. Interleave set IS#1 is associated with system decoder #0. As a result, system decoder #0 is connected to logic devices LD4 and LD5 corresponding to interleave set IS#1. System decoder #1 is connected to logic device LD0 corresponding to interleave set IS#0.
[0117] 1.8.3 Third variant Next, a third modified example of the first embodiment will be described. In the third modified example, an example in which the memory system 3 has a power-loss protection (PLP) function will be described. FIG. 18 is a block diagram showing the overall configuration of the data processing device 1.
[0118] 18, the memory system 3 includes a control unit 10, a plurality of memory modules 20, a power control unit 25, a capacitor 26, and a non-volatile memory 27. The configurations of the control unit 10 and the memory module 20 are similar to those in the first embodiment.
[0119] The power supply control unit 25 controls the power supply in the memory system 3. The power supply control unit 25 supplies power to the control unit 10 and the non-volatile memory 27. When the power supply control unit 25 detects a power outage, it notifies the control unit 10 of the power outage detection and automatically switches to power supply from the capacitor 26.
[0120] The capacitor 26 is a capacitance element that accumulates electric charge in preparation for a power outage. When a power outage occurs, the capacitor 26 supplies power to the power supply control unit 25 under the control of the power supply control unit 25.
[0121] The non-volatile memory 27 is, for example, a NAND type flash memory. The non-volatile memory 27 may be a storage class memory (SCM). The non-volatile memory 27 stores data saved when a power outage occurs. For example, the non-volatile memory 27 stores unwritten data in the buffer 14, various tables, information, etc., under the control of the system management unit 12. The data saved in the non-volatile memory 27 is read out after the power is restored, and the state before the power outage is restored.
[0122] 1.8.4 Effects of the First to Third Modifications The configurations according to the first to third modifications can provide the same effects as those of the first embodiment.
[0123] With the configuration according to the first modification of the first embodiment, even if there is no unused logical device LD, it is possible to select a logical device LD corresponding to an interleave set IS in use as a target logical device LD, thereby reducing the frequency of allocation errors.
[0124] The configuration according to the second modification of the first embodiment allows the interleave sets IS to be swapped between multiple system decoders 11. This allows the bias in the amount of accumulated fatigue to be leveled out by replacing the interleave set IS of a system decoder 11 that is used frequently with an interleave set IS having a relatively small amount of accumulated fatigue.
[0125] With the configuration according to the third modification of the first embodiment, even if a power outage occurs, loss of information related to wear leveling can be suppressed.
[0126] 2. Second embodiment Next, a second embodiment will be described. In the second embodiment, a configuration of a memory system 3 and a wear leveling method that are different from those in the first embodiment will be described. The following description will focus on the differences from the first embodiment.
[0127] 2.1 Memory system configuration First, an example of the configuration of the memory system 3 will be described with reference to Fig. 19. Fig. 19 is a block diagram showing the overall configuration of the data processing device 1.
[0128] As shown in Fig. 19, the memory system 3 includes a control unit 40, a plurality of first memory modules (storage units) 60, and a plurality of second memory modules (storage units) 61. The first memory module 60 and the second memory module 61 correspond to, for example, a CXL memory in CXL2.0. For example, the first memory module 60 and the second memory module 61 are Type3 devices in CXL2.0. In the example of Fig. 19, the memory system 3 includes two first memory modules 60_0 and 60_1 and four second memory modules 61_0 to 61_3.
[0129] The first memory module 60 is a memory module having a high-endurance memory that is relatively durable against wear. For example, the first memory module 60 is excluded from the data transfer source in the inter-module wear leveling. The first memory module 60 can be selected as the data transfer destination in the inter-module wear leveling. In this embodiment, a case where the first memory module 60 is a dynamic random access memory (DRAM) will be described. The first memory module 60 is not limited to a DRAM. Hereinafter, the first memory module 60 will also be referred to as a DRAM module 60. When the first memory modules 60 and 60_1 are limited, they will be referred to as a DRAM#0 module 60_0 and a DRAM#1 module 60_1, respectively. The first memory module 60 may not be provided.
[0130] The second memory module 61 is a memory module having a lower endurance memory than the first memory module 60. The control unit 40 executes inter-module wear leveling for the second memory module 61. In this embodiment, a case where the second memory module 61 is a storage class memory will be described. The second memory module 61 is not limited to a storage class memory. For example, the second memory module 61 may be an SSD equipped with a NAND type flash memory like the memory module 20 of the first embodiment. Hereinafter, the second memory module 61 is also referred to as an SCM module 61. When limiting the second memory modules 61_0, 61_1, 61_2, and 61_3, they are respectively referred to as an SCM#0 module 61_0, an SCM#1 module 61_1, an SCM#2 module 61_2, and an SCM#3 module 61_3.
[0131] The SCM module 61 includes a wear leveling (W / L) history information management unit 62 and a wear counter 63 .
[0132] The wear leveling history information management unit 62 manages history information of wear leveling (hereinafter also referred to as "intra-module wear leveling") executed within the SCM module 61. For example, the wear leveling history information management unit 62 transmits wear leveling history information to the destination / source determination unit 44 of the control unit 40.
[0133] The fatigue counter 63 counts the amount of accumulated fatigue in a memory area (not shown) of the SCM module 61. The fatigue counter 63 transmits the amount of accumulated fatigue to the module information management unit 43 of the control unit 40.
[0134] The control unit 40 corresponds to a CXL switch in CXL2.0. The control unit 40 controls the connection between the host device 2 and the first and second memory modules 60 and 61. The control unit 10 controls the allocation of memory resources of the first and second memory modules 60 and 61. The control unit 10 can virtually divide the memory area of one memory module 20. In the following, for the sake of simplicity, a case will be described in which one SCM module 61 corresponds to one logical device LD.
[0135] The control unit 40 can execute inter-module wear leveling. Note that the inter-module wear leveling in this embodiment can be executed on a page-by-page basis.
[0136] The control unit 40 includes a mapping management unit 41, an inter-module wear leveling (W / L) control unit 42, a module information management unit 43, a destination / source determination unit 44, and a buffer 45. The mapping management unit 41, the inter-module wear leveling control unit 42, the module information management unit 43, the destination / source determination unit 44, and the buffer 45 are connected to each other via an internal bus. The functions of the mapping management unit 41, the inter-module wear leveling control unit 42, the module information management unit 43, and the destination / source determination unit 44 may be realized by a program executed by a CPU (Central Processing Unit) provided in the control unit 40, or may be configured by individual circuits.
[0137] The mapping management unit 41 manages a mapping table 51 that indicates a pair of a host physical address HPA and a corresponding module identifier and logical address. That is, the control unit 40 of this embodiment converts the host physical address HPA into a logical address and transmits it to each module (the DRAM module 60 and the SCM module 61). In each module, the logical address is converted into a device physical address.
[0138] The inter-module wear leveling control unit 42 detects unevenness in the accumulated amount of wear between the SCM modules 61, and executes wear leveling and a corresponding mapping update process.
[0139] The module information management unit 43 manages module management information 52 relating to the accumulated fatigue amount, storage capacity, wear leveling period, and wear leveling granularity of each SCM module 61.
[0140] The destination / source determination unit 44 determines source and destination pages for wear leveling based on the module management information 52 and wear leveling history information of each SCM module 61 .
[0141] The buffer 45 is a volatile memory. For example, the buffer 45 is an SRAM. The buffer 45 temporarily stores data. The buffer 14 stores a mapping table 51 and module management information 52. The buffer 45 can also store wear leveling history information received from each SCM module 61.
[0142] 2.2 Example of a mapping table Next, a specific example of the mapping table 51 will be described with reference to Fig. 20. Fig. 20 is a table showing a specific example of the mapping table 51.
[0143] 20, an index, a module identifier, and a logical address are stored in each entry of the mapping table 51. The index corresponds to the host physical address HPA. For example, when the host physical address HPA is 0x3e5268cd, the index is set to 0x3e5268. The module identifier is an identifier that identifies either the DRAM module 60 or the SCM module 61. For example, when the module identifier 22 corresponds to the SCM#2 module 61_2, the logical address 0x1234 associated with the index 0x3e5268 is transmitted to the SCM#2 module 61_2.
[0144] 2.3 Example of module management information Next, a specific example of the module management information 52 will be described with reference to Fig. 21. Fig. 21 is a table showing a specific example of the module management information 52.
[0145] As shown in FIG. 21, the module management information 52 includes information on the accumulated fatigue amount, storage capacity, wear leveling cycle (W / L cycle), and wear leveling granularity (W / L granularity) for each SCM module 61. The wear leveling cycle is the cycle of intra-module wear leveling. The wear leveling granularity is the copy data size in intra-module wear leveling. In the example of FIG. 21, the accumulated fatigue amount of the SCM#0 module 61_0 is 1000. The storage capacity is 1TB. The wear leveling cycle is 1000. And the wear leveling granularity is 1KB. And the accumulated fatigue amount of the SCM#1 module 61_1 is 30. The storage capacity is 1TB. The wear leveling cycle is 300. And the wear leveling granularity is 4KB. The accumulated fatigue amount of the SCM#2 module 61_2 is 5000. The storage capacity is 1TB. The wear leveling period is 2000. And the wear leveling granularity is 128B. The fatigue accumulation amount of the SCM#3 module 61_3 is 2500. The storage capacity is 1TB. The wear leveling period is 5000. And the wear leveling granularity is 128B. Note that, in the example of FIG. 21, a case has been described in which the module management information 52 has information on the fatigue accumulation amount for each SCM module 61, but this is not limiting. The module management information 52 may have information on the fatigue accumulation amount for each page.
[0146] 2.4 Example of Wear Leveling History Information Next, a specific example of the wear leveling history information will be described with reference to Fig. 22. Fig. 22 is a table showing a specific example of the wear leveling history information. The example of Fig. 22 shows the wear leveling history information of one SCM module 61.
[0147] As shown in FIG. 22, the wear leveling history information has entries generated corresponding to intra-module wear leveling executed by the SCM module 61. For example, the number of entries in the wear leveling history information is the same as the number of times intra-module wear leveling has been executed by the SCM module 61. In each entry, the logical address of the page on which intra-module wear leveling has been executed is recorded. That is, the wear leveling history information is a list of logical addresses on which wear leveling has been executed. The wear leveling history information management unit 62 of each module stores logical addresses as wear leveling history information, which makes it easier to share address information with the module information management unit 43 of the control unit 40. In the example of FIG. 22, N entries (N is an integer equal to or greater than 0) 0 to (N-1) are generated. For example, the logical address of entry 0 is 0x100. The logical address of entry 1 is 0x002. The logical address of entry N-1 is 0x356.
[0148] The wear leveling history information may store a time stamp related to the time when wear leveling was performed. In this case, the source page of the inter-module wear leveling may be selected taking into consideration the temporal locality of the time when the intra-module wear leveling was performed. In other words, a page of the SCM module 61 on which wear leveling was repeated in a relatively short period of time may be selected as the source page.
[0149] 2.5 Data movement flow in wear leveling Next, an example of the flow of data movement in wear leveling will be described with reference to Fig. 23. Fig. 23 is a flowchart showing data movement in wear leveling.
[0150] As shown in FIG. 23, the destination / source decision unit 44 acquires information on the accumulated fatigue amount of each SCM module 61 from the module information management unit 43 (S2101).
[0151] The destination / source decision unit 44 checks whether there is a bias in the amount of accumulated fatigue among the modules (S2102). That is, the destination / source decision unit 44 checks whether the variation in the amount of accumulated fatigue among the SCM modules 61 is equal to or greater than a preset threshold value.
[0152] If there is no bias in the amount of accumulated fatigue (S2102_No), the destination / source decision unit 44 proceeds to step S2101. On the other hand, if there is a bias in the amount of accumulated fatigue (S2102_Yes), the destination / source decision unit 44 acquires wear leveling history information from each SCM module 61 (S2103). That is, when the destination / source decision unit 44 detects a bias in the amount of accumulated fatigue, it acquires wear leveling history information from each SCM module 61.
[0153] Next, the destination / source determination unit 44 acquires information on the wear leveling cycle and wear leveling granularity of each SCM module 61 from the module information management unit 43 (S2104). The module information management unit 43 transmits information on the wear leveling cycle and wear leveling granularity of the module management information 52 to the destination / source determination unit 44.
[0154] The destination / source determination unit 44 determines the source page based on the wear leveling history information and the module management information 52 (S2105). For example, the destination / source determination unit 44 selects the SCM module 61 with the largest amount of accumulated fatigue as the source SCM module 61. Then, the destination / source determination unit 44 refers to the wear leveling history information and selects a page corresponding to a logical address that has been executed many times for wear leveling as the source page.
[0155] Next, the destination / source determination unit 44 determines a destination page based on the wear leveling history information and the module management information 52 (S2106). For example, the destination / source determination unit 44 selects a page of the SCM module 61 having a relatively small amount of accumulated fatigue as the destination page.
[0156] The destination / source determination unit 44 determines the granularity of data movement for inter-module wear leveling (S2107) based on the module management information 52. For example, the destination / source determination unit 44 determines the least common multiple of the wear leveling granularity of each of the source SCM module 61 and the destination SCM module 61 and the mapping management granularity in the mapping table 51 of the control unit 40 as the granularity of data movement.
[0157] The inter-module wear leveling control unit 42 swaps the data of the source page with the data of the destination page (S2108). The inter-module wear leveling control unit 42 executes data swapping in accordance with the granularity of data movement. If no data is stored in the destination page, the inter-module wear leveling control unit 42 copies the data of the source page to the destination page.
[0158] The mapping management unit changes the mapping table in response to the data replacement (S2109).
[0159] 2.6 Flow of determining source page Next, an example of the flow of determining the source page described in step S2105 of Fig. 23 will be described with reference to Fig. 24. Fig. 24 is a flowchart of determining the source page.
[0160] 24, the destination / source decision unit 44 compares the accumulated fatigue amount of each SCM module 61 to decide the source SCM module 61 (S2201). The destination / source decision unit 44 selects the SCM module 61 with the largest accumulated fatigue amount as the source SCM module 61.
[0161] The destination / source determination unit 44 refers to the wear leveling history information of the source SCM module 61, and extracts the logical addresses and wear leveling counts of pages that frequently appear in the wear leveling history information (S2202). For example, the wear leveling count is the number of times the same logical address appears in the wear leveling history information.
[0162] The destination / source determination unit 44 calculates the write amount of the extracted logical address (S2203). For example, the destination / source determination unit 44 calculates the product of the number of wear leveling times and the wear leveling cycle as the write amount. Note that, in this embodiment, a case where the write amount is calculated will be described, but is not limited to this. For example, the amount of fatigue accumulation based on the read operation or erase process for each logical address may be calculated, and the source page and the destination page may be selected based on this.
[0163] If the write amount is greater than a preset first threshold (S2204_Yes), the destination / source determination unit 44 selects a page corresponding to the extracted logical address as the source page (S2205). In other words, the destination / source determination unit 44 selects a page with a write amount greater than the first threshold as the source page.
[0164] If the write amount is equal to or less than a preset first threshold (S2204_No), the destination / source determination unit 44 selects a page corresponding to a logical address other than the logical address described in the wear leveling history information as the source page (S2206). Note that the destination / source determination unit 44 may select a page corresponding to a logical address included in the wear leveling history information as the source page.
[0165] 2.7 Flow of determining destination page Next, an example of the flow of determining the destination page described in step S2106 of Fig. 23 will be described with reference to Fig. 25. Fig. 25 is a flowchart of determining the destination page.
[0166] 25, the destination / source determination unit 44 refers to the wear leveling history information of the source SCM module 61, and extracts the logical address and the number of wear leveling of a page that frequently appears in the wear leveling history information (S2301). Note that the operation in step S2301 is similar to that in step S2202 described using FIG. 24. For this reason, for example, if step S2202 in FIG. 24 is executed first and the extraction results of the logical address and the number of wear leveling have already been stored in the buffer 45 or the like, the destination / source determination unit 44 may refer to the extraction results in step S2301 and omit the operation of referring to the source SCM module 61.
[0167] The destination / source determination unit 44 calculates the write amount of the extracted logical address (S2302). For example, the destination / source determination unit 44 calculates the product of the number of wear leveling times the wear leveling cycle as the write amount. Note that the operation in step S2302 is similar to that in step S2203 described with reference to FIG. 24. For this reason, for example, if step S2203 in FIG. 24 is executed first and the calculation result of the write amount has already been stored in the buffer 45 or the like, the destination / source determination unit 44 may omit the calculation process of the write amount by referring to the calculation result in step S2302.
[0168] If the amount of writing is greater than a preset second threshold (S2303_Yes), the destination / source determining unit 44 selects the DRAM module 60 as the destination (S2204). The second threshold is a threshold greater than the first threshold. For example, if the amount of writing is greater than the second threshold, the destination / source determining unit 44 determines that access is concentrated and the increase in the amount of accumulated fatigue is significant, and selects the high endurance DRAM module 60 (first memory module 60) as the destination.
[0169] The destination / source determination unit 44 determines the destination page based on an eviction algorithm for evicting data (S2305). For example, the eviction algorithm may be the LRU (Least Recently Used) method or the LFU (Least Frequently Used) method. The LRU method is a method for evicting data from a page that has not been referenced for the longest time. The LFU method is a method for evicting data from a page that is used least frequently. Note that other methods may be used as the eviction algorithm.
[0170] On the other hand, if the amount of writing is equal to or less than the preset second threshold (S2303_No), the destination / source decision unit 44 selects the SCM module 61 with the least accumulated fatigue amount as the destination (S2306).
[0171] The destination / source determination unit 44 randomly selects a destination page from among logical addresses not described in the wear leveling history information of the selected SCM module 61 (S2307). Note that the selection of the destination page does not have to be random. The selection order may be determined in advance.
[0172] 2.8 Effects of this embodiment With the configuration according to this embodiment, the memory system 3 can reduce the amount of management information data at the hardware level between memory modules. This effect will be described in detail.
[0173] For example, when performing wear leveling among multiple memory modules, detecting hot pages with relatively high access volume, i.e., determining the source page for wear leveling, requires a huge memory resource. For example, in the case of an SCM module with a storage capacity of 4096 GB, the amount of data in the access counter table, which counts the number of accesses for each logical address, reaches 32 GB. As the storage capacity of the memory module increases, the amount of data in the access counter table also increases.
[0174] In contrast, with the configuration according to this embodiment, the control unit 40 can execute inter-module wear leveling using the history information of intra-module wear leveling executed for each memory module and the module management information 52. Therefore, the access counter table can be omitted. By using the wear leveling history information of each memory module 61, the amount of memory resources required to determine the migration source page for wear leveling can be reduced. Therefore, the memory system 3 can reduce the amount of data of management information at the wear level between memory modules.
[0175] 2.9 Modification of the second embodiment Next, five modifications of the second embodiment will be described, focusing on the differences from the second embodiment.
[0176] 2.9.1 First variant First, a first modified example of the second embodiment will be described. In the first modified example, a case where the wear leveling history information includes a time stamp will be described. Fig. 26 is a table showing a specific example of the wear leveling history information. Below, differences from Fig. 22 of the second embodiment will be described.
[0177] As shown in Fig. 26, in each entry of the wear leveling history information, the logical address and timestamp of the page on which intra-module wear leveling was performed are recorded. In the example of Fig. 26, N entries (N is an integer equal to or greater than 0) 0 to (N-1) are generated. For example, the timestamp of entry 0 is 0. The timestamp of entry 1 is 100. The timestamp of entry N-1 is 5020. The timestamps of entry 1 and entry N-1 indicate the elapsed time from when wear leveling of entry 0 was performed to when wear leveling corresponding to the entry was performed.
[0178] When the wear leveling history information includes time stamp information, the source page can be selected taking the time stamp into consideration in the flow of source page determination described with reference to Fig. 24 in the second embodiment. For example, in step S2202 in Fig. 24, the destination / source determination unit 44 can count the number of wear levelings of a logical address appearing in the wear leveling history information while taking into consideration temporal locality, such as not counting if the time interval between wear levelings for the same logical address is equal to or greater than a preset threshold value.
[0179] 2.9.2 Second variant Next, a second modified example of the second embodiment will be described. In the second modified example, a case will be described in which hot pages are identified within the SCM module 61 and a logical address list of the hot pages is transmitted to the control unit 40.
[0180] 2.9.2.1 Specific example of a logical address list First, a specific example of a logical address list will be described with reference to Fig. 27. Fig. 27 is a table showing a specific example of a logical address list.
[0181] The wear leveling history information management unit 62 of each SCM module in this embodiment generates a logical address list based on wear leveling history information. The logical address list is a list that counts the number of wear levelings for each logical address where intra-module wear leveling has been performed. The wear leveling history information management unit 62 can refer to the logical address list and determine pages that have been subjected to wear leveling many times as hot pages where write operations and read operations have been performed frequently (i.e., the amount of writing is large). In other words, the logical address list is a list of hot pages.
[0182] As shown in Fig. 27, each entry in the logical address list records the logical address of a page on which intra-module wear leveling has been performed and the number of times wear leveling has been performed for that logical address. In the example of Fig. 27, N entries (N is an integer equal to or greater than 0) 0 to (N-1) have been generated. For example, the number of times wear leveling has been performed at logical address 0x100 in entry 0 is 10. The number of times wear leveling has been performed at logical address 0x002 in entry 1 is 1. The number of times wear leveling has been performed at logical address 0x356 in entry N-1 is 4.
[0183] 2.9.2.2 Data movement flow in wear leveling Next, an example of the flow of data movement in wear leveling will be described with reference to Fig. 28. Fig. 28 is a flowchart showing data movement in wear leveling. Below, differences from Fig. 23 of the second embodiment will be described.
[0184] As shown in FIG. 28, steps S2101 and S2102 are similar to those in FIG.
[0185] If there is a bias in the accumulated fatigue amount (S2102_Yes), the destination / source decision unit 44 acquires a logical address list of hot pages from each SCM module 61 (S2120).
[0186] Step S2104 is the same as in FIG.
[0187] The destination / source determination unit 44 determines the source page based on the logical address list and the module management information 52 (S2121). For example, the destination / source determination unit 44 selects the SCM module 61 with the greatest amount of accumulated fatigue as the source SCM module 61 based on the module management information 52. Then, the destination / source determination unit 44 references the logical address list of the selected SCM module 61 and selects, as the source page, a page corresponding to a logical address that has been subjected to wear leveling many times.
[0188] Next, the destination / source determination unit 44 determines a destination page (S2122) based on the logical address list and the module management information 52. For example, the destination / source determination unit 44 selects a page of the SCM module 61 having a relatively small amount of accumulated fatigue and having undergone wear leveling relatively infrequently as the destination page.
[0189] 2.9.2.3 Flow of determining the source page Next, an example of the flow of determining a source page will be described with reference to Fig. 29. Fig. 29 is a flowchart of determining a source page. Below, the following description will focus on the differences from Fig. 24 of the second embodiment.
[0190] As shown in FIG. 29, step S2201 is similar to that in FIG.
[0191] After determining the source SCM module, the destination / source determination unit 44 refers to the logical address list of the source SCM module 61, and extracts the logical addresses and wear leveling counts of pages that frequently appear in the wear leveling history information (S2202).
[0192] The destination / source determination unit 44 calculates the write amount of the extracted logical address in the same manner as in FIG. 24 (S2203).
[0193] If the write amount is greater than the preset first threshold (S2204_Yes), similarly to FIG. 24, the destination / source determination unit 44 selects the page corresponding to the extracted logical address as the source page (S2205).
[0194] If the write amount is equal to or less than a preset first threshold (S2204_No), the destination / source determination unit 44 selects a page corresponding to a logical address other than the logical addresses listed in the logical address list as the source page (S2206). Note that the destination / source determination unit 44 may select a page corresponding to a logical address included in the logical address list as the source page.
[0195] 2.9.2.4 Flow of determining destination page Next, an example of the flow of determining a destination page will be described with reference to Fig. 30. Fig. 30 is a flowchart of determining a destination page. Below, the following description will focus on the differences from Fig. 25 of the second embodiment.
[0196] As shown in FIG. 30, the destination / source determination unit 44 refers to the logical address list of the source SCM module 61, and extracts logical addresses and wear leveling counts from the top of the logical address list (entry 0) in order (S2320).
[0197] The destination / source determination unit 44 calculates the write amount of the extracted logical address (S2302) in the same manner as in Fig. 25. For example, the destination / source determination unit 44 calculates the product of the number of wear leveling times the wear leveling cycle as the write amount.
[0198] If the written amount is greater than the preset second threshold (S2303_Yes), the destination / source decision unit 44 executes steps S2304 and S2305 in the same manner as in FIG.
[0199] If the amount of writing is equal to or less than the preset second threshold (S2303_No), the destination / source decision unit 44 selects the SCM module 61 with the least accumulated fatigue amount as the destination, similarly to FIG. 25 (S2306).
[0200] The destination / source determination unit 44 randomly selects a destination page from among logical addresses not listed in the logical address list of the selected SCM module 61 (S2321). Note that the selection of the destination page does not have to be random. The selection order may be determined in advance.
[0201] 2.9.3 Third variant Next, a third modified example of the second embodiment will be described. In the third modified example, a case where a high-load SCM module 61 is not selected as a migration destination will be described. Fig. 31 is a flowchart for determining a migration destination page. The following mainly describes the points that are different from Fig. 25 of the second embodiment.
[0202] As shown in FIG. 31, steps S2301 to S2106 are similar to those in FIG.
[0203] After step S2106, the destination / source decision unit 44 checks (S2330) the load status of the selected SCM module 61. For example, the destination / source decision unit 44 grasps the load status of the SCM module 61 by monitoring the bandwidth used by each SCM module 61, or by acquiring load information (DevLoad) included in the response returned from the SCM module 61 in response to the most recent read request.
[0204] If the load of the SCM module 61 is smaller than a preset third threshold (S2330_Yes), the destination / source determination unit 44 randomly selects a destination page from among pages corresponding to logical addresses not listed in the wear leveling history information of the selected SCM module 61 (S2307), as in Fig. 25. Note that the selection of the destination page does not have to be random. The selection order may be determined in advance.
[0205] Furthermore, if the load on the SCM module 61 is equal to or greater than a preset third threshold (S2330_No), the destination / source decision unit 44 selects another SCM module 61 as the destination (S2331). In other words, the destination / source decision unit 44 does not select an SCM module 61 with a high load as the destination.
[0206] 2.9.4 Fourth variant Next, a fourth modified example of the second embodiment will be described. In the fourth modified example, a case will be described where a DRAM module 60 with a high hit rate is not selected as a migration destination. A DRAM module 60 with a high hit rate contributes to suppressing an increase in the amount of accumulated fatigue in the SCM module 61. FIG. 32 is a flowchart for determining a migration destination page. The following will mainly describe the points that are different from FIG. 25 of the second embodiment.
[0207] As shown in FIG. 32, steps S2301 to S2103 are similar to those in FIG.
[0208] If the write amount is greater than the preset second threshold (S2303_Yes), the destination / source determination unit 44 checks (S2340) the hit rate (access rate) of each DRAM module 60. For example, the destination / source determination unit 44 calculates the hit rate (access rate) from the ratio of the number of accesses to the target DRAM module 60 to the total number of accesses to all the DRAM modules 60 and the SCM module 61.
[0209] If the hit rate of the DRAM module 60 is smaller than a preset fourth threshold value (S2340_Yes), the destination / source decision unit 44 selects the DRAM module 60 as the destination (S2204), similarly to FIG.
[0210] The destination / source determination unit 44 determines the destination page based on the expulsion algorithm for expelling data, similarly to FIG. 25 (S2305).
[0211] Furthermore, if the write amount is equal to or less than a preset second threshold (S2303_No) or if the hit rate of the DRAM module 60 is equal to or greater than a fourth threshold (S2340_No), the destination / source decision unit 44 selects the SCM module 61 with the least accumulated fatigue as the destination, as in FIG. 25 (S2306).
[0212] As in FIG. 25, the destination / source determination unit 44 randomly selects a destination page from among pages corresponding to logical addresses not written in the wear leveling history information of the selected SCM module 61 (S2307).
[0213] 2.9.5 Fifth Variant Next, a fifth modified example of the second embodiment will be described. In the fifth modified example, an example of the configuration of the data processing device 1 different from that of the second embodiment will be described. FIG 33 is a block diagram showing the overall configuration of the data processing device 1.
[0214] 33, the host device 2 may be provided with a mapping management unit 41, an inter-module wear leveling control unit 42, a module information management unit 43, and a migration destination / source determination unit 44. The other configuration is similar to that of FIG.
[0215] 2.9.6 Effects of the First to Fifth Modifications The configurations according to the first to fifth modifications can provide the same effects as those of the second embodiment.
[0216] In the configuration according to the first modification of the second embodiment, the wear leveling history information can include time stamp information. Therefore, when determining the source page, the source page can be selected taking the time stamp into consideration.
[0217] In the configuration according to the second modification of the second embodiment, the wear leveling history information management unit 62 of each SCM module 61 can generate a logical address list. The control unit 40 can select a source page based on the logical address list.
[0218] With the configuration according to the third modification of the second embodiment, the SCM module 61 with a high load can be removed from the destination. This allows the load to be distributed between the SCM modules 61.
[0219] With the configuration according to the fourth modification of the second embodiment, it is possible to remove the DRAM module 60 with a high hit rate from the destination. This allows the DRAM module 60 with a high hit rate that contributes to suppressing the increase in the amount of accumulated fatigue in the SCM module 61 to be left as is, and another DRAM module 60 with a low hit rate that does not contribute much to suppressing the increase in the amount of accumulated fatigue in the SCM module 61 to be selected.
[0220] In the configuration according to the fifth modification of the second embodiment, the host device 2 can have the functions of the mapping management unit 41, the inter-module wear leveling control unit 42, the module information management unit 43, and the migration destination / source determination unit 44. This makes it possible to reduce the circuit scale of the control unit 40.
[0221] 3. Third embodiment Next, a third embodiment will be described. In the third embodiment, a configuration of a memory system 3 and a wear leveling method that are different from those of the first and second embodiments will be described. The following description will focus on the differences from the first and second embodiments.
[0222] 3.1 Memory system configuration First, an example of the configuration of the memory system 3 will be described with reference to Fig. 34. Fig. 34 is a block diagram showing the overall configuration of the data processing device 1.
[0223] As shown in Fig. 34, the memory system 3 includes a control unit 70 and a plurality of memory modules (storage units) 90. For example, the memory module 90 is a Type 3 device in CXL2.0. In the example of Fig. 34, the memory system 3 includes four memory modules 90_0 to 90_3. In the following description, the memory module is also simply referred to as a "module."
[0224] The control unit 70 corresponds to a CXL switch in CXL2.0. The control unit 70 controls the connection between the host device 2 and the memory module 90. The control unit 70 controls the allocation of memory resources of the memory module 90 to the host device 2.
[0225] The control unit 70 can virtually divide the memory area of one memory module 90. The control unit 70 manages each divided memory area as one "logical device". The control unit 70 has an interleave function. The control unit 70 can execute wear leveling between modules.
[0226] The control unit 70 includes a system decoder 71, a mapping management unit 72, an inter-module wear leveling control unit 73, and a buffer 74. The system decoder 71, the mapping management unit 72, the inter-module wear leveling control unit 73, and the buffer 74 are connected to each other via an internal bus. The functions of the system decoder 71, the mapping management unit 72, and the inter-module wear leveling control unit 73 may be realized by a program executed by a CPU (Central Processing Unit) provided in the control unit 70, or may be configured by individual circuits.
[0227] The system decoder 71 corresponds to a host-managed device memory (HDM) decoder in CXL2.0. The system decoder 71 of this embodiment does not convert the host physical address HPA to a logical address, as in the first embodiment. That is, the control unit 70 transmits the host physical address HPA to the memory module 90 as is.
[0228] The mapping management unit 72 includes a data movement processing unit 75 , a copy status management unit 76 , and an interleave setting management unit 77 .
[0229] The data movement processing unit 75 processes data movement in wear leveling. In this embodiment, copy-on-write processing is applied to data movement in wear leveling.
[0230] The copy status management unit 76 manages a copy status table 81. The copy status table 81 is a table relating to the copy status of data in copy-on-write processing, similar to the copy status table 33 in the first embodiment. The copy status management unit 76 updates the copy status table 81 when data is copied (a write operation is executed).
[0231] The interleave setting management unit 77 manages the interleave setting information 82. The interleave setting information 82 includes information on the number of interleaves IW, the order of data allocation to the target logical device, and the interleave granularity IG, similar to the interleave setting information 32 of the first embodiment. The interleave setting management unit 77 updates the interleave setting information 82 during wear leveling.
[0232] The inter-module wear leveling control unit 73 controls the inter-module wear leveling. The inter-module wear leveling control unit 73 includes a module information management unit 78 and a migration destination / source determination unit 79.
[0233] The module information management unit 78 is similar to the module information management unit 43 of the second embodiment. The module information management unit 78 manages module management information 83 related to the amount of accumulated fatigue, storage capacity, wear leveling period, and wear leveling granularity of each memory module 90 (logical device LD).
[0234] The destination / source determination unit 79 is similar to the destination / source determination unit 44 of the second embodiment. The destination / source determination unit 79 determines a source page and a destination page for wear leveling based on the module management information 83 and wear leveling history information of each memory module 90.
[0235] The buffer 74 is a volatile memory. For example, the buffer 74 is an SRAM. The buffer 74 stores a copy status table 81, interleave setting information 82, and module management information 83. The buffer 74 can also store wear leveling history information received from each memory module 90.
[0236] Next, the configuration of the memory module 90 will be described. The memory module 90 corresponds to a CXL memory in CXL2.0. For example, the memory module 90 is a Type3 device in CXL2.0. The memory module 90 is a storage medium (semiconductor storage device). The memory module 90 may be a volatile storage medium or a non-volatile storage medium. The configuration of each memory module 90 may be different. In the following, a case where the memory modules 90_0 to 90_3 are low Endurance will be described. The memory module 90 corresponds to the memory module 20 of the first embodiment or the second memory module 61 of the second embodiment. The control unit 70 can execute inter-module wear leveling for the memory modules 90_0 to 90_3.
[0237] The memory module 90 includes a wear leveling controller 91 and a memory 92 .
[0238] The wear leveling control unit 91 controls wear leveling within a module. The wear leveling control unit 91 includes a wear leveling history information management unit 93.
[0239] The wear leveling history information management unit 93 is similar to the wear leveling history information management unit 62 of the second embodiment. The wear leveling history information management unit 93 manages history information of intra-module wear leveling executed in the memory module 90. For example, the wear leveling history information management unit 93 transmits wear leveling history information to the destination / source determination unit 79 of the control unit 70. Note that in this embodiment, since the memory module 90 receives the host physical address HPA from the control unit 70, the wear leveling history information includes information on the host physical address HPA instead of the logical address described in FIG. 22 of the second embodiment.
[0240] The memory 92 includes, for example, a plurality of NAND type flash memories.
[0241] 3.2 Data movement flow in wear leveling Next, an example of the flow of data movement in wear leveling will be described with reference to Fig. 35. Fig. 35 is a flowchart showing data movement in wear leveling.
[0242] 35, the destination / source determination unit 79 acquires information on the amount of accumulated fatigue of each memory module 90 from the module information management unit 78 (S3101). The module information management unit 78 transmits information on the amount of accumulated fatigue of the module management information 83 to the destination / source determination unit 79.
[0243] The destination / source determination unit 79 checks whether there is a bias in the amount of accumulated fatigue between the modules (S3102). That is, the destination / source determination unit 79 checks whether the variation in the amount of accumulated fatigue between the memory modules 90 is equal to or greater than a preset threshold. Note that, when the memory module 90 is virtually divided into a plurality of logical devices LD, the destination / source determination unit 79 may check whether there is a bias in the amount of accumulated fatigue between the logical devices LD.
[0244] If there is no bias in the accumulated fatigue amount (S3102_No), the destination / source determining unit 79 proceeds to step S3101. If there is a bias in the accumulated fatigue amount (S3102_Yes), the destination / source determining unit 79 acquires wear leveling history information from each memory module 90 (S3103).
[0245] Next, the destination / source determination unit 79 acquires information on the wear leveling cycle and wear leveling granularity of each memory module 90 from the module information management unit 78 (S3104). The module information management unit 78 transmits information on the wear leveling cycle and wear leveling granularity of the module management information 83 to the destination / source determination unit 79.
[0246] The destination / source determination unit 79 determines the source interleave set IS based on the wear leveling history information, the module management information 83, and the interleave setting information 82 (S3105). For example, the destination / source determination unit 79 selects the interleave set IS corresponding to the logical device LD of the memory module 90 having a relatively large amount of accumulated fatigue as the source interleave set IS.
[0247] The destination / source determining unit 79 determines the interleave number IW and interleave granularity IG of the destination (S3106). The method of determining the interleave number IW and interleave granularity IG is the same as in the first embodiment.
[0248] The destination / source decision unit 79 selects a target logical device LD constituting the interleave set IS of the destination (S3107) based on the module management information (accumulated fatigue amount) 84. For example, the flow of selecting the target logical device LD is the same as that of the first embodiment.
[0249] The destination / source determination unit 79 saves (S3108) the interleave set IS of the source (before update) of the interleave setting information 82. For example, the destination / source determination unit 79 saves the interleave set IS of the source (before update) of the interleave setting information 82 to another memory area.
[0250] The destination / source determination unit 79 initializes the copy status of the copy status table 81 (S3109). More specifically, the destination / source determination unit 79 sets the copy flag corresponding to the source interleave set IS to an all "0" state.
[0251] The destination / source determination unit 79 updates the interleave setting information 82 to the destination interleave set IS (S3110). More specifically, the destination / source determination unit 79 updates the interleave setting information 82 to the interleave number IW, interleave granularity IG, and target logical device LD determined in S3106 and S3107. For example, the destination / source determination unit 79 transmits the updated interleave setting information 82 to the system decoder 71.
[0252] The destination / source determination unit 79 transmits the updated interleave set IS to the logical device LD corresponding to the interleave set IS of the destination, and updates the interleave setting for the logical device LD (S1111).
[0253] 3.3 Example of source interleave set selection Next, a specific example of the selection of the source interleave set IS explained in step S3105 of FIG. 35 will be explained.
[0254] 3.3.1 First concrete example First, a first specific example will be described with reference to Fig. 36. Fig. 36 is a diagram illustrating a first specific example of selection of a source interleave set IS.
[0255] As shown in Fig. 36, the destination / source determination unit 79 detects a hot page by referring to wear leveling history information. Then, the destination / source determination unit 79 selects the interleave set IS in which the hot page exists as the source. In the example of Fig. 36, the logical device LD corresponding to the interleave set IS#0 includes the hot page. Therefore, the destination / source determination unit 79 selects the interleave set IS#0 as the source.
[0256] 3.3.2 Second concrete example Next, a second specific example will be described with reference to Fig. 37. Fig. 37 is a diagram illustrating a second specific example of selection of a source interleave set IS.
[0257] As shown in FIG. 37, for example, when there are multiple hot pages, the destination / source determination unit 79 selects the interleave set IS with the largest number of hot pages as the source. In the example of FIG. 37, two logical device LDs corresponding to the interleave set IS#0 each include two hot pages. That is, the number of hot pages for the interleave set IS#0 is four. Two logical device LDs corresponding to the interleave set IS#1 each include one hot page. That is, the number of hot pages for the interleave set IS#1 is two. One logical device LD corresponding to the interleave set IS#2 includes three hot pages. That is, the number of hot pages for the interleave set IS#2 is three. Therefore, the destination / source determination unit 79 selects the interleave set IS#0 with the largest number of hot pages as the source.
[0258] The destination interleave set IS may be selected taking into consideration the amount of writing to each hot page.
[0259] 3.3.3 Third concrete example Next, a third specific example will be described with reference to Fig. 38. Fig. 38 is a diagram illustrating a third specific example of selection of a source interleave set IS.
[0260] As shown in Fig. 38, for example, when there are multiple hot pages, the destination / source determination unit 79 selects the interleave set IS having the largest number of hot pages included in the logical device LD as the source. In the example of Fig. 38, the maximum number of hot pages of the two logical device LDs corresponding to the interleave set IS#0 is 2. The maximum number of hot pages of the two logical device LDs corresponding to the interleave set IS#1 is 1. The maximum number of hot pages of one logical device LD corresponding to the interleave set IS#2 is 3. Therefore, the destination / source determination unit 79 selects the interleave set IS#2 having the largest number of hot pages per logical device LD as the source.
[0261] The destination interleave set IS may be selected taking into consideration the amount of writing to each hot page.
[0262] 3.4 Example of target logical device selection Next, a specific example of the selection of the target logical device LD explained in step S3107 of FIG. 35 will be explained.
[0263] 3.4.1 First concrete example First, a first specific example will be described with reference to Fig. 39. Fig. 39 is a diagram illustrating a first specific example of the selection of a target logical device LD.
[0264] As shown in FIG. 39, the destination / source determination unit 79 pools free logical devices LD that are not assigned to any interleave set IS in advance. The destination / source determination unit 79 preferentially selects a logical device LD with a small amount of accumulated fatigue from a pool of free logical devices LD (hereinafter also referred to as an "free LD pool"). In the example of FIG. 39, six logical devices LD are pooled in the free LD pool. The accumulated fatigue amounts of the six logical devices LD are 1, 20, 10, 8, 40, and 13, in order from the left side of the page of FIG. 39. The number of interleaves IW of the destination interleave set IS is 4. Therefore, the destination / source determination unit 79 selects, in order from the least accumulated fatigue amount, a logical device LD with an accumulated fatigue amount of 1, a logical device LD with an accumulated fatigue amount of 8, a logical device LD with an accumulated fatigue amount of 10, and a logical device LD with an accumulated fatigue amount of 13 as target logical devices LD.
[0265] 3.4.2 Second concrete example Next, a second specific example will be described with reference to Fig. 40. Fig. 40 is a diagram illustrating a second specific example of the selection of a target logical device LD.
[0266] As shown in Fig. 40, when the free LD pool has a shortage of logical devices LD, the destination / source determination unit 79 secures free logical devices LD by reducing the number of interleaves IW of the interleave set IS in use. In the example of Fig. 40, the number of interleaves IW of the interleave set IS in use is 4. The destination / source determination unit 79 reduces the number of interleaves IW of this interleave set IS in use to 2, and secures two free logical devices LD. Then, the destination / source determination unit 79 selects the two secured free logical devices LD as the target logical devices LD.
[0267] 3.4.4 Third Example Next, a third specific example will be described with reference to Fig. 41. Fig. 41 is a diagram illustrating a third specific example of the selection of a target logical device LD.
[0268] As shown in FIG. 41, when an empty logical device LD in an empty LD pool includes a hot page, or when the write amount of an empty logical device LD is greater than a preset threshold, the destination / source determination unit 79 may select an empty high-endurance logical device LD from a high-endurance LD pool without selecting a logical device LD in the empty LD pool. The high-endurance LD pool is a pool of empty high-endurance logical devices LD. The high-endurance logical device LD is, for example, a DRAM. In the example of FIG. 41, the destination / source determination unit 79 selects a logical device LD in the high-endurance pool as a target logical device LD instead of a logical device LD in the empty LD pool that includes a hot page.
[0269] 3.4.3 Fourth Specific Example Next, a fourth specific example will be described. As in the second modification of the first embodiment, the destination / source decision unit 79 may select an interleave set IS having a small amount of accumulated fatigue as a destination from among the interleave sets IS in use, and swap the selected interleave set with the source interleave set IS.
[0270] 3.5 Effects of this embodiment With the configuration according to this embodiment, the memory system 3 can eliminate the mapping table and the access counter table, thereby reducing the amount of data of management information at the hardware level between memory modules.
[0271] Furthermore, with the configuration according to this embodiment, copy-on-write processing can be applied to data movement in wear leveling, just like in the first embodiment, and therefore the cost of data movement can be reduced.
[0272] 4. Modifications, etc. According to the above embodiment, the memory system includes a first memory area (LD0), a second memory area (LD2), and a control unit (10) configured to control a connection between the first memory area and the second memory area and a host device (2), generate first interleave configuration information (32) corresponding to the first memory area, and when an access request is received from the host device, select the first memory area based on the first interleave setting information, and update the first interleave setting information to second interleave setting information that does not correspond to the first memory area but corresponds to the second memory area based on the accumulated fatigue amount of the first memory area.
[0273] According to the above embodiment, it is possible to provide a memory system in which the amount of data of management information at the hardware level between memory modules is reduced.
[0274] The embodiment is not limited to the above-described embodiment, and various modifications are possible. In addition, the above-described embodiments can be combined as much as possible.
[0275] Furthermore, in the above embodiments, "connection" also includes a state in which something else, such as a transistor or a resistor, is interposed between them and indirectly connected.
[0276] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]
[0277] 1...data processing device, 2...host device, 3...memory system, 4...fabric manager, 10, 40, 70...control unit, 11, 71...system decoder, 12...system management unit, 13...access management unit, 14, 45, 74...buffer, 20, 90...memory module, 21...memory decoder, 22...memory control unit, 23, 92...memory, 25...power control unit, 26...capacitor, 27...non-volatile memory, 31...fatigue counter table, 32, 82...interleave setting information, 33, 81...copy status table, 41, 72...map Ping management unit, 42, 73...inter-module wear leveling control unit, 43, 78...module information management unit, 44, 79...migration destination / source determination unit, 51...mapping table, 52, 83...module management information, 60...first memory module, 61...second memory module, 62, 93...wear leveling history information management unit, 63...fatigue counter, 75...data movement processing unit, 76...copy status management unit, 77...interleave setting management unit, 91...wear leveling control unit, CK...chunk, IS...interleave set, LD...logical device
Claims
1. A first memory area; A second memory area; Controlling a connection between the first memory area and the second memory area and a host device; generating first interleave setting information corresponding to the first memory area; When an access request is received from the host device, the first memory area is selected based on the first interleave setting information; Based on an accumulated amount of fatigue in the first memory area, the first interleave setting information is updated to second interleave setting information that does not correspond to the first memory area but corresponds to the second memory area. A control unit configured as above, A memory system comprising:
2. a first storage unit including the first memory area; a second storage unit including the second memory area; Further comprising: The first storage unit is configured to output the fatigue accumulation amount of the first memory area to the control unit.
2. The memory system of claim 1.
3. The first interleave setting information includes identification information of the first memory area.
2. The memory system of claim 1.
4. The amount of accumulated fatigue of the first memory area is greater than the amount of accumulated fatigue of the second memory area.
2. The memory system of claim 1.
5. the control unit is configured to update the first interleave setting information to the second interleave setting information, and then update the first data in the first memory area corresponding to the first interleave setting information based on a write request received from the host device, and move the first data to the second memory area corresponding to the second interleave setting information.
2. The memory system of claim 1.
6. the control unit includes a copy status table corresponding to the first interleave setting information, and is configured to manage whether or not the first data in the first memory area corresponding to the first interleave setting information has been moved based on the copy status table.
6. The memory system of claim 5.
7. when receiving a read request from the host device after updating the first interleave setting information to the second interleave setting information, the control unit refers to the copy status table; if the second data to be read has not been moved from the first memory area to the second memory area, reading the second data from the first memory area based on the first interleave setting information; When the second data has been moved from the first memory area to the second memory area, the second data is read from the second memory area based on the second interleave setting information.
7. The memory system of claim 6.
8. When updating the first data based on the write request, the control unit refers to the copy status table; If the first data has been moved, writing the updated first data to the second memory area based on the second interleave setting information; if the first data has not been moved, reading the first data from the first memory area based on the first interleave setting information, writing the updated first data to the second memory area based on the second interleave setting information, and updating the copy status table.
7. The memory system of claim 6.
9. the control unit is configured to refer to the copy status table, move the third data that has not been moved from the first memory area to the second memory area, and update the copy status table.
7. The memory system of claim 6.
10. the control unit includes a first decoder that sets a connection to the first memory area based on the first interleave setting information, and a second decoder that sets a connection to the second memory area based on the second interleave setting information; When updating the first interleave setting information to the second interleave setting information, the first decoder is connected to the second memory area based on the second interleave setting information, and the second decoder is connected to the first memory area based on the first interleave setting information.
2. The memory system of claim 1.
11. the control unit is configured to update the first interleave setting information to the second interleave setting information based on the amount of accumulated fatigue in the first memory area and information on wear leveling performed in the first memory area.
2. The memory system of claim 1.
12. A plurality of storage units; Controlling a connection between the plurality of storage units and a host device; determining whether or not to exchange data among the plurality of storage units based on a bias in the amount of accumulated fatigue among the plurality of storage units; A storage unit to be replaced is selected from the plurality of storage units based on information on wear leveling executed in each of the plurality of storage units, a cycle of the wear leveling, and a data size of the wear leveling. A control unit configured as follows: A memory system comprising:
13. The wear leveling information is a list of logical addresses on which the wear leveling has been performed.
13. The memory system of claim 12.
14. The information on the wear leveling is a list of logical addresses on which the wear leveling has been performed and the number of times the wear leveling has been performed corresponding to the logical addresses.
13. The memory system of claim 12.
15. the control unit is configured to select a first storage unit having the largest amount of accumulated fatigue from among the plurality of storage units as a storage unit from which data is to be moved in the replacement, and when a product of a logical address on which the wear leveling has been performed and a number of times the wear leveling has been performed corresponding to the logical address is greater than a first threshold value set in advance in the first storage unit, select a page corresponding to the logical address as a source page.
13. The memory system of claim 12.
16. the plurality of storage units include a second storage unit and a third storage unit having a lower fatigue durability than the second storage unit, the control unit is configured to select the second storage unit as a destination of the data in the replacement when the product is greater than a second threshold value that is greater than the first threshold value, and to select the third storage unit as a destination of the data in the replacement when the product is equal to or less than the second threshold value.
16. The memory system of claim 15.
17. The fatigue accumulation amount of the first memory unit is greater than the fatigue accumulation amount of the third memory unit.
17. The memory system of claim 16.
18. the control unit is configured to acquire load information of the third storage unit, and when a load equal to or greater than a third threshold set in advance is applied to the third storage unit, not to select the third storage unit as a destination of data to be moved in the replacement.
17. The memory system of claim 16.
19. the control unit is configured not to select the second storage unit as a destination of data in the replacement when an access rate of the second storage unit is equal to or greater than a fourth threshold value set in advance.
17. The memory system of claim 16.
20. The wear leveling information further includes information regarding a time when the wear leveling was performed.
14. The memory system of claim 13.
Citation Information
Patent Citations
Storage controller
JP1982081659A
Data storage system and method, execution device and control method, and control device and method
JP2010262507A
Memory devices and methods
JP2017097861A
Solid state storage system using global wear leveling and method of controlling the solid state storage system
US20100088461A1
Memory system and wear-leveling method using the same
US20180321878A1
