Storage controller, storage device, data processing system, method and medium
Patent Information
- Application Number
- CN202611096869.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2046-07-22
AI Technical Summary
[0004]本申请实施例提供一种存储控制器、存储设备、数据处理系统、方法及介质,能够解决现有存储设备内部控制器对所有类型的数据采用统一的数据搬迁策略,导致存储空间产生不必要的写入操作,加剧存储设备的磨损、缩短了存储设备的寿命的问题
[0010]在本申请实施例中,存储控制器包括确定模块、丢弃模块、生成模块和发送模块;确定模块用于在非易失性存储阵列中的目标物理块满足数据丢弃条件的情况下,确定目标物理块是否属于目标存储空间,其中,目标存储空间用于存储可再生数据;丢弃模块用于在目标物理块属于目标存储空间的情况下,丢弃目标物理块中的数据,并对目标物理块执行擦除操作以回收存储空间;生成模块用于生成数据丢弃通知,数据丢弃通知携带有被丢弃数据的相关信息;发送模块用于向主机发送数据丢弃通知,数据丢弃通知用于指示主机根据相关信息重新生成被丢弃数据。这样,存储控制器可以在目标物理块满足数据丢弃条件且属于目标存储空间时丢弃数据并擦除原块,同时生成数据丢弃通知发送给主机以重新生成被丢弃数据,由此,目标存储空间中的数据在满足丢弃条件时无需执行有效数据的搬迁操作,减少了目标存储空间的写入操作次数,从而减缓了对应物理块的闪存磨损速率,延长了存储设备的使用寿命。
Smart Images

