Hybrid Storage-Class Memory and Its Wear-Leveling Method

By adopting a hybrid storage-level memory and wear balance method in smart terminals, the problems of insufficient power consumption and capacity requirements and unbalanced wear of the storage system are solved, and more efficient storage performance and longer service life are achieved.

CN112363957BActive Publication Date: 2025-06-27INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011316901.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-20
Publication Date
2025-06-27
Estimated Expiration
2040-11-20

AI Technical Summary

Technical Problem

Smart terminals have shortcomings in terms of storage system power consumption and capacity requirements, and the wear of non-volatile storage parts is unbalanced, resulting in a short service life of the storage system.

Method used

Mixed storage-level memory is used, combined with phase change memory and dynamic random memory, to form a persistent memory file system and a hybrid memory management unit, and by creating bitmap and selecting key blocks, the written files are allocated according to the access heat, achieving wear balance.

Benefits of technology

The storage system architecture of IoT smart terminals has been optimized, the service life of the storage system has been improved, and the performance of IoT smart terminals has been greatly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112363957B_ABST
    Figure CN112363957B_ABST
Patent Text Reader

Abstract

The present disclosure provides a hybrid storage-class memory, comprising: a phase change memory, a part of which serves as persistent storage to form a persistent memory file system unit; and a dynamic random access memory, which together with another part of the phase change memory serves as a hybrid memory management unit; wherein, the phase change memory and the dynamic random access memory are uniformly addressed and connected to a bus through a memory interface. The present disclosure also provides a wear leveling method for a hybrid storage-class memory, comprising: creating a bitmap to represent the configuration of existing file blocks; selecting a part of the file blocks as key blocks at intervals; and allocating write files according to the access heat of the key blocks, so as to achieve wear leveling of the hybrid storage-class memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of memory, and in particular, to a hybrid storage-class memory and its wear leveling method. Background Art

[0002] In recent years, non-volatile memory (NVM) technologies represented by phase change memory (PCM), magnetic random access memory (MRAM), resistive random access memory (RRAM), 3D-Xpoint, etc. have developed rapidly. Compared with dynamic random access memory (DRAM), the new non-volatile memory devices have higher density and larger capacity. Compared with disks, they have faster read and write speeds. With the development of non-volatile memory device technologies, the concept of storage class memory (SCM) has been proposed. Storage class memory has the dual characteristics of byte access (similar to DRAM) and large-capacity storage (similar to external storage devices).

[0003] A file system is a set of software mechanisms used in an operating system to organize and manage data. Since data is ultimately stored on a medium, the characteristics of the medium often affect the design of the file system. File systems can be divided into disk file systems and memory file systems. Disk file systems such as ext2, ext3, ext4, etc. are mainly used to manage traditional disk devices. Memory file systems can be further divided into volatile memory file systems and non-volatile memory file systems. Volatile memory file systems, such as ramfs and tmpfs, etc., use the general organizational structure of the virtual file system (VFS) in the kernel and store all metadata (such as super blocks and inodes) and data in memory. Since the metadata is stored in the virtual address space temporarily allocated by the kernel, the position of the metadata loaded each time in memory is uncertain, and the physical memory will also be reclaimed when the power is off. Therefore, volatile memory file systems do not have persistence. The other is a persistent memory file system. The metadata structure of a persistent memory file system is generally fixedly stored in a known position in non-volatile memory. After the system restarts, the metadata structure can be found at a determined position in the non-volatile memory, and the data can be restored using the non-volatile memory, thereby realizing the persistent storage of data. Summary of the Invention

[0004] (1) Technical Problems to be Solved

[0005] Based on the above problems, the present disclosure provides a hybrid storage-class memory and its wear leveling method to alleviate the technical problems in the prior art that intelligent terminals cannot meet the power consumption and capacity requirements of storage systems, and the wear of the non-volatile storage part is uneven, etc.

[0006] (II) Technical Solutions

