Storage method and system combined with low-quality flash memory particles
By detecting and sorting flash memory particles, and using the storage modes they support respectively, the problem of degradation in storage system performance during low-quality flash memory particles is solved, achieving higher stability and reliability.
Patent Information
- Application Number
- CN202510041254.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-09
AI Technical Summary
When the prior art deals with low-quality flash memory particles, unified degradation leads to a decline in overall performance of the storage system, and the flash memory particles with better performance fail to fully realize their storage potential. Flash memory particles with poor performance accelerate performance deterioration in frequent data read and write operations, affecting the stability of the storage system.
By detecting the quality parameters of the flash memory particles, they are divided into first grade particles and second grade particles, and are connected to the memory controller through different channels respectively. The first-level particles support multi-bit and unit storage modes, which are used to store user data and management information; the second-level particles only support unit storage mode, which is used to store management information.
It improves the stability and reliability of the solid-state hard disk storage system, fully utilizes the characteristics of different levels of flash memory particles, avoids forced downgrading of flash memory particles with better performance, and prevents excessive use of flash memory particles with poor performance to accelerate deterioration.
Smart Images

Figure CN119960689A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of solid-state hard disks, and in particular to a storage method and system combining low-quality flash memory particles. Background Art
[0002] As the scale of SSD production continues to expand, the number of low-quality flash memory particles that appear in the production process is also increasing. Although these low-quality flash memory particles have certain performance defects, they still have some storage functions. How to reasonably use these low-quality flash memory particles and improve the yield rate of SSD production has become an important issue of concern to the industry.
[0003] In the related art, the low-quality flash memory particles can be processed by downgrading. Specifically, all flash memory particles with performance defects are downgraded to unit storage mode, and these downgraded flash memory particles are connected to the storage system through random allocation channels of the storage controller to store various types of data.
[0004] However, this unified downgrade processing method leads to a significant decline in the overall performance of the storage system. Due to the differences in quality parameters of different flash memory particles, some flash memory particles with relatively good performance fail to fully realize their storage potential after being forced to downgrade, while flash memory particles with poor performance may accelerate performance degradation due to frequent data read and write operations, affecting the stability of the storage system. Summary of the invention
[0005] The present application provides a storage method and system combining low-quality flash memory particles to improve the stability of solid-state hard disk storage.
[0006] In a first aspect, the present application provides a storage method for low-quality flash memory particles, which is applied to a flash memory particle storage system, the method comprising: detecting quality parameters of flash memory particles, dividing the flash memory particles into first-level particles and second-level particles according to the quality parameters, the quality parameters including capacity data and life parameters of the flash memory particles, the life parameters including data error conditions and data storage time of the flash memory particles in a multi-bit storage mode and a unit storage mode; connecting the first-level particles to a storage controller through a first group of channels, and connecting the second-level particles to the storage controller through a second group of channels; dividing a first storage area in the first-level particles, and performing data storage in the first storage area according to a unit storage mode and a multi-bit storage mode; dividing a second storage area in the second-level particles, and performing data access in the second storage area according to the unit storage mode; when performing a data write operation, writing user data into the first storage area through the storage controller, and writing management information into the second storage area, the management information including a mapping relationship.
[0007] By adopting the above technical solution, the quality parameters of flash memory particles are first detected and classified, and particles with different performances can be accurately distinguished. The first-level particles with better quality are connected through specific channels. The advantage of supporting multi-bit and unit storage modes can be utilized to flexibly select the storage mode in the divided first storage area to improve storage efficiency. The second-level particles with slightly worse quality are connected through another set of channels and accessed in the second storage area divided by them in unit storage mode. When data is written, user data and management information are stored separately, which is convenient for management and improves the overall performance of the system. The characteristics of particles of different levels are fully utilized to enhance the stability and reliability of the solid-state hard disk storage system.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the step of detecting the quality parameters of the flash memory particles and dividing the flash memory particles into first-level particles and second-level particles according to the quality parameters specifically includes: obtaining the quality parameters of each flash memory particle through the storage controller, the quality parameters including parameters such as the number of wear times, data storage errors, and data retention capabilities; classifying the flash memory particles whose quality parameters are higher than a preset threshold and support multi-bit storage mode and unit storage mode as the first-level particles; and classifying the flash memory particles whose quality parameters are not higher than the preset threshold and support the unit storage mode as the second-level particles.
[0009] By adopting the above technical solution, the storage controller obtains parameters including the number of wear times, data storage errors and data retention capabilities, and divides the levels according to preset thresholds, ensuring that particles that meet performance standards and support multiple modes are classified as the first level so that they can give full play to their advantages in the storage system. Particles that are not higher than the threshold but support the unit storage mode are classified as the second level, avoiding forced degradation of particles with better performance and preventing accelerated degradation of particles with poor performance due to excessive use, thereby ensuring the overall stability of the storage system.
[0010] In combination with some embodiments of the first aspect, in some embodiments, after the step of writing user data into the first storage area and writing management information into the second storage area through the storage controller when performing a data write operation, the method further includes: storing the user data and the table data in the first storage area, and backing up the table data in the second storage area; when the user data in the first storage area is updated, updating the corresponding management information in the first storage area according to the mapping relationship and backing it up in the second storage area, the mapping relationship being a mapping relationship between the user data and the physical address.
[0011] By adopting the above technical solution, user data and table data are stored in the first storage area, and the table data is backed up in the second storage area, which utilizes the storage characteristics of different levels of granularity to improve data redundancy. When the user data in the first storage area is updated, the management information is updated in the second storage area according to the mapping relationship to ensure the consistency of the management information and the user data. During the operation of the system, even if an unexpected situation such as power failure occurs, if the table in the first storage area has not been written into the first storage area, the data can be restored by relying on the management information backed up in the second storage area, thereby enhancing the data recovery capability of the system.
[0012] In combination with some embodiments of the first aspect, in some embodiments, after the step of writing user data to the first storage area and writing management information to the second storage area through the storage controller when performing a data write operation, the method also includes: allocating temporary storage space in the cache register of the second-level particle through the storage controller; temporarily storing the data or management information to be written in the temporary storage space; creating a management information backup corresponding to the user data in the first storage area in the second storage area; and when the first storage area performs a user data write operation, synchronously updating the management information backup in the second storage area through the storage controller.
[0013] By adopting the above technical solution, the storage controller allocates temporary storage space in the second-level granular cache register, and utilizes the high-speed access characteristics of the cache register to temporarily store user data or management information there, which can effectively reduce the transmission waiting time required for reading and writing data, improve data processing efficiency, and create a management information backup corresponding to the user data in the first storage area in the second storage area to enhance data redundancy. When the first storage area performs a write operation, the backup is updated synchronously to ensure the timeliness and accuracy of the management information.
[0014] In combination with some embodiments of the first aspect, in some embodiments, after the step of writing user data to the first storage area and writing management information to the second storage area through the storage controller when performing a data write operation, the method also includes: when the user data is written to the first storage area, the management information corresponding to the user data is synchronously written to the second storage area; when the solid-state hard disk is powered on and restored, data recovery is performed based on the management information backup in the second storage area.
[0015] By adopting the above technical solution, when user data is written into the first storage area, its corresponding management information is simultaneously written into the second storage area, thereby realizing a close association between user data and management information. When the solid-state hard disk is powered on and restored, data recovery operations can be performed directly based on the management information backup in the second storage area, thereby avoiding the problem of being unable to recover data due to mismatch between the two due to abnormal conditions such as power outages, thereby improving the system's ability to cope with emergencies.
[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of writing user data into the first storage area and writing management information into the second storage area through the storage controller when performing a data write operation, the method further includes: dynamically allocating the number of channels of the first group of channels and the second group of channels according to the total number of channels of the storage controller, and the sum of the number of channels of the first group of channels and the number of channels of the second group of channels does not exceed the total number of channels of the storage controller.
[0017] By adopting the above technical solution, the number of the first and second groups of channels are dynamically allocated according to the total number of channels of the storage controller, so as to realize flexible allocation of channel resources and reasonably allocate them according to actual conditions to ensure that the sum of the number of the first group of channels of high-quality particles and the second group of channels of low-quality particles does not exceed the total number. During system operation, channel allocation can be optimized according to the connection status and performance requirements of the flash memory particles, thereby improving channel utilization and ensuring the coordinated operation of various parts of the storage system.
[0018] In combination with some embodiments of the first aspect, in some embodiments, after the step of writing user data into the first storage area and writing management information into the second storage area through the storage controller when performing a data write operation, the method further includes: monitoring the quality parameters of the first-level particles; when it is detected that the quality parameter of a first-level particle is lower than the preset performance threshold, downgrading the first-level particle to the second-level particle.
[0019] By adopting the above technical solution, the storage controller monitors the performance parameters and quality parameters of the first-level particles, and downgrades them to second-level particles when it detects that the relevant parameters of a first-level particle are lower than the preset performance threshold, thereby ensuring the efficiency and reliability of data storage. Reasonable downgrade processing can effectively avoid serious impact on the performance of the entire system due to the performance degradation of individual particles.
[0020] In a second aspect, an embodiment of the present application provides a flash memory granule storage system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the flash memory granule storage system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a flash memory granule storage system, enables the flash memory granule storage system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the instructions are executed on a flash memory granule storage system, the flash memory granule storage system executes the method described in the first aspect and any possible implementation method of the first aspect.
[0023] It can be understood that the flash memory granule storage system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present application can accurately distinguish particles with different performances by first detecting the quality parameters of flash memory particles and classifying them. The first-level particles with better quality are connected through specific channels. The advantages of supporting multi-bit and unit storage modes can be used to flexibly select storage modes in the divided first storage area to improve storage efficiency. The second-level particles with slightly worse quality are connected through another set of channels and accessed in the second storage area divided by the unit storage mode. When data is written, user data and management information are stored separately, which is convenient for management and improves the overall performance of the system. The characteristics of particles of different levels are fully utilized to enhance the stability and reliability of the solid-state hard disk storage system.
[0025] 2. The present application obtains information including the number of wear times, data storage errors, and data retention capabilities through a storage controller, and divides the levels according to preset thresholds to ensure that particles that meet performance standards and support multiple modes are classified as the first level, so that they can give full play to their advantages in the storage system. Particles that are not higher than the threshold but support the unit storage mode are classified as the second level, avoiding forced degradation of particles with better performance and preventing accelerated degradation of particles with poor performance due to excessive use, thereby ensuring the overall stability of the storage system.
[0026] 3. This application uses the storage characteristics of different levels of granularity to improve data redundancy by storing user data and table data in the first storage area and backing up table data in the second storage area. When the user data in the first storage area is updated, the management information is updated in the second storage area according to the mapping relationship to ensure the consistency of the management information and the user data. During the operation of the system, even if an unexpected situation occurs, such as power failure, the data can be restored by relying on the management information backed up in the second storage area, thereby enhancing the data recovery capability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a flow chart of a storage method combining low-quality flash memory particles in an embodiment of the present application; Figure 2This is another flow chart of a storage method combining low-quality flash memory particles in an embodiment of the present application; Figure 3 It is a schematic diagram of a physical device structure of a flash memory granule storage system in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.
[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0030] It should be noted that some basic concepts in the embodiments are first explained: NandFlash is a non-volatile memory that is electrically erasable and programmable. In a flash memory, storage cells are arranged in an array, and each storage cell can store one or more bits of data.
[0031] The storage controller is the core control chip of the solid-state drive, responsible for managing data reading and writing and the working status of flash memory particles. It has multiple independent channels built in, and each channel can perform data transmission independently.
[0032] For ease of understanding, the following is a description of the process of the method provided by this implementation. Figure 1 , is a flow chart of a storage method combining low-quality flash memory particles in an embodiment of the present application.
[0033] S101, detecting quality parameters of flash memory particles, and dividing the flash memory particles into first-level particles and second-level particles according to the quality parameters, wherein the quality parameters include capacity data and life parameters of the flash memory particles, and the life parameters include data error conditions and data storage time of the flash memory particles in multi-bit storage mode and single-bit storage mode.
[0034] Among them, flash memory particles refer to a single complete NandFlash storage unit manufactured on a semiconductor wafer, including a storage array, a control circuit, and an interface circuit. Quality parameters refer to a set of indicators used to evaluate the performance and reliability of flash memory particles. Capacity data refers to the size of the storage space actually available for flash memory particles. Life parameters refer to various indicators that reflect the reliability and durability of flash memory particles. Multi-bit storage mode refers to a working mode in which each storage unit stores multiple bits, such as TLC and QLC modes. Unit storage mode refers to a working mode in which each storage unit stores only one bit, that is, SLC mode. Data error conditions refer to the number of bit errors that occur during read and write operations. Data storage time refers to the length of time that data can be stably stored in flash memory particles. First-level particles refer to flash memory particles whose performance and reliability meet standard requirements. Second-level particles refer to flash memory particles whose some performance indicators do not meet the requirements.
[0035] During the production of solid-state drives, each flash memory particle needs to be tested and classified to determine its usage and storage mode. Specifically, the storage controller first detects the actual available capacity of the flash memory particles and marks the particles whose capacity is significantly lower than the nominal value; then performs data writing and reading tests in multi-bit storage mode, recording the number of error bits in the ECC check; then tests the data retention capability to check whether the data degrades after a certain period of time; finally, repeats the above tests in the single-bit storage mode. According to the comparison between the test results and the preset quality standards, the flash memory particles that meet the requirements are classified into the first level, and the other particles are classified into the second level.
[0036] In some embodiments, the quality detection and classification of flash memory particles can be achieved in the following ways: Optionally, the storage controller first writes test data to the flash memory particles, then immediately reads and verifies the correctness of the data, and records the ECC verification results; then waits for a predetermined time and reads the data again to check the data retention capability; finally, the effective capacity and number of bad blocks of the entire flash memory particles are counted. Optionally, the storage controller first performs an erase and write cycle test on the flash memory particles in a multi-bit storage mode, recording the speed and error conditions of each operation; then switches to a single-bit storage mode and repeats the test; finally, the performance of the particles in both modes is comprehensively evaluated. It is understandable that other methods can also be used to implement the quality detection and classification process of flash memory particles, which are not limited here.
[0037] The step of dividing the flash memory particles into first-level particles and second-level particles according to the quality parameters specifically includes: obtaining the quality parameters of each flash memory particle through the storage controller, the quality parameters including parameters such as the number of wear times, data storage error conditions and data retention capacity; Classifying the flash memory particles whose quality parameter is higher than a preset threshold and support the multi-bit storage mode and the single-bit storage mode as the first-level particles; The flash memory particles whose quality parameter is not higher than a preset threshold and support the unit storage mode are classified as the second-level particles.
[0038] Among them, the storage controller refers to the core control chip that manages data reading and writing. Flash memory particles refer to a single complete NandFlash storage unit. Quality parameters refer to a set of indicators for evaluating performance, including the number of erase and write times, data error rate, and retention time. Multi-bit storage mode means that each unit stores multiple bits. Single-bit storage mode means that each unit stores one bit.
[0039] Grain grading is performed during the production of solid-state drives. Specifically, the storage controller first reads the erase count of each flash memory particle, performs a read and write test to record the number of error bits, performs a data retention test to check the degradation, and records the test results in the quality parameter table. The quality parameters are then compared with the preset standard values, and the multi-bit storage mode support is tested at the same time. Grains that meet the performance standards and support multi-bit storage are classified into the first level. Finally, the unit storage mode function is tested on the remaining particles, and the particles with normal basic read and write functions are classified into the second level.
[0040] S102: Connect the first-level particles to a storage controller through a first group of channels, and connect the second-level particles to the storage controller through a second group of channels.
[0041] The first group of channels represents a set of data transmission paths for connecting first-level particles. The second group of channels represents a set of data transmission paths for connecting second-level particles. The storage controller refers to the core chip that manages the reading and writing of data of flash memory particles. Channel connection means establishing a physical connection and logical association between the storage controller and the flash memory particles. The channel of the storage controller refers to an independent physical interface for data transmission, and each channel can connect multiple flash memory particles. The CE signal of the flash memory particle refers to the control signal used to select a specific flash memory particle.
[0042] After completing the classification of flash memory particles, it is necessary to connect flash memory particles of different levels to different channel groups of the storage controller. Specifically, the storage controller first connects all first-level particles through the first group of channels, which are used to support high-speed data transmission in multi-bit storage mode; then connects all second-level particles through the second group of channels, which are specifically used for data transmission in single-bit storage mode.
[0043] In some embodiments, the channel connection between the flash memory particles and the storage controller can be realized in the following manner: Optionally, the storage controller first scans the number of flash memory particles connected to each channel; then configures the working mode and timing parameters of the channel according to the level information of the flash memory particles; finally, a mapping table between the channel and the flash memory particles is established to record the physical location and CE signal configuration of each flash memory particle. Optionally, the storage controller first connects the first-level particles to the channels with higher performance; then connects the second-level particles to other channels; finally, the connection status of each channel is verified by sending a test command. It is understandable that other methods can also be used to realize the channel connection configuration between the flash memory particles and the storage controller, which is not limited here.
[0044] S103 , dividing a first storage area in the first-level particle, and storing data in the first storage area according to a single-bit storage mode and a multi-bit storage mode.
[0045] Among them, the first-level particles refer to flash memory particles whose performance and reliability meet the standard requirements. The first storage area refers to the space allocated in the first-level particles for data storage. The unit storage mode refers to the working mode in which each storage unit stores only one bit of data, also known as the SLC mode. The multi-bit storage mode refers to the working mode in which each storage unit stores multiple bits of data, including MLC, TLC, QLC and other modes. Data storage refers to the process of writing data into flash memory particles. Storage area division means allocating and marking the storage space of flash memory particles according to different uses.
[0046] After completing the channel connection of the flash memory particles, it is necessary to reasonably divide the storage space of the first-level particles and set the storage mode of different areas. Specifically, the storage controller first calculates the total available capacity of the first-level particles, and then divides the area for storing user data and the area for storing management information. The user data area adopts a multi-bit storage mode to improve storage density, and the management information area adopts a single-bit storage mode to improve reliability. The storage controller records the starting address and size of these areas and establishes a regional management table for subsequent data read and write operations.
[0047] In some embodiments, the division of the first storage area and the configuration of the storage mode can be implemented in a variety of ways: Optionally, the storage controller first reads the capacity information and bad block table of the flash memory particles; then divides the user data area and the management information area according to a preset ratio; and finally sets the storage mode and access parameters of each area. Optionally, the storage controller first divides the front-end space of the flash memory particles into the management information area; then divides the remaining space into the user data area; and finally records the address range and attribute information of each area in the management table. It is understandable that the division of the first storage area and the configuration of the storage mode can also be implemented in other ways, which are not limited here.
[0048] S104 , dividing a second storage area in the second-level particle, and performing data access to the second storage area according to a unit storage mode.
[0049] Among them, the second-level particles indicate that some performance indicators do not meet the requirements and are only applicable to flash memory particles in unit storage mode. The second storage area refers to the space divided in the second-level particles for data storage. The storage area division means that the available space of the flash memory particles is allocated for functions.
[0050] After completing the channel connection of the second-level particles, its storage space needs to be divided and configured as a unit storage mode. Specifically, the storage controller first detects the actual available capacity of the second-level particles and excludes the marked bad blocks; then divides the available space into multiple storage areas for storing backup of management information and temporary data; finally, all areas are configured as a unit storage mode to ensure data reliability. The controller also establishes a regional management table to record the purpose, address range, and access attributes of each area.
[0051] In some embodiments, the division of the second storage area and data access can be implemented in a variety of ways: Optionally, the storage controller first counts the number of valid blocks of the second-level particles; then divides the valid blocks into a management information backup area and a temporary data cache area; and finally sets the access rights and read and write parameters of these areas. Optionally, the storage controller first divides the space of the second-level particles into fixed-size storage units; then assigns a specific purpose to each storage unit; and finally establishes an address mapping table and a status record table for the storage unit. It is understandable that other methods can also be used to implement the division of the second storage area and data access configuration, which are not limited here.
[0052] S105. When executing a data write operation, the storage controller writes user data into the first storage area and writes management information into the second storage area, wherein the management information includes a mapping relationship.
[0053] Among them, user data refers to the actual data content that needs to be stored for a long time, such as files, programs, etc. The first storage area refers to the storage space that supports multi-bit storage mode divided in the first-level granularity. Management information refers to metadata used to manage user data, including address mapping tables, block status tables, etc. The second storage area refers to the storage space that only supports single-bit storage mode divided in the second-level granularity. The mapping relationship refers to the correspondence between the logical address of the user data and the actual physical storage location.
[0054] When the system receives a data write request, it needs to process the storage of user data and the update of related management information at the same time. Specifically, after receiving the write request, the storage controller first analyzes the logical address and data content in the request; then finds a suitable physical location in the first storage area and writes the user data using a multi-bit storage mode; at the same time, it generates new management information, including the mapping relationship between the logical address of the data and the physical address; finally, it writes this management information to the second storage area through a single-bit storage mode to ensure the reliability of the management information. The entire write process is executed in parallel through the first group of channels and the second group of channels to improve the write efficiency.
[0055] In some embodiments, the writing operation of user data and management information can be implemented in a variety of ways: Optionally, the storage controller first divides the user data into blocks of fixed size; then allocates a physical storage location for each data block; and finally records the address mapping relationship of each data block in the management information. Optionally, the storage controller first checks the available physical space in the first storage area; then selects a suitable storage location to write the user data; and finally updates the mapping table and block status information in the second storage area. It is understandable that the writing operation of user data and management information can also be implemented in other ways, which are not limited here.
[0056] The following is a more detailed description of the process of the method provided by this implementation. Figure 2 , is another flow chart of the storage method combining low-quality flash memory particles in an embodiment of the present application.
[0057] S201 , storing the user data and the table data in the first storage area, and backing up the table data in the second storage area.
[0058] When the system receives a data write request, the storage controller first writes the user data to the first storage area in a multi-bit storage mode (such as TLC, QLC mode). At the same time, the controller writes the table data required to manage these user data (such as address mapping table, bad block table, etc.) to a dedicated area of the first storage area in a unit storage mode (SLC mode). After that, the storage controller immediately reads the table data in the first storage area, and writes these table data to the second storage area in a unit storage mode through a second set of channels, thereby forming a backup of the table data. For example, when writing a file, its data content is stored in the first storage area in TLC mode, and the mapping table that records the storage location of the file is stored in the SLC mode of the first storage area and the second storage area at the same time. This redundant storage method improves system reliability.
[0059] S202: When the user data in the first storage area is updated, the corresponding management information is updated in the first storage area according to the mapping relationship and backed up in the second storage area, wherein the mapping relationship is a mapping relationship between the user data and the physical address.
[0060] User data update refers to modifying, deleting or adding new data to the original data. Due to the characteristics of NandFlash, the update operation actually writes data to a new physical location and updates the mapping relationship. The mapping relationship refers to the correspondence table between the logical address of the user data (that is, the address used by the operating system to access data) and the actual storage location (physical address). Management information includes various types of information required for data management, such as the mapping relationship table, the erase count table, and the bad block information table. The physical address refers to the actual storage location of the data in NandFlash, which is usually composed of information such as the Block number and the Page number, and is used to locate the specific storage location of the data.
[0061] When the system receives a data update request, the storage controller first writes the new user data in the first storage area and updates the corresponding management information in the first storage area. Since NandFlash cannot directly modify the written data, the new data will be written to the new physical location. Then, the storage controller needs to update the mapping table to map the logical address of the user data to the new physical address. The storage controller then reads the updated mapping table and writes it to the second storage area, using the unit storage mode to ensure data reliability. For example, when the data with the logical address LBA100 is updated from the physical address Block5-Page2 to Block8-Page6, the controller will simultaneously update the corresponding mapping table entries in the first storage area and the second storage area, mapping LBA100 to the new physical address Block8-Page6. This dual-area storage method ensures that even in the event of an unexpected power outage in the system, the correct mapping relationship can be restored through the backup information in the second storage area.
[0062] S203: Allocate temporary storage space in the cache register of the second-level particle through the storage controller.
[0063] The cache register is a high-speed buffer inside NandFlash, which is used to temporarily store data to be written or read. Its access speed is much faster than that of the Flash storage unit. Temporary storage space refers to an area divided in the cache register, which is used to temporarily store data or management information.
[0064] The storage controller obtains the cache register status information of each flash memory particle by sending specific commands to the second-level particles. Based on the information obtained, the controller calculates the size of the available cache register space, which is usually 2KB or 4KB. The controller establishes an address index table in the cache register and divides the available space into multiple consecutive storage units, each of which is 512 bytes or 1KB in size. These divided storage units form a temporary storage space pool for subsequent data cache operations. For example, in a flash memory particle with a 4KB cache register, the controller divides it into 8 512-byte storage units and establishes a corresponding address mapping table to record the starting address and status information of each storage unit.
[0065] S204: temporarily storing the data or management information to be written into the temporary storage space, thereby increasing the table information processing capability and the data processing capability.
[0066] Data to be written refers to user data that needs to be stored in NandFlash. These data may be newly written data or updated data. Temporary storage space refers to the storage area divided in the cache register of the second-level particles. These spaces have the characteristics of fast access and temporary storage. Temporary storage operation refers to temporarily storing data in the cache register, waiting for subsequent processing or transfer.
[0067] When the storage controller performs a data temporary storage operation, it first checks the available status of the temporary storage space and allocates storage units of appropriate size for the data or management information to be written. The controller writes the data into the allocated storage unit in units of 512 bytes or 1KB through DMA transfer. For data larger than the capacity of a single storage unit, the controller divides it into multiple data blocks and writes them into multiple consecutive storage units in sequence. For example, when a 2KB mapping table needs to be temporarily stored, the controller divides it into 4 512-byte data blocks, writes them into 4 consecutive storage units respectively, and records the address information of these storage units for subsequent reading or transfer of data. This temporary storage mechanism utilizes the high-speed characteristics of the cache register to improve the efficiency of data processing.
[0068] S205: Create a management information backup corresponding to the user data in the first storage area in the second storage area.
[0069] Management information backup refers to a copy of management information created in the secondary storage area to improve data reliability.
[0070] The storage controller first reads the management information in the first storage area, including the address mapping table, block status table, and erase count table. Then, the controller allocates the corresponding storage space in the second storage area and writes the management information into the allocated space. The writing process adopts the unit storage mode to ensure the reliability of the data. For example, when there is a 4KB address mapping table in the first storage area, the controller allocates 4KB space in the second storage area and copies the mapping table completely to this space. The controller also records the storage location of the backup information and establishes an index table of the backup data for subsequent access and update operations.
[0071] S206: When the first storage area performs a user data write operation, the management information backup in the second storage area is synchronously updated through the storage controller.
[0072] User data writing refers to the operation of writing new data into the first storage area, including two cases of newly added data and updated data. Synchronous writing means that the management information is written while writing user data, and the two operations are synchronized in time.
[0073] When writing user data, the storage controller performs the following operations: First, the controller writes the user data to the specified physical location of the first storage area through the first set of channels; at the same time, the controller generates or updates the management information related to the user data, including the new address mapping relationship, data block status, etc.; then, the controller writes this management information to the second storage area through the second set of channels. For example, when writing a 16KB file, the controller writes the file data to Block30-Page8 to Page11 of the first storage area, and updates the mapping table to record the mapping relationship between the file logical address and the physical address Block30-Page8, and immediately writes this updated mapping table to Block8-Page3 of the second storage area. During the whole process, the two channels work in parallel to ensure the synchronization of data writing and management information backup.
[0074] S207. When the user data is written into the first storage area, the management information corresponding to the user data is synchronously written into the second storage area.
[0075] Synchronous writing means writing corresponding management information immediately while writing user data to ensure data consistency.
[0076] The storage controller performs the following operations when writing user data: write the user data to the specified physical location of the first storage area through the first set of channels, such as writing a 4KB file to Block10-Page5; generate management information corresponding to the user data at the same time, including a mapping table entry that maps the logical address of the file to the physical address Block10-Page5; and immediately write the newly generated management information to the specified location of the second storage area, such as Block2-Page1, through the second set of channels. During the entire writing process, the two channels work in parallel, and the writing of user data and management information is completed at the same time, avoiding the problem of inconsistency between data and management information due to abnormalities such as power failure.
[0077] S208: When the solid state hard disk is powered on for recovery, data is restored based on the management information backup in the second storage area.
[0078] SSD power-on recovery refers to the process of restoring the SSD to normal working state when it is powered on again after power failure. The management information backup in the second storage area refers to the copy of management information stored in the flash memory particles with poor quality, which is stored in the unit storage mode to ensure data reliability. Data recovery refers to the reconstruction of various management information required for system operation, including address mapping relationship, block status information, etc.
[0079] When the SSD is powered on, the storage controller first reads the management information backup from the second storage area, including the address mapping table, block status table, and erase count table. The controller rebuilds the data structure in the memory based on the read management information, for example, establishing a mapping relationship from a logical address to a physical address based on the address mapping table. The specific steps are as follows: first read the management information index table stored in the second storage area Block0-Page0, and then find the specific storage location of each type of management information based on the index table. For example, if the mapping table is stored in Block2-Page0 to Page3, read the data of these pages to reconstruct the mapping relationship. In this way, the SSD can quickly recover to the state before the power failure, ensuring the integrity and consistency of the data.
[0080] S209. Dynamically allocate the number of channels of the first group of channels and the second group of channels according to the total number of channels of the storage controller, wherein the sum of the number of channels of the first group of channels and the number of channels of the second group of channels does not exceed the total number of channels of the storage controller.
[0081] A channel is a data transmission path between a storage controller and flash memory particles. Each channel can perform data transmission independently. The first group of channels is used to connect flash memory particles with better quality and supports multi-bit storage mode. The second group of channels is used to connect flash memory particles with poorer quality and only uses single-bit storage mode. The total number of channels is the maximum number of channels supported by the storage controller, such as 4 channels or 8 channels.
[0082] The storage controller performs channel allocation during initialization: first, the total number of channels of the controller is read, for example, there are 4 channels in total (CH0-CH3). Then, according to the number of flash memory particles actually connected and the performance requirements, the channels are allocated to two groups of flash memory particles. For example, CH0 and CH1 can be allocated to the first group of channels to connect flash memory particles with better quality to achieve high-speed reading and writing of user data; CH2 can be allocated to the second group of channels to connect flash memory particles with poorer quality to store management information; CH3 is reserved as a spare channel. When the system detects that the performance of a channel has degraded, the allocation scheme can be readjusted, such as adjusting CH1 to the second group of channels and adjusting the spare CH3 to the first group of channels to ensure system performance and reliability.
[0083] S210, monitoring the quality parameters of the first-level particles.
[0084] Quality parameters refer to indicators that reflect the working status of flash memory particles, including values such as read and write speed, error rate, and number of erases. Quality parameters refer to indicators that reflect the reliability of flash memory particles, including values such as data retention time, number of bad blocks, and ECC verification results. The storage controller performs the following monitoring operations: after each data write or erase operation, read the ECC verification result of the flash memory particle and record the number of error bits; regularly count the number of erases of each storage block and update the erase count table; perform data inspection in the background, read the stored data and perform ECC verification, and record the change in error rate; regularly check the bad block mark table and count the number of newly added bad blocks. These monitoring data are recorded in a dedicated performance log area. For example, Block15 is set as a performance log block, where Page0-Page3 records error rate data, Page4-Page7 records the number of erases, and Page8-Page11 records bad block statistics. These data are used for subsequent particle degradation judgment.
[0085] S211: When it is detected that the quality parameter of a first-level particle is lower than the preset performance threshold, downgrade the first-level particle to the second-level particle.
[0086] The preset performance threshold refers to a set of standard values used to judge the grade of flash memory particles during the production process of solid-state drives, including specific values such as error rate, data retention time, and available capacity. The quality parameters include various indicators of flash memory particles in multi-bit storage mode and single-bit storage mode. The division of first-level particles and second-level particles is a classification process carried out in the production stage of solid-state drives.
[0087] During the production process of SSDs, the storage controller performs performance tests and classifications on each flash memory particle. The tests include: performing read and write tests in multi-bit storage mode and recording ECC errors; testing the actual available capacity of the flash memory particles; and testing data retention and erase and write durability. When a performance parameter or quality parameter of a flash memory particle is found to be lower than a preset threshold, it is classified as a second-level particle and only uses the function of its unit storage mode. For example, when a flash memory particle has a high ECC error rate in TLC mode but works normally in SLC mode, it is classified as a second-level particle for storing management information. This classification method is determined during the production stage to ensure the stable operation of the SSD after leaving the factory.
[0088] It should be noted that steps S201 - 211 are executed after step 105 .
[0089] The flash memory granule storage system in the embodiment of the present invention is described below from the perspective of hardware processing. Figure 3 , is a schematic diagram of a physical device structure of a flash memory particle storage system in an embodiment of the present application.
[0090] It should be noted that Figure 3 The structure of the flash memory granule storage system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0091] like Figure 3 As shown, the flash memory granule storage system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through bus 304. Input / output (I / O) interface 305 is also connected to bus 304.
[0092] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
[0093] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.
[0094] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0096] Specifically, the flash memory particle storage system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the storage method combined with low-quality flash memory particles provided in the above embodiment is implemented.
[0097] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the flash memory particle storage system described in the above embodiment; or may exist independently without being assembled into the flash memory particle storage system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the flash memory particle storage system, the flash memory particle storage system implements the storage method combined with low-quality flash memory particles provided in the above embodiment.
[0098] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0099] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0100] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A storage method combining low-quality flash memory particles, characterized in that: Applied to a flash memory granule storage system, the method comprises: Detecting quality parameters of flash memory particles, and dividing the flash memory particles into first-level particles and second-level particles according to the quality parameters, wherein the quality parameters include capacity data and life parameters of the flash memory particles, and the life parameters include data error conditions and data storage time of the flash memory particles in a multi-bit storage mode and a single-bit storage mode; Connecting the first-level particles to a storage controller through a first group of channels, and connecting the second-level particles to the storage controller through a second group of channels; Dividing a first storage area in the first level of particles, and storing data in the first storage area according to a single-bit storage mode and a multi-bit storage mode; Dividing a second storage area in the second level of particles, and accessing data in the second storage area according to a unit storage mode; When a data write operation is performed, user data is written into the first storage area through the storage controller, and management information is written into the second storage area, wherein the management information includes a mapping relationship.
2. The method according to claim 1, characterized in that The step of detecting the quality parameters of the flash memory particles and classifying the flash memory particles into first-level particles and second-level particles according to the quality parameters specifically includes: Acquiring quality parameters of each flash memory particle through the storage controller, wherein the quality parameters include parameters such as the number of wear times, data storage error conditions, and data retention capability; Classify the flash memory particles whose quality parameters are higher than a preset threshold and support multi-bit storage mode and single-bit storage mode as the first-level particles; The flash memory particles whose quality parameter is not higher than a preset threshold and support the unit storage mode are classified as the second-level particles.
3. The method according to claim 1, characterized in that After the step of writing user data into the first storage area and writing management information into the second storage area by the storage controller when performing a data write operation, the method further comprises: storing the user data and the table data in the first storage area, and backing up the table data in the second storage area; When the user data in the first storage area is updated, the corresponding management information is updated in the first storage area according to the mapping relationship and backed up in the second storage area, wherein the mapping relationship is a mapping relationship between the user data and the physical address.
4. The method according to claim 1, characterized in that: After the step of writing user data into the first storage area and writing management information into the second storage area by the storage controller when performing a data write operation, the method further comprises: allocating temporary storage space in a cache register of the second level of particles by the storage controller; Temporarily storing the data or management information to be written into the temporary storage space; Creating a management information backup corresponding to the user data in the first storage area in the second storage area; When the first storage area performs a user data write operation, the management information backup in the second storage area is synchronously updated through the storage controller.
5. The method according to claim 1, characterized in that After the step of writing user data into the first storage area and writing management information into the second storage area by the storage controller when performing a data write operation, the method further comprises: When the user data is written into the first storage area, the management information corresponding to the user data is synchronously written into the second storage area; When the solid state drive is powered on for recovery, data recovery is performed based on the management information backup in the second storage area.
6. The method according to claim 1, characterized in that After the step of writing user data into the first storage area and writing management information into the second storage area by the storage controller when performing a data write operation, the method further comprises: The number of channels of the first group of channels and the second group of channels are dynamically allocated according to the total number of channels of the storage controller, and the sum of the number of channels of the first group of channels and the number of channels of the second group of channels does not exceed the total number of channels of the storage controller.
7. The method according to claim 1, characterized in that After the step of writing user data into the first storage area and writing management information into the second storage area by the storage controller when performing a data write operation, the method further comprises: monitoring quality parameters of the first grade particles; When it is detected that the quality parameter of a first-level particle is lower than the preset performance threshold, the first-level particle is downgraded to the second-level particle.
8. A flash memory granule storage system, characterized in that: The flash memory granule storage system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the flash memory granule storage system to execute the method described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on the flash memory granule storage system, the flash memory granule storage system is caused to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product runs on a flash memory granule storage system, the flash memory granule storage system is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
DRAM (Dynamic Random Access Memory) regulation and control method, control device and regulation and control equipment
CN120279968A
Storage space size determination method and device, test equipment and storage medium
CN122157745A