Figure CN122614301B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of storage technology, specifically relating to a storage controller, storage device, data processing system, method, and medium. Background Technology
[0002] In the field of storage technology, existing storage devices typically require a data migration strategy when performing garbage collection or processing physical blocks with unstable data. This involves reading the valid data from the physical block and writing it to other physical blocks, and then erasing the original physical block to reclaim storage space.
[0003] However, existing storage devices employ a uniform data migration strategy for all types of data, resulting in unnecessary write operations to the storage space. This exacerbates wear and tear on the storage devices and shortens their lifespan. For example, existing storage devices perform data migration operations even on storage spaces containing data with regenerable characteristics, leading to a large number of unnecessary additional writes during the migration process. This, in turn, accelerates flash memory wear and shortens device lifespan. Summary of the Invention
[0004] This application provides a storage controller, storage device, data processing system, method, and medium that can solve the problem that existing storage device controllers use a uniform data migration strategy for all types of data, resulting in unnecessary write operations to the storage space, which exacerbates the wear and tear of the storage device and shortens its lifespan.
[0005] In a first aspect, embodiments of this application provide a storage controller, which includes: a determination module, a discard module, a generation module, and a sending module; the determination module is used to: determine whether a target physical block in a non-volatile storage array belongs to a target storage space if the target physical block meets the data discarding conditions, wherein the target storage space is used to store regenerable data; the discard module is used to: discard the data in the target physical block if the target physical block belongs to the target storage space, and perform an erase operation on the target physical block to reclaim the storage space; the generation module is used to: generate a data discarding notification, wherein the data discarding notification carries relevant information about the discarded data; the sending module is used to: send the data discarding notification to the host, wherein the data discarding notification instructs the host to regenerate the discarded data based on the relevant information.
[0006] Secondly, embodiments of this application provide a storage device, including a non-volatile memory array and a storage controller as described in the first aspect.
[0007] Thirdly, embodiments of this application provide a data processing system, including: a host and a storage device as described in the second aspect; the host and the storage device are communicatively connected; the host is configured to: upon receiving a data discard notification from the storage device, regenerate the discarded data according to the relevant information of the discarded data carried in the data discard notification, and write the regenerated discarded data to the original logical address corresponding to the target physical block; wherein, the target physical block is the physical block that originally stored the discarded data.
[0008] Fourthly, embodiments of this application provide a storage control method, executed by a storage controller, the method comprising: If a target physical block in a non-volatile storage array meets the data discarding condition, determine whether the target physical block belongs to the target storage space, where the target storage space is used to store reproducible data; If the target physical block belongs to the target storage space, discard the data in the target physical block and perform an erase operation on the target physical block to reclaim the storage space; Generate a data discard notification, which carries information about the discarded data; Send a data drop notification to the host; the data drop notification is used to instruct the host to regenerate the dropped data based on relevant information.
[0009] Fifthly, embodiments of this application provide a computer-readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the storage control method as described in the fourth aspect.
[0010] In this embodiment, the storage controller includes a determining module, a discarding module, a generating module, and a sending module. The determining module determines whether a target physical block in the non-volatile storage array belongs to a target storage space, where the target storage space is used to store regenerable data, if the target physical block meets the data discarding conditions. The discarding module discards the data in the target physical block and performs an erase operation on the target physical block to reclaim the storage space if the target physical block belongs to the target storage space. The generating module generates a data discarding notification, which carries relevant information about the discarded data. The sending module sends the data discarding notification to the host, which instructs the host to regenerate the discarded data based on the relevant information. Thus, the storage controller can discard data and erase the original block when the target physical block meets the data discarding conditions and belongs to the target storage space, while simultaneously generating a data discarding notification and sending it to the host to regenerate the discarded data. Therefore, when the data in the target storage space meets the discarding conditions, no valid data migration operation is required, reducing the number of write operations to the target storage space, thereby slowing down the flash memory wear rate of the corresponding physical block and extending the lifespan of the storage device. Attached Figure Description
[0011] Figure 1 A schematic diagram of a storage controller provided for some embodiments of this application; Figure 2 Schematic diagrams of storage devices provided for some embodiments of this application; Figure 3 Schematic diagrams of a data processing system provided for some embodiments of this application; Figure 4 Schematic diagrams of a data processing system provided for some embodiments of this application; Figure 5 A schematic flowchart illustrating a storage control method provided for some embodiments of this application; Figure 6 A schematic flowchart illustrating a storage control method provided for some embodiments of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0014] The terminology used in the implementation section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The terminology involved in the embodiments of this application is explained below.
[0015] Storage device: A data storage device that uses semiconductor flash memory (NAND Flash) as the storage medium. Storage devices include, but are not limited to: Consumer Solid State Drives (cSSDs), Enterprise Solid State Drives (eSSDs), Universal Flash Storage (UFS), etc. Storage devices include a storage controller and a non-volatile storage array. The non-volatile storage array can be a NAND flash memory array. The storage controller runs Flash Translation Layer (FTL) firmware, responsible for core functions such as logical address to physical address mapping, garbage collection, wear leveling, and error handling.
[0016] Flash Translation Layer (FTL): The firmware layer in the storage controller, responsible for functions such as mapping logical addresses to physical addresses, garbage collection, and wear leveling.
[0017] Pseudo Single Level Cell (pSLC): TLC / QLC flash memory is operated in SLC mode, with each storage cell storing only 1 bit of data, resulting in higher reliability and lower latency.
[0018] Triple Level Cell (TLC): NAND flash memory where each cell stores 3 bits of data.
[0019] Quad Level Cell (QLC): NAND flash memory where each cell stores 4 bits of data.
[0020] Key-Value Cache (KV Cache): Caches key-value pairs used for attention calculations during the inference process of large AI models to accelerate inference.
[0021] Expert Parameters: The weight parameters of each expert network in the hybrid expert model.
[0022] Name space (NS): The logical block address space defined in the NVMe protocol.
[0023] Write Amplification Index (WAI): The ratio of the amount of data actually written to flash memory to the amount of data requested to be written by the host.
[0024] Over-Provisioning (OP): Redundant storage space reserved in storage devices for garbage collection and wear leveling.
[0025] Redundant Array of Independent Disks (RAID): A technology that protects data from loss through data redundancy.
[0026] Garbage collection (GC): The process by which storage devices reclaim physical blocks containing invalid data.
[0027] Refresh GC: When data in a physical block is unstable or read too many times, the valid data is moved to a new block and the original block is erased.
[0028] Scan Read: A strategy that periodically reads physical blocks to detect whether the data is stable (whether there are bit flips).
[0029] Read Disturbance: Repeated readings of the same physical block may cause charge shifts in adjacent cells, resulting in data errors.
[0030] AI Data Channel (ADC): A bidirectional communication channel between the FTL layer and the host (such as a host used for inference of large AI models) for transmitting data drop notifications and recalculation requests. The "first data channel" in the following text refers to the AI Data Channel.
[0031] Data Discard Notification (DDN): A notification message sent by the FTL layer to the host, informing the host that data within a certain logical address range has been discarded and needs to be recalculated and recovered.
[0032] Valid Data Threshold (VDT): The highest threshold for the percentage of valid data in a physical block when the direct discard policy is triggered.
[0033] Available Block Low Watermark (ABLW): The lower limit threshold for the number of available physical blocks in a storage device. When the number of available blocks falls below this threshold, space reclamation (GC or direct discarding) is triggered.
[0034] Currently, SSDs use pSLC namespace storage to store key-value caches and expert parameters for large AI models. However, pSLC space is costly and has limited capacity. Traditional SSD data protection strategies (RAID redundancy, Refresh GC, regular GC, etc.) introduce unnecessary write amplification and space overhead in AI scenarios, reducing the actual utilization of pSLC space and accelerating flash memory wear. AI data has a regenerative characteristic (lost data can be recovered through repeated computation). Therefore, the traditional SSD design principle of "data must never be lost" is too conservative in AI scenarios, leading to excessively high write amplification, excessive OP redundancy, and low pSLC utilization.
[0035] However, the applicant noted that in the prior art, the FTL layer independently manages data protection and GC strategies. The FTL layer does not understand the data characteristics of the upper-layer application and can only adopt a conservative strategy of "data must not be lost". It cannot perform differentiated processing based on whether the data is regenerable, resulting in a large number of unnecessary redundant protection operations in AI scenarios, and write amplification and space waste cannot be effectively controlled.
[0036] Based on this, embodiments of this application propose a storage controller, storage device, data processing system, method, and medium. By having the storage controller discard data and erase the original block when a target physical block meets the data discarding conditions and belongs to the target storage space, and simultaneously generate a data discard notification sent to the host to regenerate the discarded data, the regenerative nature of data in the target storage space can be utilized. Discarding notifications replace data migration, thereby reducing write amplification and extending device lifespan. Compared to existing solutions that use a uniform data migration protection strategy to protect all storage spaces, embodiments of this application determine whether a physical block belongs to the target storage space storing regenerative data and perform differentiated processing. For regenerative data, a strategy of discarding and then notifying the host to recalculate is adopted, thereby eliminating invalid migration writes to the target storage space under data discarding conditions.
[0037] The storage device and data processing system provided in the embodiments of this application are illustrated below with reference to the accompanying drawings.
[0038] For example, in some embodiments of this application, such as Figure 1 As shown in the figure, this application embodiment provides a storage controller, which includes: a determination module, a discard module, a generation module, and a transmission module; The determination module can be used to: determine whether a target physical block in a non-volatile storage array belongs to a target storage space, where the target storage space is used to store reproducible data, provided that the target physical block meets the data discarding conditions; The discard module can be used to: discard the data in the target physical block when the target physical block belongs to the target storage space, and perform an erase operation on the target physical block to reclaim the storage space; The generation module can be used to: generate data discard notifications, which carry information about the discarded data; The sending module is used to send a data discard notification to the host, which instructs the host to regenerate the discarded data based on relevant information.
[0039] Subsequently, the host can also write the regenerated discarded data to the original logical address corresponding to the target physical block.
[0040] In this embodiment, when a target physical block in a non-volatile storage array meets the data discarding conditions, the storage controller first determines whether the target physical block belongs to the target storage space. This target storage space is used to store reproducible data, such as KV Cache data and Expert parameter data in AI inference scenarios. When the target physical block belongs to the target storage space, the controller discards the data in the target physical block and performs an erase operation on the target physical block to reclaim the storage space. Simultaneously, the controller generates a data discarding notification carrying relevant information about the discarded data and sends this notification to the host, instructing the host to regenerate the discarded data based on the relevant information and write the regenerated discarded data back to its original logical address.
[0041] The non-volatile storage array consists of multiple physical blocks, which can be divided into target storage space and other storage spaces according to the characteristics of the stored data.
[0042] The target storage space can be one or more namespaces within a storage device. The data stored in the target storage space is reproducible data, meaning it can be regenerated by the host. In other words, reproducible data is data that can be regenerated by the host. In applications running AI inference frameworks, reproducible data includes cached data and model parameter data. Cached data can be key-value cache data, and model parameter data can be expert parameter data.
[0043] Other storage space can be one or more namespaces within a storage device other than the target storage space. Data stored in other storage spaces is non-renewable data, which is characterized by its non-permanence and unrecoverability. For example, non-renewable data includes: critical user data and system data.
[0044] Here, the host refers to the host-side device located outside the storage device, such as the processor or data processing chip in the data processing system that runs the AI inference framework.
[0045] In this way, when the target physical block meets the data discarding conditions and belongs to the target storage space, the storage controller discards the data and erases the original block. At the same time, a data discarding notification is generated and sent to the host to regenerate the discarded data. As a result, when the data in the target storage space meets the discarding conditions, there is no need to perform a valid data migration operation, which reduces the number of write operations in the target storage space, thereby slowing down the flash memory wear rate of the corresponding physical block and extending the life of the storage device.
[0046] Meanwhile, replacing data migration operations with lightweight data discard notifications reduces the amount of data transfer between storage devices and the host, thus reducing communication resource consumption.
[0047] In practical applications, refer to Figure 3 The storage controller can be a controller located inside the storage device, which includes the storage controller and a non-volatile storage array. The storage controller runs FTL firmware, which specifically includes the following functional modules: an address mapping module, responsible for mapping logical addresses to physical addresses; a data stability detection module, used to detect the data stability of physical blocks by scanning read operations and reading interference counts; a valid data statistics module, used to count the proportion of valid data in each physical block; a data decision module, used to decide whether to execute traditional data protection operations or data discarding strategies based on the data stability detection results and the proportion of valid data; and a communication module, used to communicate with the host through a data channel and send data discarding notifications.
[0048] The address mapping module maintains a mapping table from logical addresses to physical addresses. When data is discarded and erased, the corresponding entry in the mapping table is marked as invalid.
[0049] The data stability detection module obtains the number of ECC correction bits for each physical block through scanning and reading operations, and counts the number of reads for each physical block through a read counter to identify data instability and read interference risks.
[0050] The effective data statistics module queries the address mapping table to calculate the proportion of data that is still effectively mapped in each physical block.
[0051] The data decision module integrates the data stability test results and the effective data ratio information to determine whether the current physical block meets the conditions for direct discarding, and decides whether to execute the discarding strategy or the traditional protection strategy accordingly.
[0052] The communication module communicates bidirectionally with the host through the first data channel to send data drop notifications and receive confirmation messages and recovery load feedback information from the host.
[0053] It should be pointed out that, Figure 3The data decision module shown can perform the same functions as the determination module, discard module, and generation module mentioned above. Figure 3 The communication module shown can perform the same function as the sending module mentioned above, so it will not be described again here to avoid duplication.
[0054] Additionally, refer to Figure 3 The storage controller can also read and write reproducible data from the target storage space in the non-volatile storage array via the second data channel, or read and write non-reproducible data from other storage spaces in the non-volatile storage array via the second data channel.
[0055] In some embodiments of this application, in order to further improve the capacity utilization of the target storage space and reduce costs, the target storage space is a single-level storage mode namespace; the storage controller is also used to: mark the single-level storage mode namespace as a regenerable data namespace when creating the single-level storage mode namespace, and disable redundancy check protection for the single-level storage mode namespace.
[0056] In this embodiment, a single-level storage mode namespace (i.e., pSLC namespace) can be formed by TLC or QLC storage units operating in SLC mode, with each storage unit storing only 1 bit of data. When the storage controller creates this namespace, it marks it as a regenerable data namespace. After the FTL's RAID module detects this mark, it skips the verification calculation and storage of the data in this namespace, and the excess provisioning (OP) space originally reserved for RAID verification data is reallocated as available space for this namespace.
[0057] Among them, single-level storage mode namespaces have higher reliability and lower latency compared to multi-level storage mode namespaces, making them suitable for storing high-performance, reproducible data such as KV Cache and Expert parameters in AI inference.
[0058] Redundancy check protection refers to a protection mechanism that achieves data redundancy by storing check data, such as the RAID-5 mechanism, which distributes data and check information across multiple flash memory channels.
[0059] The disabling of redundant check protection applies only to single-level storage mode namespaces marked as regenerable data namespaces; other storage spaces in the storage device can still retain redundant check protection.
[0060] In this way, by disabling redundant check protection in the single-level storage mode namespace, the OP space originally used to store check data is freed up. This space can be reallocated to the single-level storage mode namespace, thereby increasing the available capacity of the single-level storage mode namespace with the same physical capacity and reducing the unit storage cost.
[0061] In some embodiments of this application, in order to specify the specific conditions for triggering data discarding, the data discarding conditions include at least one of the following: the data stability of the physical block does not meet the preset conditions; the number of times the physical block is read exceeds the preset read count threshold; the proportion of valid data in the physical block is lower than the valid data threshold. Among them, the data stability of the physical block does not meet the preset conditions, including: when performing error checking on the physical block, the number of error bits detected exceeds the preset error bit number threshold.
[0062] In this embodiment, the data discarding conditions include three specific triggering scenarios. The first scenario is that the data stability of the physical block does not meet a preset condition. Specifically, when the FTL performs error checking (such as ECC checking) on the physical block, if the number of error bits detected exceeds a preset error bit count threshold, the block is determined to be unstable. The second scenario is that the number of times the physical block is read exceeds a preset read count threshold. This scenario corresponds to the read interference problem; frequent reading of the same physical block may cause charge shifts in adjacent cells, leading to data errors. The third scenario is that the proportion of valid data in the physical block is lower than a valid data threshold.
[0063] Valid data refers to data in a physical block that is still mapped to a valid logical address, while invalid data refers to data that has been updated or deleted by a logical address and is no longer referenced.
[0064] The proportion of valid data can be either the proportion of valid data to the total physical block capacity, or the proportion of valid data pages to the total physical block pages.
[0065] In this embodiment of the application, when a physical block meets the data discarding conditions, the physical block is not discarded immediately. Instead, it is further determined whether the physical block belongs to the target storage space. The discarding strategy is only executed when the physical block belongs to the target storage space.
[0066] In this way, by providing three clear and quantifiable discard trigger conditions, the discard strategy is ensured to be triggered at the appropriate time, avoiding excessive discarding or failure to discard data that should be discarded due to unclear conditions, thus ensuring a balance between data availability and write amplification reduction.
[0067] In some embodiments of this application, in order to actively detect the stability of physical block data and the number of reads, the storage controller is also configured to: perform scan read operations on physical blocks in the non-volatile storage array to detect data stability, and count the number of reads for each physical block.
[0068] In this embodiment, the FTL periodically performs a scan read operation to read data from the physical block and check the number of ECC-corrected bits. When the number of corrected bits approaches the upper limit of the ECC error correction capability, the data in the physical block is determined to be unstable. Simultaneously, the FTL maintains a read counter for each physical block, incrementing the counter each time a read operation is performed to determine if a preset read count threshold has been exceeded.
[0069] The execution cycle of the scan read operation can be dynamically adjusted by the FTL according to the operating status of the storage device.
[0070] The count of reads for each physical block can be continuously performed during the operation of the storage device, and the results are stored in the memory of the storage controller.
[0071] In this way, by scanning and reading operations and counting the number of reads, a means is provided to proactively detect data instability and the risk of reading interference, so that the discarding strategy can intervene proactively before the data is actually lost, thus ensuring the availability of the data.
[0072] In some embodiments of this application, in order to enable the discarding strategy to adapt to the dynamic changes in the storage device space state, the effective data threshold is an adjustable threshold; the storage controller is also used to: obtain the number of available physical blocks of the non-volatile storage array, and adjust the value of the effective data threshold according to the number of available physical blocks.
[0073] In this embodiment, the Effective Data Threshold (VDT) is not fixed, but dynamically adjusted based on the number of available physical blocks in the storage device. When the number of available physical blocks changes, the storage controller adjusts the VDT value accordingly to match the aggressiveness of the discard policy with the current space urgency.
[0074] The number of available physical blocks refers to the number of currently free and available physical blocks in the non-volatile storage array.
[0075] The storage controller can obtain the number of available physical blocks by querying the FTL's free block management module.
[0076] In this way, by dynamically adjusting the effective data threshold based on the number of available physical blocks, the discarding strategy adapts to the actual space status of the storage device. When space is plentiful, unnecessary discarding is reduced to minimize the impact on the host, while when space is scarce, more aggressive discarding is carried out to quickly reclaim storage space.
[0077] In some embodiments of this application, in order to further determine the specific direction of threshold adjustment, the storage controller is specifically configured to: increase the value of the effective data threshold when the number of available physical blocks is lower than a preset lower threshold; and decrease the value of the effective data threshold when the number of available physical blocks is higher than a preset upper threshold.
[0078] In this embodiment, a preset lower threshold, or Available Block Low Watermark (ABLW), is used. When the number of available physical blocks falls below this threshold, it indicates that the storage device is experiencing space constraints. In this case, the VDT (Volume Low Watermark) is increased, allowing more physical blocks with a valid data ratio higher than the original threshold but lower than the new threshold to be included in the discard range, thereby more actively reclaiming space. When the number of available physical blocks exceeds a preset upper threshold, it indicates that space is ample. In this case, the VDT is decreased to reduce unnecessary discarding.
[0079] The preset lower threshold and preset upper threshold can be pre-configured by FTL based on factors such as the total number of physical blocks in the storage device and the size of the OP space.
[0080] Increasing the VDT means lowering the discard threshold, allowing more physical blocks to meet the condition that the effective data ratio is lower than the VDT; conversely, decreasing the VDT means increasing the discard threshold, allowing fewer physical blocks to meet the condition that the effective data ratio is lower than the VDT.
[0081] In this way, by setting a lower threshold and a higher threshold, a two-way adjustment mechanism for VDT is achieved, so that the aggressiveness of the discarding strategy is clearly negatively correlated with the urgency of space. This ensures that the device can quickly reclaim space when space is scarce, while avoiding excessive discarding that could interfere with the host when space is plentiful.
[0082] In some embodiments of this application, in order to ensure that the discard strategy takes into account the host's data recovery capabilities, the storage controller is further configured to: receive recovery load feedback information from the host, and adjust the value of the effective data threshold according to the recovery load feedback information.
[0083] In this embodiment, during the process of receiving a data drop notification and regenerating data, the host can report its current recovery load status to the storage controller. The storage controller adjusts the value of VDT based on the recovery load feedback. When the host's recovery load is high, the VDT is appropriately lowered to reduce the drop frequency; when the host's recovery load is low, the VDT is appropriately increased to more actively reclaim space.
[0084] The recovery load feedback information may include metrics such as the number of data recovery tasks currently being processed by the host, the average latency of data recovery, and the depth of the data recovery queue.
[0085] The storage controller will take into account both the recovery load feedback information and the number of available physical blocks to determine the final value of VDT.
[0086] In this way, by introducing the host's recovery load as the basis for VDT adjustment, the drop policy takes into account both the storage device space pressure and the host's data recovery capability, achieving system-level dynamic balance and adaptive optimization.
[0087] In some embodiments of this application, in order to ensure that the host can accurately identify the discarded data and perform recovery, the data discard notification includes at least one of the following information: the reason for discarding, the identifier of the target storage space, the starting logical address of the discarded data, and the length of the discarded data.
[0088] In this embodiment, the Data Drop Notification (DDN) generated by the storage controller includes the following information: drop reason, target storage space identifier, starting logical address, and length of the dropped data. The drop reason identifies the specific cause of the drop (e.g., data instability, excessive read interference, low percentage of valid data), allowing the host to select an appropriate recovery strategy based on the cause type. The target storage space identifier indicates the namespace to which the dropped data belongs. The starting logical address and the length of the dropped data together define the specific range of the dropped data within the logical address space.
[0089] Data drop notifications can be sent to the host via the NVMe Asynchronous Event Notification (AEN) mechanism or a custom NVMe Admin command.
[0090] In this way, by using a standardized data discard notification message format, the host can accurately locate the discarded data based on the namespace identifier, starting logical address, and length in the notification, and select an appropriate recovery strategy based on the reason for the discard, thus ensuring the feasibility and reliability of communication and collaboration between the storage device and the host.
[0091] In some embodiments of this application, when multiple physical blocks simultaneously meet the discard conditions, the storage controller can merge multiple DDNs into a single batch notification message to reduce communication overhead. To further reduce communication overhead, the storage controller is also configured to: when there are multiple physical blocks meeting the data discard conditions, merge multiple data discard notifications corresponding to multiple target physical blocks into a single batch notification message and send the batch notification message to the host.
[0092] In this embodiment, when the FTL detects that multiple physical blocks simultaneously or sequentially meet the data discarding conditions within a certain time period, the storage controller does not send multiple independent Data Discard Nodes (DDNs) one by one, but instead merges these DDNs into a single batch notification message. This batch notification message contains multiple data discarding entries, each corresponding to the discarding information of a physical block.
[0093] The batch notification message can include the number of discarded entries, the reason for discarding each entry, the namespace ID, the starting logical address, and the data length.
[0094] The storage controller can set a merge time window for batch notifications. DDNs accumulated within the window are merged and sent, and are sent uniformly when the window expires or the accumulated number reaches the upper limit.
[0095] In this way, by merging multiple data discard notifications into a single batch notification message, the number of communications and protocol overhead between the storage device and the host is reduced, thereby improving communication efficiency in batch discard scenarios.
[0096] In some embodiments of this application, in order to ensure data integrity for physical blocks that do not belong to the target storage space, the storage controller is further configured to: perform a data migration operation on the target physical block when the target physical block does not belong to the target storage space, so as to migrate the valid data in the target physical block to other physical blocks, and perform an erase operation on the target physical block after the migration is completed; Data migration operations include: refresh migration operations triggered by data instability or space reclamation migration operations triggered by insufficient storage space.
[0097] In this embodiment, when the storage controller determines that the target physical block does not belong to the target storage space, it indicates that the physical block stores non-renewable data. In this case, the traditional data migration strategy is still used to ensure data integrity. Specifically, if the target physical block is triggered due to data instability or exceeding the read limit, a refresh GC operation is performed to migrate the valid data to the new block and then erase the original block. If the target physical block is triggered because the percentage of valid data is lower than the VDT and the storage device space is insufficient, a space reclamation GC operation is performed to migrate the valid data and then erase the original block to reclaim space.
[0098] Both refresh migration and space reclamation migration operations involve reading valid data from the original block and writing it to other physical blocks, but the difference lies in the triggering reasons.
[0099] Other storage spaces besides the target storage space include namespaces that store non-renewable data such as critical user data and system data.
[0100] In this way, by using differentiated processing, a discard strategy is adopted for the target storage space to reduce write amplification, while the traditional migration strategy is still used for the non-target storage space to ensure data integrity, thus taking into account the different protection needs of different types of data.
[0101] In some embodiments of this application, as an alternative to the above embodiments, a partial redundancy check protection strategy can also be adopted. Specifically, instead of completely eliminating redundancy check protection for the target storage space, the redundancy check protection level is reduced. For example, RAID-5 is downgraded to RAID-3, or redundancy check protection is retained only for critical metadata, while redundancy check protection is disabled for cached data and model parameter data. This alternative achieves a trade-off between saving redundancy check space and data protection.
[0102] In some embodiments of this application, as an alternative implementation to the above embodiments, a data type-based differentiated discarding strategy can also be adopted. Specifically, the data decision module sets different discarding priorities according to the type of data to be discarded. For cached data (such as KV Cache), the cost of recalculation is low (only attention calculation needs to be re-executed), so it is discarded first; for model parameter data (such as Expert parameters), the cost of reloading is high, so it is discarded only when storage space cannot be reclaimed by other means.
[0103] In some embodiments of this application, as an alternative implementation to the above embodiments, a time-window-based delayed discarding strategy can also be adopted. Specifically, after the data stability detection module detects an unstable physical block, it does not immediately discard it, but sets a delayed time window. Within this delayed time window, if the host actively updates the data (for example, the KV Cache itself is frequently updated during AI inference), the data in the physical block has been updated and no additional processing is required; if the data has not been updated by the end of the delayed time window, then the data is discarded and the host is notified.
[0104] In some embodiments of this application, as an alternative implementation to the above embodiments, the communication module can also implement the data channel through custom management commands. Specifically, in addition to the asynchronous event notification mechanism in the above embodiments, the data channel can also be implemented through custom management commands (such as custom NVMe Admin commands). The host obtains data discard notifications by polling the management command queue. This alternative method is suitable for communication scenarios that do not support asynchronous event notification mechanisms.
[0105] In some embodiments of this application, as an alternative implementation to the above embodiments, a threshold adjustment strategy based on write temperature can also be adopted. Specifically, in addition to adjusting the effective data threshold based on the number of available physical blocks and the host recovery load, the effective data threshold can also be adjusted according to the write frequency of the target storage space. When the write frequency is high, it indicates that data updates are frequent, the host recovery cost after data loss is low, and the effective data threshold can be increased; when the write frequency is low, the effective data threshold is decreased.
[0106] Furthermore, based on a concept similar to the storage controller provided in the above embodiments, this application also provides a storage device.
[0107] refer to Figure 2 and Figure 3 The storage device provided in this application embodiment may include a non-volatile memory array and a storage controller. The storage device includes the storage controller provided in any of the above embodiments, capable of performing the same functions and achieving the same technical effects as the storage controller provided in any of the above embodiments. To avoid repetition, further details are omitted here.
[0108] Furthermore, based on a concept similar to the storage device provided in the above embodiments, this application also provides a data processing system.
[0109] like Figure 4 As shown, in some embodiments of this application, the data processing system provided by the embodiments of this application may include: a host and a storage device as provided in any of the above embodiments; the host and the storage device are communicatively connected; The host is used to: upon receiving a data discard notification from the storage device, regenerate the discarded data based on the relevant information of the discarded data carried in the data discard notification, and write the regenerated discarded data to the original logical address corresponding to the target physical block; The target physical block is the physical block that originally stored the discarded data.
[0110] In this embodiment, the host (i.e., the aforementioned host) and the storage device can be connected via a communication interface (such as an NVMe interface). When the storage device sends a data discard notification to the host, the host parses the data discard notification, determines the content of the discarded data based on the relevant information of the discarded data (such as logical address range, data length, etc.) carried therein, performs a regeneration operation, and writes the regenerated data to the original logical address, thereby completing the data recovery.
[0111] The host can be a host processor or a dedicated data processing chip that runs an AI inference framework.
[0112] The host can determine whether the discarded data is from the KV Cache or the Expert parameter based on the reason for discarding and the logical address range carried in the data discard notification, and choose the recovery method of recalculation or reloading accordingly.
[0113] In this way, through the communication and collaboration between the host and the storage device, a complete closed loop of "discarding, notifying, recalculating, and writing back" is formed, ensuring that discarded data can be recovered in a timely manner and that the integrity of system functions is not affected.
[0114] In some embodiments of this application, in order to adopt differentiated recovery methods for different data types, the relevant information of the discarded data includes the reason for discarding and the logical address range; the host is specifically used to: upon receiving a data discard notification from the storage device, determine whether the discarded data is cached data or model parameter data based on the reason for discarding and the logical address range carried in the data discard notification; if the discarded data is determined to be cached data, perform a recalculation operation to regenerate the cached data; if the discarded data is determined to be model parameter data, perform a reload operation to regenerate the model parameter data.
[0115] In this embodiment, the host determines the specific type of discarded data based on the discard reason and logical address range in the DDN, combined with its own maintained data type mapping information. If it is cached data (such as KV Cache in AI inference), a recalculation operation is performed, for example, re-performing attention calculation to generate KV Cache. If it is model parameter data (such as Expert parameters in the MoE model), a reload operation is performed, for example, reloading a copy of the model parameters from host memory or external storage.
[0116] The host can maintain a mapping table between logical address ranges and data types to quickly determine the type of data to be discarded.
[0117] The specific implementation of the recalculation and reload operations depends on the design of the upper-level AI inference framework.
[0118] In this way, by using two recovery methods—recalculation and reloading—for cached data and model parameter data respectively, the efficiency of data recovery is improved and the impact on normal system operation is reduced.
[0119] In some embodiments of this application, in order to ensure state synchronization between the storage device and the host, the host is further configured to: after completing the regeneration and writing of the discarded data, send an acknowledgment message to the storage device, the acknowledgment message being used to instruct the storage device to update its internal state.
[0120] In this embodiment, after the host completes the data regeneration and writes the data to the original logical address of the storage device, it sends an acknowledgment message to the storage device. Upon receiving the acknowledgment message, the storage device updates its internal state, such as updating the state of the corresponding entry in the address mapping table and clearing the discard flag for that logical address range.
[0121] The confirmation message can be implemented through custom commands or extended fields of standard commands in the NVMe protocol.
[0122] Before receiving an acknowledgment message, the storage device can maintain the mapping state associated with the discarded data unchanged and wait for acknowledgment before updating the state.
[0123] In this way, the confirmation mechanism enables the storage device to know that the data has been recovered, and the internal mapping state can be updated in a timely manner to ensure the consistency of state between the storage device and the host.
[0124] In some embodiments of this application, in order to achieve system-level bidirectional feedback adjustment, the host is further configured to: send recovery load feedback information to the storage device, wherein the recovery load feedback information is used to indicate the current regeneration load status of the host so that the storage device can adjust the value of the effective data threshold.
[0125] In this embodiment, when the host receives a data drop notification and performs data recovery, it sends its current recovery load status to the storage device via feedback information. The storage device adjusts the VDT value based on this feedback information. When the host's recovery load is high, the storage device can appropriately lower the VDT to reduce the drop frequency and prevent the host from being overloaded by recovery tasks, thus affecting normal operation; when the recovery load is low, the VDT can be appropriately increased to more actively reclaim space.
[0126] The recovery load feedback information may include metrics such as the current number of recovery tasks, recovery queue depth, and average recovery latency.
[0127] The host can periodically send recovery load feedback information, or it can be triggered to send it when the load changes significantly.
[0128] In this way, by having the host feed back the recovery load status to the storage device, a complete two-way feedback loop is formed. The storage device can dynamically adjust the discard strategy according to the host's capacity, thus achieving system-level dynamic balancing and adaptive optimization.
[0129] Furthermore, based on a concept similar to the storage controller provided in the above embodiments, this application also provides a storage control method, executed by the storage controller. For example... Figure 5 As shown, the storage control method provided in this application embodiment may include: Step 501: If the target physical block in the non-volatile storage array meets the data discarding condition, determine whether the target physical block belongs to the target storage space, wherein the target storage space is used to store reproducible data; Step 502: If the target physical block belongs to the target storage space, discard the data in the target physical block and perform an erase operation on the target physical block to reclaim the storage space; Step 503: Generate a data discard notification, which carries information about the discarded data; Step 504: Send a data discard notification to the host; the data discard notification is used to instruct the host to regenerate the discarded data based on relevant information.
[0130] Subsequently, the host can also write the regenerated discarded data to the original logical address corresponding to the target physical block.
[0131] In this way, the storage controller can discard data and erase the original block when the target physical block meets the data discarding conditions and belongs to the target storage space. At the same time, it generates a data discarding notification and sends it to the host to regenerate the discarded data. As a result, when the data in the target storage space meets the discarding conditions, there is no need to perform a valid data migration operation, which reduces the number of write operations in the target storage space, thereby slowing down the flash memory wear rate of the corresponding physical block and extending the life of the storage device.
[0132] Optionally, in some embodiments of this application, the target storage space is a single-level storage mode namespace; the storage control method provided in this application further includes: When creating a single-level storage mode namespace, mark the single-level storage mode namespace as a regenerable data namespace and disable redundancy check protection for the single-level storage mode namespace.
[0133] In this way, by disabling redundant check protection in the single-level storage mode namespace, the OP space originally used to store check data is freed up. This space can be reallocated to the single-level storage mode namespace, thereby increasing the available capacity of the single-level storage mode namespace with the same physical capacity and reducing the unit storage cost.
[0134] Optionally, in some embodiments of this application, the data discarding conditions include at least one of the following: the data stability of the physical block does not meet the preset conditions; the number of times the physical block is read exceeds the preset read count threshold; the proportion of valid data in the physical block is lower than the valid data threshold. Among them, the data stability of the physical block does not meet the preset conditions, including: when performing error checking on the physical block, the number of error bits detected exceeds the preset error bit number threshold.
[0135] In this way, by providing three clear and quantifiable discard trigger conditions, the discard strategy is ensured to be triggered at the appropriate time, avoiding excessive discarding or failure to discard data that should be discarded due to unclear conditions, thus ensuring a balance between data availability and write amplification reduction.
[0136] Optionally, in some embodiments of this application, the storage control method provided in this application further includes: Perform scan read operations on physical blocks in the non-volatile memory array to detect data stability and count the number of reads for each physical block.
[0137] In this way, by scanning and reading operations and counting the number of reads, a means is provided to proactively detect data instability and the risk of reading interference, so that the discarding strategy can intervene proactively before the data is actually lost, thus ensuring the availability of the data.
[0138] Optionally, in some embodiments of this application, the effective data threshold is an adjustable threshold; the storage control method provided in this application further includes: Obtain the number of available physical blocks in the non-volatile storage array, and adjust the effective data threshold value based on the number of available physical blocks.
[0139] In this way, by dynamically adjusting the effective data threshold based on the number of available physical blocks, the discarding strategy adapts to the actual space status of the storage device. When space is plentiful, unnecessary discarding is reduced to minimize the impact on the host, while when space is scarce, more aggressive discarding is carried out to quickly reclaim storage space.
[0140] Optionally, in some embodiments of this application, the storage control method provided in this application further includes: If the number of available physical blocks is lower than the preset lower threshold, the effective data threshold is increased; if the number of available physical blocks is higher than the preset upper threshold, the effective data threshold is decreased.
[0141] In this way, by setting a lower threshold and a higher threshold, a two-way adjustment mechanism for VDT is achieved, so that the aggressiveness of the discarding strategy is clearly negatively correlated with the urgency of space. This ensures that the device can quickly reclaim space when space is scarce, while avoiding excessive discarding that could interfere with the host when space is plentiful.
[0142] Optionally, in some embodiments of this application, the storage control method provided in this application further includes: Receive recovery load feedback information from the host, and adjust the value of the effective data threshold according to the recovery load feedback information.
[0143] In this way, by introducing the host's recovery load as the basis for VDT adjustment, the drop policy takes into account both the storage device space pressure and the host's data recovery capability, achieving system-level dynamic balance and adaptive optimization.
[0144] Optionally, in some embodiments of this application, the data discard notification includes at least one of the following: the reason for discarding, the identifier of the target storage space, the starting logical address of the discarded data, and the length of the discarded data.
[0145] In this way, by using a standardized data discard notification message format, the host can accurately locate the discarded data based on the namespace identifier, starting logical address, and length in the notification, and select an appropriate recovery strategy based on the reason for the discard, thus ensuring the feasibility and reliability of communication and collaboration between the storage device and the host.
[0146] Optionally, in some embodiments of this application, the storage control method provided in this application further includes: If there are multiple physical blocks that meet the data discarding conditions, the multiple data discarding notifications corresponding to the multiple target physical blocks are merged into a single batch notification message and sent to the host.
[0147] In this way, by merging multiple data discard notifications into a single batch notification message, the number of communications and protocol overhead between the storage device and the host is reduced, thereby improving communication efficiency in batch discard scenarios.
[0148] Optionally, in some embodiments of this application, the storage control method provided in this application further includes: If the target physical block does not belong to the target storage space, perform a data migration operation on the target physical block to move the valid data in the target physical block to other physical blocks, and perform an erase operation on the target physical block after the migration is completed; Data migration operations include: refresh migration operations triggered by data instability or space reclamation migration operations triggered by insufficient storage space.
[0149] In this way, by using differentiated processing, a discard strategy is adopted for the target storage space to reduce write amplification, while the traditional migration strategy is still used for the non-target storage space to ensure data integrity, thus taking into account the different protection needs of different types of data.
[0150] In practical applications, taking a solid-state drive (SSD) as an example, an SSD includes a flash memory controller and a flash memory array. For example... Figure 6 As shown in the embodiments of this application, the storage control method is executed by the flash memory controller in the solid-state drive, and the storage control method may include: Step 601: Initialize the flash controller and create a single-level storage mode namespace.
[0151] In this embodiment, the FTL (Flash Translation Layer) firmware within the flash controller initializes, marking the single-level storage mode namespace (i.e., the pSLC namespace) as a regenerable data namespace, disabling redundancy check protection for the pSLC namespace, and allocating the OP space occupied by redundancy check protection to the pSLC namespace. For example, during the initialization phase, the FTL identifies the physical configuration of the solid-state drive, creates a single-level storage mode namespace (pSLC namespace), and marks it as a regenerable data namespace. After the FTL's redundancy check protection module detects this marking, it skips the verification calculation and verification data storage for the namespace, and the space originally reserved for redundancy check protection is reallocated as available space for the pSLC namespace.
[0152] Step 602: The host writes recyclable data to the single-level storage mode namespace.
[0153] In this embodiment, the regenerable data includes cached data and model parameter data. The cached data can be KV Cache data, and the model parameter data can be Expert parameter data. The host running the AI inference framework writes the KV Cache data and Expert parameter data generated during the AI inference process into the pSLC namespace of the solid-state drive. This data has the characteristic of being regenerable from the host side.
[0154] Step 603: Perform scan reading operation and read interference count monitoring.
[0155] In this embodiment, during normal operation of the FTL, the FTL's data stability detection module periodically performs scanning and reading operations to detect the data stability of each physical block, while maintaining a counter for the number of reads of each physical block and monitoring for read interference risks.
[0156] Step 604: Determine whether any physical blocks with unstable data or physical blocks whose read counts exceed a preset threshold have been detected; If yes, proceed to step 605 for further judgment; if no, proceed to step 607 to perform the data migration operation.
[0157] In this embodiment, the FTL makes a judgment based on the scan read result (whether the number of ECC correction bits exceeds a preset error bit count threshold) and the read count (whether it exceeds a preset read count threshold). If a physical block exists that satisfies any of the above conditions, the process proceeds to step 605 for further judgment.
[0158] Step 605: Determine whether the physical block belongs to a single-level storage mode namespace; If yes, proceed to step 606 to execute the discard policy; otherwise, proceed to step 608 for further judgment.
[0159] In this embodiment, the FTL's AI data decision module determines the type of the namespace to which the physical block belongs. If the physical block does not belong to the pSLC namespace (i.e., it stores non-renewable data), a traditional data migration operation is performed to ensure data integrity; if it belongs to the pSLC namespace, the process proceeds to step 606 to execute a discard strategy.
[0160] Step 606: Discard the data in the physical block, erase the physical block, and send a data discard notification to the host through the first data channel to instruct the host to recalculate and recover the data after receiving the data discard notification.
[0161] In this embodiment, for unstable physical blocks or physical blocks that exceed the read limit belonging to the pSLC namespace, the FTL does not perform data migration, but directly discards the data and erases the physical block to reclaim space. The FTL sends a Data Drop Notification (DDN) to the host through the AI data channel, and the host regenerates the discarded data based on the information in the DDN and writes it to the original logical address.
[0162] Step 607: Perform the data migration operation.
[0163] Step 608: Monitor the number of available physical blocks in the flash array and determine whether the number of available physical blocks is below the low watermark of available blocks.
[0164] If yes in step 608, proceed to step 609. If no, proceed to step 603 to continue monitoring.
[0165] In this embodiment, the FTL effective data statistics module continuously monitors the number of available physical blocks. When the number of available blocks is lower than ABLW, it indicates that the solid-state drive space is tight and a space reclamation operation needs to be performed, proceeding to step 609.
[0166] Step 609: Calculate the percentage of valid data for each physical block in the flash array that belongs to the single-level storage mode namespace, and determine whether there are any physical blocks whose percentage of valid data is lower than the valid data threshold; In step 609, if yes, proceed to step 606 to execute the discard strategy; if no, proceed to step 607 to execute the data migration operation, and then you can go to step 603 to continue monitoring.
[0167] In this embodiment, the effective data statistics module calculates the effective data percentage of each physical block in the pSLC namespace. If there are physical blocks with an effective data percentage lower than the effective data threshold (VDT), the process proceeds to step 606 to execute a discard strategy; otherwise, a traditional space reclamation and relocation operation (regular GC) is performed to reclaim space.
[0168] In this embodiment, for pSLC physical blocks where the percentage of valid data is less than the VDT, the FTL does not perform valid data migration. Instead, it directly discards all data and erases the physical block to quickly reclaim space. The FTL sends a DDN to the host via the ADC, and the host regenerates the discarded data based on the DDN and writes it back to the original logical address. Afterwards, it can return to step 603 to continue monitoring.
[0169] In this embodiment, the discarding strategies executed in steps 603 to 606 correspond to an active discarding process triggered by data instability or read interference. The discarding strategies executed in steps 608, 609, and 606 correspond to a passive discarding process triggered by insufficient storage space. Both processes are based on determining whether the physical block belongs to the target storage space, and are direct discarding strategies executed only when the block belongs to the target storage space.
[0170] In this embodiment, the data migration operation performed from step 605 to step 607 is specifically a "refresh migration operation," corresponding to a traditional data migration operation triggered by data instability. That is, a data migration operation triggered by data instability when the target physical block does not belong to the target storage space.
[0171] In this embodiment, the data migration operation performed from step 609 to step 607 is specifically a "space reclamation migration operation," corresponding to a traditional data migration operation triggered by insufficient storage space. That is, a data migration operation triggered by insufficient storage space when the target physical block does not belong to the target storage space.
[0172] VDT is a dynamically adjustable threshold, and the adjustment is based on factors including the number of available physical blocks on the solid-state drive and the recovery load status reported by the host.
[0173] In this way, through the above control method, a target storage space is created and redundancy check protection is disabled during FTL initialization. During operation, physical blocks in the target storage space that meet the data discarding conditions are directly discarded and the upper layer is notified to recalculate. Traditional data migration protection is still performed on non-target storage spaces. At the same time, when space is insufficient, physical blocks in the target storage space with a low proportion of effective data are prioritized for direct discarding to quickly reclaim space. This achieves differentiated management and write amplification optimization of regenerable data.
[0174] The technical solutions provided in this application have the following advantages over the prior art.
[0175] First, it reduces the write amplification index of the target storage space. In existing technologies, flush migration operations are required for physical blocks with unstable data and physical blocks that have exceeded the read limit, and space reclamation migration operations are required for physical blocks with a low proportion of valid data. All of these migration operations generate additional writes, leading to an increase in the write amplification index. However, the embodiments of this application adopt a direct discard strategy for the target storage space, without performing data migration, eliminating the additional writes caused by flush migration operations and space reclamation migration operations, thereby significantly reducing the write amplification index of the target storage space.
[0176] Second, it improves the space utilization of the target storage space and reduces storage costs. In existing technologies, redundant check protection is enabled for the target storage space, and the check data occupies OP space, reducing the available capacity of the target storage space. The embodiments of this application eliminate the redundant check protection of the target storage space, releasing the OP space originally used for redundant check protection to the target storage space for use. Under the same physical capacity, the available capacity of the target storage space is increased, thereby reducing the unit storage cost.
[0177] Third, it extends the lifespan of storage devices. A lower write amplification index means fewer actual program / erase cycles per physical block, slowing flash memory wear and extending the lifespan of the storage device. Simultaneously, the direct-discard strategy avoids the additional wear on physical blocks caused by relocation writes, further extending the lifespan of the storage device.
[0178] Fourth, it reduces read / write latency. In existing technologies, triggering refresh migration operations and space reclamation migration operations requires data migration. The migration process consumes flash memory bandwidth and controller resources, increasing the latency of normal read / write requests. This application's embodiment directly discards data, eliminating migration operations and consuming flash memory bandwidth, thereby reducing the latency of normal read / write requests.
[0179] Fifth, it achieves independent controllability of data stability and write amplification. In existing technologies, data stability relies entirely on redundancy check protection and data migration operations, while write amplification is an inevitable cost of ensuring data stability, and the two cannot be controlled independently. This application's embodiment establishes a link between the FTL layer and the host through a data channel. The FTL layer can flexibly balance data stability and write amplification based on the regenerative characteristics of the data. Data stability no longer depends entirely on the redundancy migration protection within the FTL layer but can be ensured through host recalculation. Data stability and write amplification are decoupled and can be optimized independently.
[0180] This application also provides a computer-readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described method embodiments and achieve the same technical effects. To avoid repetition, these will not be described again here.
[0181] This application also provides a computer program product, which is stored in a computer-readable storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.
[0182] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or device that includes that element. Furthermore, it should be noted that the scope of the apparatus and devices in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described apparatus may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0183] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A storage controller, characterized in that, The storage controller includes: a determination module, a discard module, a generation module, and a sending module; The determining module is used to: determine whether the target physical block belongs to the target storage space when the target physical block in the non-volatile storage array meets the data discarding condition, wherein the target storage space is used to store regenerable data, and the regenerable data is data that can be regenerated by the host. The discard module is used to: discard the data in the target physical block when the target physical block belongs to the target storage space, and perform an erase operation on the target physical block to reclaim the storage space; The generation module is used to: generate a data discard notification, wherein the data discard notification carries relevant information about the discarded data; The sending module is used to: send the data discard notification to the host; the data discard notification is used to instruct the host to regenerate the discarded data based on the relevant information.
2. The storage controller according to claim 1, characterized in that, The target storage space is a single-level storage mode namespace; the storage controller is used to: mark the single-level storage mode namespace as a regenerable data namespace when creating the single-level storage mode namespace, and disable redundancy check protection for the single-level storage mode namespace.
3. The storage controller according to claim 1, characterized in that, The data discarding conditions include at least one of the following: the data stability of the physical block does not meet the preset conditions; the number of times the physical block is read exceeds the preset read count threshold. The proportion of valid data in the physical block is lower than the valid data threshold; The condition that the data stability of the physical block does not meet the preset conditions includes: when performing error verification on the physical block, the number of error bits detected exceeds the preset error bit number threshold.
4. The storage controller according to claim 3, characterized in that, The storage controller is also used to: perform scan read operations on physical blocks in the non-volatile storage array to detect data stability, and count the number of reads for each physical block.
5. The storage controller according to claim 3, characterized in that, The effective data threshold is an adjustable threshold; the storage controller is further configured to: obtain the number of available physical blocks of the non-volatile storage array, and adjust the value of the effective data threshold according to the number of available physical blocks.
6. The storage controller according to claim 5, characterized in that, The storage controller is specifically configured to: increase the value of the effective data threshold when the number of available physical blocks is lower than a preset lower threshold; and decrease the value of the effective data threshold when the number of available physical blocks is higher than a preset upper threshold.
7. The storage controller according to claim 5, characterized in that, The storage controller is also configured to: receive recovery load feedback information from the host, and adjust the value of the effective data threshold according to the recovery load feedback information.
8. The storage controller according to claim 1, characterized in that, The data discard notification includes at least one of the following: the reason for discarding, the identifier of the target storage space, the starting logical address of the discarded data, and the length of the discarded data.
9. The storage controller according to claim 1, characterized in that, The storage controller is further configured to: when there are multiple physical blocks that meet the data discarding conditions, merge multiple data discarding notifications corresponding to multiple target physical blocks into a single batch notification message and send the batch notification message to the host.
10. The storage controller according to claim 1, characterized in that, The storage controller is further configured to: perform a data migration operation on the target physical block when the target physical block does not belong to the target storage space, so as to migrate the valid data in the target physical block to other physical blocks, and perform an erase operation on the target physical block after the migration is completed; The data migration operations include: refresh migration operations triggered by data instability or space reclamation migration operations triggered by insufficient storage space.
11. A storage device, characterized in that it comprises: A non-volatile memory array and a memory controller as claimed in any one of claims 1 to 10.
12. A data processing system, characterized in that, include: The host and the storage device as described in claim 11; the host is communicatively connected to the storage device; The host is configured to: upon receiving a data discard notification from the storage device, regenerate the discarded data based on the relevant information of the discarded data carried in the data discard notification, and write the regenerated discarded data into the original logical address corresponding to the target physical block; The target physical block is the physical block that originally stored the discarded data.
13. A storage control method, executed by a storage controller, characterized in that, The method includes: If a target physical block in a non-volatile storage array meets the data discarding condition, it is determined whether the target physical block belongs to the target storage space, wherein the target storage space is used to store regenerable data, and the regenerable data is data that can be regenerated by the host. If the target physical block belongs to the target storage space, discard the data in the target physical block and perform an erase operation on the target physical block to reclaim the storage space; Generate a data discard notification, which carries information about the discarded data; The data discard notification is sent to the host, which instructs the host to regenerate the discarded data based on the relevant information.
14. A computer-readable storage medium having a program or instructions stored thereon, which, when executed by a processor, implement the steps of the method of claim 13.
Citation Information
Patent Citations
Presentation of direct accessed storage under a logical drive model
CN104040515A
Storage device control method and system, electronic device and storage medium
CN119357083A