[0007] One aspect of the present disclosure provides a hybrid storage-class memory, including: a phase change memory, a part of which is used as persistent storage to form a persistent memory file system unit; and a dynamic random access memory, which together with another part of the phase change memory serves as a hybrid memory management unit; wherein, the phase change memory and the dynamic random access memory are uniformly addressed and connected to the bus through a memory interface.

[0008] In an embodiment of the present disclosure, the phase change memory is in the high address space, and the dynamic random access memory is in the low address space.

[0009] In an embodiment of the present disclosure, the persistent memory file system unit is entirely in the phase change memory and occupies one-fourth to one-half of the hybrid storage-class memory space.

[0010] In an embodiment of the present disclosure, the hybrid memory management unit further includes a hybrid memory controller, which manages the memory of the hybrid memory unit by adding a hardware module.

[0011] Another aspect of the present disclosure provides a wear leveling method for a hybrid storage-class memory, which is used to achieve wear leveling for the hybrid storage-class memory described in any one of the above, and the wear leveling method for the hybrid storage-class memory includes: creating a bitmap to represent the configuration of existing file blocks; selecting a part of the file blocks as key blocks at regular intervals; and allocating write files according to the access heat of the key blocks, so as to achieve wear leveling of the hybrid storage-class memory.

[0012] In an embodiment of the present disclosure, creating a bitmap to represent the configuration of existing file blocks includes: using binary to represent whether a file block is allocated or not. When the value is "0", it means the corresponding file block is free; when the value is "1", it means the corresponding block has been occupied.

[0013] In an embodiment of the present disclosure, selecting a part of the file blocks as key blocks at regular intervals includes: dividing the average size of the written files in the memory file system within a period of time by the size of a single file block to obtain the average number of file blocks of the written files within this period of time, and using this as the key block selection interval.

[0014] In the embodiments of the present disclosure, allocating a written file according to the access popularity of key blocks includes: obtaining the access popularity of key blocks according to the number of access times of key blocks; when writing a file, traversing to find the key block with the lowest access popularity, and allocating the written file to the free file block after the key block corresponding to the lowest access popularity.

[0015] In the embodiments of the present disclosure, when writing a file, allocating the written file to the free file block after the key block corresponding to the lowest access popularity includes: determining the hot and cold attributes of the written file. When the written file is a hot file, traversing to find the key block with the lowest access popularity, and allocating the written file to the free file block after the key block corresponding to the lowest access popularity; when the written file is a cold file, directly allocating it to the free file block.

[0016] In the embodiments of the present disclosure, the hot file is a file that is frequently modified in a short period of time; the cold file is a file that is stored in the terminal and will not be modified for a long time.

[0017] (III) Beneficial effects

[0018] It can be seen from the above technical solutions that the hybrid storage-level memory and its wear leveling method of the present disclosure at least have one or a part of the following beneficial effects:

[0019] (1) Optimize the storage architecture of the Internet of Things intelligent terminal;

[0020] (2) The wear of the persistent storage part is more balanced, improving the service life of the storage system;

[0021] (3) Can significantly improve the performance of the Internet of Things intelligent terminal. Description of the drawings

[0022] Figure 1 It is a schematic diagram of the architecture of the hybrid storage-level memory in the embodiments of the present disclosure.

[0023] Figure 2 It is a schematic diagram of using a bitmap to represent file blocks in the embodiments of the present disclosure.

[0024] Figure 3 It is a schematic diagram of the flow of the wear leveling method of the hybrid storage-level memory in the embodiments of the present disclosure. Detailed implementation manners

[0025] The present disclosure provides a hybrid storage-level memory and its wear leveling method. Its hybrid storage-level memory architecture can form a hybrid storage-level memory by simultaneously using DRAM and PCM. After unified addressing, it is connected to the bus through a memory interface. Moreover, data exchange is carried out through the memory interface, significantly improving the performance of the Internet of Things intelligent terminal.

[0026] In the process of implementing the present disclosure, the inventors found that with the gradual enhancement of the local processing capabilities of Internet of Things (IoT) smart terminals, more and more complex applications need to be processed on-site at IoT smart terminals, and the demand for the storage capabilities of the terminals is also increasing day by day. With the emergence of new non-volatile storage devices, by reasonably using non-volatile storage devices in the terminal storage architecture, this hybrid storage-class memory is suitable for IoT smart terminals. Traditional terminals generally do not perform large-scale storage, and most of the data generated in the terminals will be uploaded to the cloud. However, the IoT terminals suitable for this hybrid storage-class memory have strong local processing capabilities and need to store relatively more data. Persistent memory can leverage its advantages such as high density and large capacity to effectively meet the requirements of smart terminals for the power consumption and capacity of the storage system.

[0027] To make the objectives, technical solutions, and advantages of the present disclosure clearer and more understandable, the following further elaborates on the present disclosure in detail in conjunction with specific embodiments and with reference to the accompanying drawings.

[0028] In an embodiment of the present disclosure, a hybrid storage-class memory is provided, as Figure 1 shown. The hybrid storage-class memory includes:

[0029] A phase change memory, a part of which is used as persistent storage to form a persistent memory file system unit; and

[0030] A dynamic random access memory, which together with another part of the phase change memory serves as a hybrid memory management unit; wherein, the phase change memory and the dynamic random access memory are uniformly addressed and connected to the bus through a memory interface.

[0031] In an embodiment of the present disclosure, in the hybrid storage-class memory architecture, a part of the PCM is used as memory. By leveraging the advantage that PCM does not require refreshing, the power consumption of the memory system is reduced; another part of the PCM is used as persistent storage. By utilizing its non-volatile characteristics, a large-capacity and high-speed I / O storage structure is constructed to replace external storage media such as NAND Flash in the traditional architecture.

[0032] The hybrid memory management unit further includes a hybrid memory controller, which manages the hybrid memory by adding a hardware module;

[0033] Generally, due to the poor write operation performance, high power consumption, and limited write times of PCM pages, the memory controller can record the page access times, filter out the pages with intensive write operations on the PCM medium, and migrate them to the DRAM medium. Thereby, the performance of the hybrid memory part is improved. In the present disclosure, specific migration algorithms are not involved. The present disclosure focuses on the management of the persistent memory file system part.

[0034] The phase change memory is in the high address space; the dynamic random access memory occupies the low address space;

[0035] Since DRAM and PCM are uniformly addressed, the start and end addresses of the physical spaces where DRAM and PCM are located are known. In the present disclosure, DRAM occupies the low address space and PCM is in the high address space. To ensure the persistence of the memory file system, in the present disclosure, it is necessary to ensure that the persistent memory file system is entirely on the PCM in terms of the space range. Only in this way can the persistence of the memory file system be ensured.

[0036] The present disclosure designates a part of the physical memory address space as the space for the persistent memory file system. Since the access speed of the new non-volatile memory has far exceeded that of traditional external storage media, to further improve the performance of the memory file system, the page cache (the role of the page cache is to cache data in external slow storage) can be bypassed through direct I / O, thereby reducing redundant file copying and improving the performance of the hybrid storage-class memory system.

[0037] To avoid affecting the performance of the entire system, when the memory is limited, generally one-fourth to one-half of the entire hybrid storage-class memory can be designated for use by the persistent memory file system. For example, for a hybrid storage-class memory with a total capacity of 4GB (physical address 00000000~FFFFFFFF), the first 1GB is DRAM (physical address 00000000~3FFFFFFF), and the last 3GB is PCM (physical address 40000000~FFFFFFFF). We need to ensure that the persistent memory file system uses the PCM space (physical address 40000000~FFFFFFFF), and at the same time, enough space should be left for memory use to ensure the normal operation of the system. We can use 1GB of the high address space as the space for the persistent memory file system (physical address C0000000~FFFFFFFF).

[0038] In the process of implementing the present disclosure, the inventors found that under the existing technical conditions, the write count of non-volatile memory is limited. When the write count of a storage unit reaches a certain level, the corresponding storage unit will be damaged and can no longer be used. Especially when a certain area is frequently written, it will cause accelerated wear of this area in a short time and reduce the service life of the PCM. The write count that this new non-volatile storage device, PCM, can withstand is limited. Although the writable count of PCM has reached 10 8 ~10 9 ,which is much larger than 10 of NAND Flash 5, however, for Internet of Things terminal devices used in the long term, it still cannot meet the service life requirements. We hope to design a wear leveling management strategy from the perspective of file system management to make the device wear more evenly and extend the service life. Existing wear leveling methods are mostly integrated into the hardware structure. By structures such as the storage controller, the read and write frequencies of different regions in the storage device are counted, and operations such as cold and hot data migration are performed. This method solves the wear leveling problem to a certain extent. However, since the hardware structure cannot perceive the characteristics of files in advance and cannot predict the read and write characteristics of files in advance, the wear leveling efficiency is low.

[0039] To solve the above problems, the present disclosure also provides a hybrid storage-class memory wear leveling method to perform wear leveling on the above-mentioned hybrid storage-class memory. The wear leveling strategy proposed by the present disclosure in the file system can predict and classify the read and write characteristics of files by perceiving the characteristics of files, and can achieve an ideal wear leveling effect. Moreover, this method does not conflict with the existing wear leveling strategy integrated in the controller and can be applied to the management of non-volatile storage devices at the same time to realize the collaborative management of software and hardware and improve the service life of the device.

[0040] In the present disclosure, as Figure 3 shown, the hybrid storage-class memory wear leveling method includes:

[0041] Operation S1: Create a bitmap to represent the configuration of existing file blocks;

[0042] In an embodiment of the present disclosure, as Figure 2 shown, we use a bitmap to represent the allocation of file blocks, and use binary to represent whether a file block is allocated or not. In the persistent memory file system we established, each file block corresponds to a binary bit. When the value is "0", it means the corresponding block is free; when the value is "1", it means the corresponding block has been allocated.

[0043] Operation S2: Select a part of the file blocks as key blocks at every interval;

[0044] To implement the wear leveling strategy, we need to evaluate the wear condition of file blocks. If wear leveling management is performed on each file block, it will cause huge management overhead. Therefore, we set key blocks to evaluate the wear condition of the entire storage area. Since it is costly to monitor the write conditions of all blocks in the bitmap, we set key blocks for wear leveling management. The key blocks are the blocks selected at every interval in the bitmap. For example, as Figure 2 shown, if the entire bitmap is regarded as a two-dimensional array, then the key blocks can be all the blocks in the first column.

[0045] The selection of critical blocks needs to be determined according to the actual application situation. For example, the selection interval of critical blocks is selected according to the average size of the files written within a certain period of time. In the applications being processed, the larger the average size of a single file, the larger the interval of critical blocks. If the stored files are smaller, the interval of critical blocks can be appropriately reduced, and more critical blocks can be set to monitor the wear situation. Specifically, we calculate the average size of the files written in the memory file system within a period of time T, divide it by the size of a single file block, and obtain the average number of file blocks written within this period of time. We use this value as the selection interval of critical blocks, denoted as L. L is an integer and can be expressed as: L = (N / Q) / n;

[0046] Among them, N is the total size of the files accessed within a period of time, Q is the total number of files, and n is the size of a single file block. According to the need, the interval of critical blocks can be adjusted after each period T to adapt to the characteristics of the files within a certain time period.

[0047] Operation S3: Allocate the written files according to the access popularity of the critical blocks to achieve wear leveling in the hybrid storage-level memory.

[0048] When a file enters the block allocation process, it will search for the critical block with the lowest current popularity. When the block with the lowest popularity is located, if the block is free, the file can be directly allocated to it. If the block is already occupied, the allocation will be postponed to the subsequent free block.

[0049] We will record the access popularity of each critical block, that is, the number of times the critical block changes from "0" to "1". Whenever a critical block changes from "0" to "1", its corresponding "popularity" increases by 1, indicating that a write operation has occurred on this critical block. Whenever a new file is written, when it comes to the step of file block allocation, it will search through the critical blocks to find the block with the lowest access popularity for allocation. If the critical block is already occupied, it will be postponed in sequence until the first available free block after the critical block is found for allocation. The critical block makes use of the locality of file block allocation. When a critical block has a high popularity, the blocks around it are also likely to have a high popularity. If the popularity of all blocks is counted, it will consume too many resources. Therefore, using the critical block method can solve the wear leveling problem to a certain extent.

[0050] In the embodiment of the present disclosure, in order to make full use of the file system for wear leveling management, in actual use, when writing a new file, the hot and cold attributes of the written file will be determined. For example, when the written file is a hot file, the key block with the lowest access heat is traversed and found, and the written file is allocated to the free file block corresponding to the key block with the lowest access heat; if the written file is a cold file, it is directly allocated to the free file block; in the present disclosure, the nature of the file can be distinguished according to different characteristics such as file naming characteristics and read and write permissions, thereby dividing hot and cold files; cold files and hot files can also be manually defined by specifying the hot and cold attributes of the file by the user. Thus, the wear leveling strategy is further optimized from the perspective of file division, and the wear leveling strategy is designed from the file system management level, which can make full use of the attributes of the file and allocate a suitable location for the file in a more targeted manner. In the present disclosure, the files in the IoT smart terminal can be divided into two types: one is long-term storage in the terminal. Once this file is created, it will not be modified for a long time. It is mostly a read-only file, which we define as a cold file; the other is a file that will be deleted or uploaded to the cloud after being used and processed in a short period of time. This file is modified more frequently, and we define it as a hot file.

[0051] Since the use of wear leveling strategies will cause performance loss to a certain extent, in order to further reduce the performance loss caused by the above method, we set different processing methods for cold files and hot files. Since the file system has more file information, we use the file information to make a prediction and judgment on the characteristics of the file. If the file is judged as a "cold file", we will not perform a wear leveling query on the file and will not look for information on key blocks. If the file is judged as a "hot file", we will perform wear leveling on the allocation process of the file block according to the above strategy.

[0052] In summary, our wear leveling strategy process is as follows: When a file enters the block allocation process, it will search for the block with the lowest current temperature among the key blocks. After locating the block with the lowest temperature, if the block is a free block, the file can be directly allocated. If the block is already occupied, it will be allocated to the next free block.

[0053] So far, the embodiments of the present disclosure have been described in detail in conjunction with the accompanying drawings. It should be noted that the implementation methods not shown or described in the drawings or the body of the specification are all forms known to ordinary technicians in the relevant technical field and are not described in detail. In addition, the above definitions of each element and method are not limited to the various specific structures, shapes or methods mentioned in the embodiments, and ordinary technicians in the field can simply change or replace them.

[0054] Based on the above description, those skilled in the art should have a clear understanding of the hybrid storage-level memory and the wear leveling method thereof disclosed in the present invention.

[0055] In summary, the present disclosure provides a hybrid storage-class memory and its wear leveling method, which simplifies the storage architecture of Internet of Things intelligent terminals and uses the hybrid storage-class memory to replace the original memory (usually DRAM) and external storage (persistent storage media such as NAND Flash). At the same time, a wear leveling strategy for the persistent storage part is designed from the perspective of the file system to extend the service life of the storage system.

[0056] It should also be noted that the directional terms mentioned in the embodiments, such as "up", "down", "front", "back", "left", "right", etc., are only references to the directions in the drawings and are not used to limit the protection scope of the present disclosure. Throughout the drawings, the same elements are denoted by the same or similar reference numerals. Conventional structures or configurations will be omitted when they may cause confusion in the understanding of the present disclosure.

[0057] Moreover, the shapes and sizes of the components in the drawings do not reflect the actual size and ratio, but only illustrate the content of the embodiments of the present disclosure. Additionally, in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim.

[0058] Furthermore, the word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements.

[0059] The ordinal numbers used in the description and claims, such as "first", "second", "third", etc., are used to modify the corresponding elements, and do not themselves imply any ordinal number of the element, nor represent the order of one element and another element, or the order in the manufacturing method. The use of these ordinal numbers is only to clearly distinguish an element with a certain name from another element with the same name.

[0060] In addition, unless specifically described or steps that must occur in sequence, the order of the above steps is not limited to the above list and can be changed or rearranged according to the required design. And the above embodiments can be used in combination with each other or combined with other embodiments based on design and reliability considerations, that is, the technical features in different embodiments can be freely combined to form more embodiments.

[0061] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be adopted to combine all the features disclosed in this specification (including the accompanying claims, abstract and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise explicitly stated, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) can be replaced by an alternative feature providing the same, equivalent or similar purpose. And, in the unit claims listing several devices, several of these devices can be embodied by the same hardware item.

[0062] The specific embodiments described above further elaborate on the purpose, technical solutions and beneficial effects of the present disclosure. It should be understood that the above are only specific embodiments of the present disclosure and are not used to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A hybrid storage - class memory wear - leveling method for achieving wear - leveling in a hybrid storage - class memory. The hybrid storage - class memory wear - leveling method includes: Creating a bitmap to represent the configuration of existing file blocks; Selecting a part of the file blocks as critical blocks at every certain interval; Allocating write files according to the access heat of critical blocks, so as to achieve wear - leveling of the hybrid storage - class memory; The step of selecting a part of the file blocks as critical blocks at every certain interval includes: Dividing the average size of the written files in the memory file system within a period of time by the size of a single file block to obtain the average number of file blocks of the written files within this period of time, and using this as the selection interval of critical blocks.

2. The hybrid storage - class memory wear - leveling method according to claim 1, wherein the step of creating a bitmap to represent the configuration of existing file blocks includes: Using binary to represent whether a file block is allocated or not. When the value is "0", it means the corresponding file block is free; When the value is "1", it means the corresponding block has been occupied.

3. The hybrid storage - class memory wear - leveling method according to claim 1, wherein allocating write files according to the access heat of critical blocks includes: Obtaining the access heat of critical blocks according to the access times of critical blocks; When writing a file, traversing to find the critical block with the lowest access heat, and allocating the write file to the free file block after the critical block corresponding to the lowest access heat.

4. According to the hybrid storage-level memory wear leveling method described in claim 3, when writing a file, allocate the written file to the free file block after the key block corresponding to the lowest access heat, including: Determining the hot - cold attribute of the write file. If the write file is a hot file, traversing to find the critical block with the lowest access heat, and allocating the write file to the free file block after the critical block corresponding to the lowest access heat; if the write file is a cold file, directly allocate it to a free file block.

5. The hybrid storage - class memory wear - leveling method according to claim 4, wherein the hot file is a file that is modified frequently in a short period of time; the cold file is a file that is stored in the terminal and will not be modified for a long time.

6. A hybrid storage - class memory for implementing the wear - leveling method according to any one of claims 1 - 5, including: A phase - change memory, a part of which is used as persistent storage to form a persistent memory file system unit; And A dynamic random - access memory, which together with another part of the phase - change memory serves as a hybrid memory management unit; Wherein, the phase - change memory and the dynamic random - access memory are uniformly addressed and connected to the bus through a memory interface.

7. The hybrid storage - class memory according to claim 6, wherein the phase - change memory is in the high - address space, and the dynamic random - access memory is in the low - address space.

8. The hybrid storage - class memory according to claim 6, wherein the persistent memory file system unit is entirely in the phase - change memory, occupying one - quarter to one - half of the hybrid storage - class memory space.

9. The hybrid storage - class memory according to claim 6, wherein the hybrid memory management unit further includes a hybrid memory controller, and manages the memory of the hybrid memory unit by adding a hardware module.

Citation Information

Patent Citations

  • Memory circuit and method for accessing memory circuit, system and method for managing memory

    KR1020110002742A

  • Method for constructing nvram-based efficient file system

    US20170147208A1