Fast switching method and device for FDP configuration of SSD, computer equipment and storage medium
By receiving host instructions to save the target FDP configuration information and dynamically reconstructing hardware and software resources, the problem of high storage resource consumption and connection interruption of solid-state drives during FDP configuration switching is solved, realizing fast and seamless configuration switching and improving system efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 成都芯忆联信息技术有限公司
- Filing Date
- 2026-01-22
- Publication Date
- 2026-04-21
AI Technical Summary
Existing solid-state drives (SSDs) suffer from issues such as high storage resource consumption, increased hardware costs, switching latency, and connection interruptions during FDP configuration switching, which affect system performance and reliability.
By receiving host instructions to save target FDP configuration information, temporarily saving key data, and dynamically reconstructing hardware and software resources in initialization mode, communication connections are maintained, achieving seamless switching.
It enables rapid FDP configuration switching without interrupting business operations, reduces storage resource consumption, improves system efficiency and reliability, and ensures the integrity of device lifecycle management.
Smart Images

Figure CN121900701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive technology, and in particular to a method, apparatus, computer device, and storage medium for fast switching of FDP configuration for SSDs. Background Technology
[0002] In the current solid-state drive (SSD) technology field, flexible data placement (FDP) technology has gradually become a key means to optimize read / write performance and extend device lifespan in order to adapt to diverse workloads and improve storage efficiency. This technology allows the host to direct data to different physical storage units based on the data's access characteristics, thereby improving write bandwidth and reducing write amplification. However, as application scenarios become more complex, users may need to switch between different configuration modes, such as between standard disk mode and FDP mode, or adjust between different resource unit sizes within an FDP. This dynamic configuration requirement poses new challenges to firmware architecture and resource management mechanisms.
[0003] Several technical approaches exist in the industry for implementing FDP configuration switching. One typical solution employs a firmware slot management mechanism, where multiple firmware storage areas are pre-defined within the solid-state drive (SSD), each carrying a specific FDP configuration mode. When the system needs to switch to the target mode, the corresponding firmware version must be reloaded into the non-volatile memory to complete the environment switch. While this approach enables dynamic configuration to some extent, its reliance on the storage and scheduling of multiple independent firmware packages significantly increases the consumption of non-volatile storage space, raises hardware costs, and may introduce additional latency during firmware loading, affecting switching response speed.
[0004] Another feasible approach is to use a single firmware package to support multiple FDP configuration modes. While this solution alleviates storage resource pressure to some extent, it still has significant drawbacks during actual switching. Specifically, when the system switches between different FDP modes, a system reset operation must be performed to reinitialize hardware resources and rebuild the logical-to-physical address mapping. This reset process causes the connection between the device and the host to be interrupted during the switch, i.e., a "disconnection," which affects business continuity and user experience. In addition, resource reconstruction during the reset process may not fully retain some critical operational data, such as error logs and media wear information, further reducing system reliability and data management capabilities. Summary of the Invention
[0005] This invention provides a method, apparatus, computer device, and storage medium for fast switching of FDP configuration for SSDs, aiming to solve at least one of the technical problems mentioned in the background art.
[0006] In a first aspect, embodiments of the present invention provide a method for fast switching of FDP configuration for SSDs, comprising: Receive a configuration switching instruction from the host, the configuration switching instruction being used to indicate enabling, disabling, or changing the configuration of Flexible Data Placement (FDP), the configuration switching instruction including target FDP configuration information; In response to the configuration switching command, the target FDP configuration information is saved to a preset non-volatile memory; Collect critical runtime data from the solid-state drive and temporarily store the critical runtime data in the non-volatile memory; The solid-state drive (SSD) is put into a preset initialization mode. In the initialization mode, the hardware and software resources of the SSD are re-initialized according to the target FDP configuration information to complete the FDP configuration switch. During the re-initialization process, the communication connection between the SSD and the host is maintained. After the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized SSD.
[0007] A further technical solution is that the method further includes: Receives identification commands from the host and returns information indicating support for FDP functionality; and Receive a command to retrieve log pages from the host and return a list of all FDP configurations supported by the solid-state drive. The list of FDP configurations includes the following information: the size of the resource unit (RU), the RU index, and the garbage collection (GC) mode.
[0008] A further technical solution is that the target FDP configuration information includes the FDP enable state and the FDP index value.
[0009] A further technical solution is that the runtime key data includes error logs, intelligent information, and physical block wear values.
[0010] A further technical solution is that the re-initialization of the hardware and software resources of the solid-state drive based on the target FDP configuration information includes: Based on the RU size indicated by the target FDP configuration information, the mapping relationship between resource physical block number and physical block is re-established.
[0011] A further technical solution is that the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information further includes at least one of the following steps: Reallocate memory resources; Rebuild the database table indexed by the resource physical block number; Configure the number and attribute information of RUs; Allocate XOR and P2L resources for a single RU; and Reinitialize the search structure and list management structure in the GC process.
[0012] A further technical solution is that if the FDP enable status indication of the target FDP configuration information is not enabled, the initialization is performed according to the preset standard disk mode process; if the FDP enable status indication of the target FDP configuration information is enabled, the step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information is executed.
[0013] Secondly, embodiments of the present invention also provide an SSD FDP configuration fast switching device, which includes a unit for performing the above-described method.
[0014] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0016] This invention provides a method, apparatus, computer device, and storage medium for fast FDP configuration switching of an SSD. The method includes: receiving a configuration switching instruction from a host, the instruction indicating whether to enable, disable, or change the Flexible Data Placement (FDP) configuration, the instruction including target FDP configuration information; in response to the instruction, saving the target FDP configuration information to a preset non-volatile memory; collecting runtime critical data of the SSD and temporarily saving the runtime critical data to the non-volatile memory; putting the SSD into a preset initialization mode, in which the hardware and software resources of the SSD are re-initialized according to the target FDP configuration information to complete the FDP configuration switching; wherein, during the re-initialization process, the communication connection between the SSD and the host is maintained; and after the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized SSD. This invention achieves a complete closed-loop FDP configuration switching scheme by receiving a host instruction, saving the target configuration and critical data to non-volatile memory, entering a dedicated initialization mode for dynamic resource reconstruction, and restoring critical data while maintaining a connection with the host throughout the process. This solution enables seamless switching between standard disk and FDP modes, as well as between different FDP configurations, without interrupting business operations or requiring multiple firmware packages. At the same time, through power loss protection and data recovery mechanisms, it ensures configuration reliability, continuity of historical status, and integrity of device lifespan management, significantly improving the efficiency and robustness of solid-state drives in adaptive storage optimization. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating the fast switching method for FDP configuration of SSD provided in an embodiment of the present invention; Figure 2 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0023] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0024] Please see Figure 1 This invention provides a method for fast switching of SSD FDP configuration, achieving efficient, reliable, and user-unobtrusive configuration switching. Specifically, the method includes the following steps: S1, Receive a configuration switching instruction from the host, the configuration switching instruction including target FDP configuration information. The configuration switching instruction is used to indicate enabling, disabling, or changing the Flexible Data Placement (FDP) configuration. In practice, receiving configuration switching commands from the host establishes a dynamic configuration management channel between the host and the SSD. This allows the host to flexibly instruct the SSD to enable, disable, or change its Flexible Data Placement (FDP) configuration based on real-time workload changes or application requirements. This enables on-demand allocation of storage resources, realizing a shift from fixed to adaptive configuration. For example, when the business scenario changes from random read / write intensive to sequential write intensive, the system administrator can issue commands to adjust the FDP configuration to parameters more suitable for large-block continuous writes, thereby optimizing the storage strategy during system operation without downtime or physical intervention.
[0025] In some preferred embodiments, the configuration switching instruction is the Set Feature command in the NVMe protocol.
[0026] In practice, the configuration switching command is specifically limited to the Set Feature command in the NVMe protocol. This fully leverages the mature framework of existing industry standard protocols, enabling this fast switching method to be seamlessly integrated into the current mainstream NVMe ecosystem. It eliminates the need for installing additional dedicated drivers on the host side or modifying the underlying communication protocol, significantly reducing deployment and compatibility costs. The Set Feature command itself is a standard mechanism in the NVMe protocol for dynamically configuring controller parameters. Using this command to transmit FDP configuration information means that the switching request can be standardized and parsed, ensuring the reliability and interoperability of command execution.
[0027] In some preferred embodiments, the method further includes the steps of: receiving an identification command from the host and returning information indicating support for FDP functionality; and receiving a log page retrieval command from the host and returning a list of all FDP configurations supported by the solid-state drive.
[0028] In practice, by receiving identification commands and returning information indicating support for FDP (Fulfilled Power Delivery), the solid-state drive (SSD) proactively announces its capability set to the host. This allows the host to intelligently determine whether the current device meets the prerequisites for subsequent configuration operations, avoiding errors or anomalies that might occur from sending invalid commands to devices that do not support FDP, thereby improving the robustness of system interaction.
[0029] Furthermore, by receiving the command to retrieve the log page and returning a list of all supported FDP configurations, a comprehensive and precise menu of configuration options is provided to the host. This allows users or management software to make informed choices from the known and available set of configurations based on actual application needs, rather than blindly trying parameters that may not be supported, fundamentally eliminating switchover failures caused by configuration mismatches.
[0030] In some preferred embodiments, the list of FDP configurations includes the following information: the size of the resource unit (RU), the RU index, and the garbage collection (GC) mode.
[0031] In practice, by clarifying the specific information contained in the FDP configuration list, FDP configuration can more accurately adapt to diverse application scenarios and performance requirements. The size information of the Resource Unit (RU) allows the host to select the most appropriate storage granularity based on data access characteristics (such as IO size, random or sequential access patterns). For example, database applications with a large number of small IOs may choose a smaller RU size to improve space utilization, while large files with streaming writes may choose a larger RU size to improve sequential write performance. The provision of RU indexes allows the host to directly specify or identify specific physical resource units, enabling higher-level data placement strategies (such as placing hot data in RUs of specific performance levels). The garbage collection (GC) mode option gives the host the ability to intervene in the maintenance behavior of the underlying storage media. It allows for the selection of GC strategies with different levels of aggressiveness based on different requirements for latency sensitivity or throughput, thereby achieving the best balance between write amplification, performance fluctuations, and space reclamation efficiency.
[0032] By providing these key parameters, the solution defined in this embodiment partially hands over control of storage resources to the host side, which has a better understanding of data semantics. This transforms the solid-state drive from a passive storage device into an intelligent entity that can actively participate in data layout management, ultimately achieving the comprehensive effect of improving overall system performance, reducing write amplification, and extending device lifespan.
[0033] In some preferred embodiments, the target FDP configuration information includes the FDP enable state and the FDP index value.
[0034] In practice, the FDP enable state serves as a flag, clearly defining whether the SSD needs to operate in standard disk mode or FDP mode. This is the fundamental basis for selecting any resource initialization path. The FDP index value acts as an efficient pointer, using a short identifier to associate with and trigger a complete set of predefined, complex resource configuration parameters (such as RU size, GC mode, etc.). This avoids the tedious transmission of all detailed parameters in the switching command, greatly improving the efficiency of command transmission and processing. The index value corresponds one-to-one with the FDP configuration supported by the SSD (pre-stored in the SSD). For example, when the host wants to switch from FDP mode A to FDP mode B, it only needs to keep the enable state at "1" and update the index value in the command; when it needs to completely disable the FDP function and return to standard disk mode, it only needs to set the enable state to "0". This design not only reduces the complexity of command parsing but also makes configuration management more flexible and reliable, ensuring that the SSD can unambiguously determine the target operating state based on these two key metadata pieces of information and drive the subsequent resource re-initialization process in the correct direction.
[0035] In some preferred embodiments of the present invention, if the FDP enable status indication of the target FDP configuration information is not enabled, initialization is performed according to the preset standard disk mode process; if the FDP enable status indication of the target FDP configuration information is enabled, the step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information is executed.
[0036] In practice, when the FDP enable status indicator is disabled, the system initializes according to the preset standard disk mode process. This means that the SSD will revert to the traditional, non-FDP resource management method, such as using a unified global mapping table instead of a mapping structure divided by RU. This path selection avoids performing unnecessary complex initialization steps when FDP functionality is not needed, saves switching time, and ensures performance and compatibility in standard disk mode.
[0037] Furthermore, when the enable status is enabled, the system performs a step of re-initializing the hardware and software resources according to the target FDP configuration information, i.e., entering the refined FDP resource configuration process described in the preceding claims. This branching mechanism based on explicit status flags allows the same set of firmware code to gracefully handle two completely different working modes and the switching between them, greatly simplifying the design complexity and maintenance cost of the firmware architecture. It ensures that regardless of the direction of the switch (from standard disk to FDP, from FDP to standard disk, or between different FDP configurations), its core decision logic and process framework remain consistent, with branches only generated in execution details based on the enable status and index value.
[0038] S2, in response to the configuration switching instruction, save the target FDP configuration information to a preset non-volatile memory.
[0039] In practice, responding to configuration switching commands and saving the target FDP configuration information to a preset non-volatile memory provides crucial fault tolerance and state persistence for the entire switching process. This operation transforms instantaneous command information into persistently stored state records, forming an effective power-loss protection mechanism. Its technical value lies in the fact that even if the subsequent initialization process is interrupted by an unexpected power outage, the solid-state drive can still accurately recover the switching process or maintain configuration consistency by reading the target configuration information stored in the non-volatile memory after power is restored. This avoids configuration loss or system state chaos caused by unexpected situations, significantly improving the robustness and reliability of the entire switching process.
[0040] S3, collect the runtime key data of the solid-state drive and temporarily save the runtime key data to the non-volatile memory.
[0041] In practice, critical runtime data from the solid-state drive (SSD) is collected and temporarily stored in non-volatile memory, ensuring the continuity and integrity of system status information. Critical runtime data, such as error logs, health status information, and physical block wear values, carries important status information accumulated over long-term operation. By proactively saving this data before major configuration changes, the loss of historical data due to resource reinitialization is effectively prevented. This is particularly important for maintaining the continuity of device lifecycle management. For example, complete wear value records are the basis for wear leveling algorithms to make accurate decisions, while continuous error logs provide a complete data chain for subsequent fault diagnosis, thereby ensuring the long-term stable operation and maintainability of the device.
[0042] In some preferred embodiments, the runtime critical data includes error logs, intelligence information, and physical block wear values.
[0043] In practice, the specific types of critical data during runtime were clearly defined, and the core data assets that are most easily lost and have extremely high reconstruction costs during FDP configuration switching were protected in a targeted manner, thereby comprehensively maintaining the reliability, health monitoring and long service life of solid-state drives.
[0044] The preservation and recovery of error logs ensures the continuity of records for any anomalies or malfunctions that occur before and after the switch, providing a continuous historical data chain for system fault diagnosis and root cause analysis. This avoids the problem of being unable to track intermittent errors due to log loss. The retention of SMART Info maintains the continuity of device health status monitoring. Key indicators such as power-on time, total read / write volume, and number of bad blocks are accumulated rather than reset after the switch. This allows users or monitoring systems to accurately assess the remaining lifespan and performance trends of the SSD based on complete historical data, making timely data backup or device replacement decisions. Particularly important is the preservation of physical block wear values. This data directly reflects the number of erases and writes to each physical block in the NAND flash memory chip and is the most important basis for garbage collection and wear leveling algorithms. If wear values are lost during the switch, the wear leveling mechanism will fail, potentially leading to the frequent reuse of highly worn physical blocks, drastically accelerating the aging of local chips and ultimately shortening the overall lifespan of the SSD.
[0045] Therefore, by protecting the aforementioned specific runtime critical data, this embodiment ensures that the device's status awareness, lifespan management, and fault recovery capabilities are fully inherited after major configuration changes, thus guaranteeing the long-term durability and reliability of the product.
[0046] S4, the solid-state drive is put into a preset initialization mode. In the initialization mode, the hardware and software resources of the solid-state drive are re-initialized according to the target FDP configuration information to complete the FDP configuration switch. During the re-initialization process, the communication connection between the solid-state drive and the host is maintained. After the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized solid-state drive.
[0047] In practice, the solid-state drive (SSD) enters a preset initialization mode and reinitializes hardware and software resources according to the target FDP configuration information, achieving dynamic reconstruction and unified management of storage resources. This preset initialization mode, as a dedicated processing flow, can systematically reorganize and allocate memory resources, address mapping relationships, garbage collection management structures, etc., based on the target configuration information. This dynamic reconstruction capability allows the same firmware version to support multiple FDP configuration modes without relying on multiple independent firmware packages, saving storage space and simplifying system management. More importantly, this unified initialization framework ensures that different scenarios, such as switching from standard disk mode to FDP mode and between different FDP configurations, follow the same processing logic, greatly improving system maintainability and the consistency of switching operations.
[0048] It should be noted that the reason why the technical solution of this application does not need to rely on multiple independent firmware packages is that it innovatively transforms the switching of functional modes from a change at the firmware entity level to a process of parameterized configuration and dynamic resource reconfiguration based on the same firmware entity.
[0049] Specifically, in traditional solutions, different flexible data placement configurations require different complete firmware packages to support them. Each firmware package is an independent entity with fixed functions and pre-defined resource mapping relationships. Mode switching is essentially equivalent to replacing different firmware entities, which inevitably requires multiple complete firmware images to be stored in the storage medium in advance, resulting in high storage resource consumption, time-consuming switching processes, and service interruptions.
[0050] This application achieves mode switching by introducing a preset, unified initialization mode (e.g., FDP_CHANGE_MODE). This initialization mode is not a fixed, functional process, but rather a general logical framework that responds to external configuration parameters. The same firmware program contains all the common logic and processing modules required to support all potential FDP configurations. When mode switching is required, the target FDP configuration information sent by the host is not used to select which firmware package to load, but rather is passed as an input parameter to this unified initialization mode.
[0051] Subsequently, this initialization mode will dynamically drive the internal resource management logic of the firmware based on the target FDP configuration information, performing a reinitialization of hardware and software resources. This process includes, but is not limited to, rebuilding the mapping table according to the specified resource unit size, reallocating memory resources, and configuring garbage collection strategies. All operations are flexibly executed by the same set of firmware code based on different input parameters, thereby achieving different functional configurations at the logical resource level, rather than switching at the physical firmware image level.
[0052] Therefore, by adopting a mechanism of parameterized configuration and dynamic resource reconfiguration, this application enables a single firmware program to have the general ability to support multiple FDP configurations, fundamentally eliminating the dependence on multiple independent firmware packages, effectively saving storage space of non-volatile memory, and simplifying the complexity of system management and maintenance.
[0053] Furthermore, maintaining the communication connection between the SSD and the host during the re-initialization process directly improves system availability and user experience. Traditional solutions require a reset operation that temporarily takes the device offline, interrupting ongoing I / O operations. This step, by maintaining the connection, enables "hot switching." This means that in scenarios with extremely high continuity requirements, configuration optimization of the underlying storage devices can be performed without interrupting business operations, thus achieving transparency in storage resource adjustments and significantly improving the overall system service level.
[0054] Furthermore, after reinitialization, critical runtime data is restored to the reinitialized system, ensuring a smooth transition in system state management and the complete inheritance of historical information. This operation reloads temporarily stored key data such as device operating status and health information into the management system under the new configuration, maintaining the continuity and consistency of device status information before and after the configuration switch. This seamless transition ensures the normal operation of advanced management functions such as health status monitoring, lifespan prediction, and fault analysis, as these functions rely on long-term accumulated historical data. For example, after restoring complete wear value data, the garbage collection algorithm can continue to make balancing decisions based on accurate historical wear data, thereby maintaining the optimal performance of the solid-state drive and extending its lifespan.
[0055] In some preferred embodiments, the above step "reinitializing the hardware and software resources of the solid-state drive according to the target FDP configuration information" includes: re-establishing the mapping relationship between the resource physical block number (RPBN) and the physical block according to the RU size indicated by the target FDP configuration information.
[0056] In practice, the corresponding FDP configuration is determined based on the index value of the target FDP configuration information, and the mapping relationship between the resource physical block number (RPBN) and the physical block is re-established based on the RU size indicated by the FDP configuration.
[0057] In the FDP architecture, RPBN is a host-aware and addressable resource unit number, while a physical block is the actual storage space on the NAND flash memory medium. Different RU sizes (e.g., from small sizes corresponding to a few dies to large sizes corresponding to dozens of dies) inherently require different physical resource aggregation methods. By reconstructing the mapping between these two based on RU sizes, firmware can intelligently partition and allocate the capacity of the physical medium to logical RUs based on new configuration strategies. For example, when switching from a large RU size to a small RU size, the large physical block area originally mapped by one RPBN will be subdivided into multiple smaller, independent RPBN mapping units, allowing the host to place data more finely, improving the parallelism and space utilization of small IO writes. Conversely, when switching to a large RU size, multiple small physical block areas will be merged to serve one RPBN, which is more suitable for large block sequential writes. This dynamic reconfiguration capability of the mapping relationship allows the underlying physical resource layout of the solid-state drive to flexibly adapt to the data access patterns of upper-layer applications, thereby optimizing read and write performance, reducing access overhead across physical units, and enabling RU-based garbage collection and wear leveling strategies to be executed more effectively, ultimately achieving the goals of reducing write amplification, increasing bandwidth, and extending lifespan.
[0058] In some preferred embodiments, the above step "reinitializing the hardware and software resources of the solid-state drive according to the target FDP configuration information" further includes at least one of the following steps: reallocating memory resources; rebuilding the database table indexed by the resource physical block number; configuring the number and attribute information of RUs; allocating XOR resources and P2L resources for a single RU; and reinitializing the search structure and list management structure in the GC process.
[0059] In practice, the reallocation of memory resources ensures that core data structures such as mapping table caches and command queues can obtain just the right amount of memory space based on the new RU size and number, avoiding both resource waste and performance jitter caused by insufficient memory. Rebuilding the database tables indexed by RPBN is the foundation for constructing a new logical-to-physical address translation system, directly determining the addressing efficiency and accuracy of host I / O requests. Configuring the number and attribute information of RUs is the process of establishing management metadata for the FDP function, enabling the firmware to accurately track and manage the status of each resource unit. Allocating XOR and P2L resources for individual RUs is a dedicated configuration for the computing and storage resources required for RAID-like data protection (XOR checksum) and physical-to-logical mapping, ensuring data reliability and that the address translation function remains effective under the new resource partitioning. Reinitializing the search structure and list management structure in the GC process allows the core background task of garbage collection to adapt to the new physical layout. For example, the GC algorithm needs to know which blocks are invalid and which are reclaimable under the new RU partitioning, and how to efficiently organize the collection task. The steps covered in this embodiment work together to enable the firmware, memory management, media management, garbage collection and other subsystems of the solid-state drive to adapt to the changes in FDP configuration synchronously and in a coordinated manner, thereby achieving a comprehensive and seamless switch from the underlying physical resources to the upper-level management logic, ensuring the stability and predictability of system performance after the switch.
[0060] This invention proposes a method for fast FDP configuration switching of an SSD, comprising: receiving a configuration switching command from a host, the configuration switching command indicating whether to enable, disable, or change the configuration of Flexible Data Placement (FDP), the configuration switching command including target FDP configuration information; in response to the configuration switching command, saving the target FDP configuration information to a preset non-volatile memory; collecting runtime critical data of the SSD and temporarily saving the runtime critical data to the non-volatile memory; causing the SSD to enter a preset initialization mode, in which the hardware and software resources of the SSD are re-initialized according to the target FDP configuration information to complete the FDP configuration switching; wherein, during the re-initialization process, the communication connection between the SSD and the host is maintained; and after the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized SSD. This invention achieves a complete closed-loop FDP configuration switching scheme by receiving host commands, saving the target configuration and critical data to non-volatile memory, entering a dedicated initialization mode for dynamic resource reconstruction, and restoring critical data while maintaining a connection with the host throughout the process. This solution enables seamless switching between standard disk and FDP modes, as well as between different FDP configurations, without interrupting business operations or requiring multiple firmware packages. At the same time, through power loss protection and data recovery mechanisms, it ensures configuration reliability, continuity of historical status, and integrity of device lifespan management, significantly improving the efficiency and robustness of solid-state drives in adaptive storage optimization.
[0061] Corresponding to the above-described method for fast FDP configuration switching of SSDs, this invention also provides an apparatus for fast FDP configuration switching of SSDs. This apparatus includes a unit for executing the above-described method for fast FDP configuration switching of SSDs, and can be configured in terminals such as desktop computers, tablet computers, and laptops. Specifically, the apparatus includes: A receiving unit is configured to receive a configuration switching instruction from a host, the configuration switching instruction being used to indicate enabling, disabling, or changing the configuration of Flexible Data Placement (FDP), the configuration switching instruction including target FDP configuration information; A storage unit is configured to, in response to the configuration switching instruction, save the target FDP configuration information to a preset non-volatile memory; A collection unit is used to collect runtime critical data from the solid-state drive and temporarily store the runtime critical data in the non-volatile memory; The configuration unit is used to put the solid-state drive into a preset initialization mode. In the initialization mode, the hardware and software resources of the solid-state drive are re-initialized according to the target FDP configuration information to complete the FDP configuration switch. During the re-initialization process, the communication connection between the solid-state drive and the host is maintained. After the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized solid-state drive.
[0062] In some preferred embodiments, the SSD's FDP configuration fast switching device further includes: The return unit is used to receive an identification command from the host and return information indicating support for FDP functionality; and to receive a log page retrieval command from the host and return a list of all FDP configurations supported by the solid-state drive, wherein the list of FDP configurations includes the following information: the size of the resource unit (RU), the RU index, and the garbage collection (GC) mode.
[0063] In some preferred embodiments, the target FDP configuration information includes the FDP enable state and the FDP index value.
[0064] In some preferred embodiments, the runtime critical data includes error logs, intelligence information, and physical block wear values.
[0065] In some preferred embodiments, the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information includes: Based on the RU size indicated by the target FDP configuration information, the mapping relationship between resource physical block number and physical block is re-established.
[0066] In some preferred embodiments, the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information further includes at least one of the following steps: Reallocate memory resources; Rebuild the database table indexed by the resource physical block number; Configure the number and attribute information of RUs; Allocate XOR and P2L resources for a single RU; and Reinitialize the search structure and list management structure in the GC process.
[0067] In some preferred embodiments, if the FDP enable status indication of the target FDP configuration information is not enabled, initialization is performed according to the preset standard disk mode process; if the FDP enable status indication of the target FDP configuration information is enabled, the step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information is executed.
[0068] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the FDP configuration fast switching device and each unit of the above-mentioned SSD can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0069] The aforementioned SSD's FDP configuration fast switching device can be implemented as a computer program, which can, for example... Figure 2 It runs on the computer device shown.
[0070] Please see Figure 2 , Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0071] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0072] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to perform a fast FDP configuration switching method for the SSD.
[0073] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0074] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a fast FDP configuration switching method for an SSD.
[0075] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0076] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: Receive a configuration switching instruction from the host, the configuration switching instruction being used to indicate enabling, disabling, or changing the configuration of Flexible Data Placement (FDP), the configuration switching instruction including target FDP configuration information; In response to the configuration switching command, the target FDP configuration information is saved to a preset non-volatile memory; Collect critical runtime data from the solid-state drive and temporarily store the critical runtime data in the non-volatile memory; The solid-state drive (SSD) is put into a preset initialization mode. In the initialization mode, the hardware and software resources of the SSD are re-initialized according to the target FDP configuration information to complete the FDP configuration switch. During the re-initialization process, the communication connection between the SSD and the host is maintained. After the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized SSD.
[0077] In some preferred embodiments, the method further includes: Receives identification commands from the host and returns information indicating support for FDP functionality; and Receive a command to retrieve log pages from the host and return a list of all FDP configurations supported by the solid-state drive. The list of FDP configurations includes the following information: the size of the resource unit (RU), the RU index, and the garbage collection (GC) mode.
[0078] In some preferred embodiments, the target FDP configuration information includes the FDP enable state and the FDP index value.
[0079] In some preferred embodiments, the runtime critical data includes error logs, intelligence information, and physical block wear values.
[0080] In some preferred embodiments, the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information includes: Based on the RU size indicated by the target FDP configuration information, the mapping relationship between resource physical block number and physical block is re-established.
[0081] In some preferred embodiments, the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information further includes at least one of the following steps: Reallocate memory resources; Rebuild the database table indexed by the resource physical block number; Configure the number and attribute information of RUs; Allocate XOR and P2L resources for a single RU; and Reinitialize the search structure and list management structure in the GC process.
[0082] In some preferred embodiments, if the FDP enable status indication of the target FDP configuration information is not enabled, initialization is performed according to the preset standard disk mode process; if the FDP enable status indication of the target FDP configuration information is enabled, the step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information is executed.
[0083] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0084] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0085] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: Receive a configuration switching instruction from the host, the configuration switching instruction being used to indicate enabling, disabling, or changing the configuration of Flexible Data Placement (FDP), the configuration switching instruction including target FDP configuration information; In response to the configuration switching command, the target FDP configuration information is saved to a preset non-volatile memory; Collect critical runtime data from the solid-state drive and temporarily store the critical runtime data in the non-volatile memory; The solid-state drive (SSD) is put into a preset initialization mode. In the initialization mode, the hardware and software resources of the SSD are re-initialized according to the target FDP configuration information to complete the FDP configuration switch. During the re-initialization process, the communication connection between the SSD and the host is maintained. After the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized SSD.
[0086] In some preferred embodiments, the method further includes: Receives identification commands from the host and returns information indicating support for FDP functionality; and Receive a command to retrieve log pages from the host and return a list of all FDP configurations supported by the solid-state drive. The list of FDP configurations includes the following information: the size of the resource unit (RU), the RU index, and the garbage collection (GC) mode.
[0087] In some preferred embodiments, the target FDP configuration information includes the FDP enable state and the FDP index value.
[0088] In some preferred embodiments, the runtime critical data includes error logs, intelligence information, and physical block wear values.
[0089] In some preferred embodiments, the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information includes: Based on the RU size indicated by the target FDP configuration information, the mapping relationship between resource physical block number and physical block is re-established.
[0090] In some preferred embodiments, the reinitialization of the solid-state drive's hardware and software resources based on the target FDP configuration information further includes at least one of the following steps: Reallocate memory resources; Rebuild the database table indexed by the resource physical block number; Configure the number and attribute information of RUs; Allocate XOR and P2L resources for a single RU; and Reinitialize the search structure and list management structure in the GC process.
[0091] In some preferred embodiments, if the FDP enable status indication of the target FDP configuration information is not enabled, initialization is performed according to the preset standard disk mode process; if the FDP enable status indication of the target FDP configuration information is enabled, the step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information is executed.
[0092] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0093] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0094] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0095] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0096] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0097] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0098] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0099] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for fast switching of FDP configuration for SSDs, characterized in that, include: Receive a configuration switching instruction from the host, the configuration switching instruction including target FDP configuration information; In response to the configuration switching command, the target FDP configuration information is saved to a preset non-volatile memory; Collect critical runtime data from the solid-state drive and temporarily store the critical runtime data in the non-volatile memory; The solid-state drive (SSD) is put into a preset initialization mode. In the initialization mode, the hardware and software resources of the SSD are re-initialized according to the target FDP configuration information to complete the FDP configuration switch. During the re-initialization process, the communication connection between the SSD and the host is maintained. After the re-initialization is completed, the runtime critical data is restored to the system of the re-initialized SSD.
2. The method for fast switching of FDP configuration of SSD according to claim 1, characterized in that, The method further includes: Receives an identification command from the host and returns information indicating support for FDP functionality; and Receive a command to retrieve log pages from the host and return a list of all FDP configurations supported by the solid-state drive. The list of FDP configurations includes the following information: the size of the resource unit (RU), the RU index, and the garbage collection (GC) mode.
3. The method for fast switching of SSD FDP configuration according to claim 1, characterized in that, The target FDP configuration information includes the FDP enable status and the FDP index value.
4. The method for fast switching of SSD FDP configuration according to claim 1, characterized in that, The key runtime data includes error logs, intelligence information, and physical block wear values.
5. The method for fast switching of SSD FDP configuration according to claim 1, characterized in that, The step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information includes: Based on the RU size indicated by the target FDP configuration information, the mapping relationship between resource physical block number and physical block is re-established.
6. The method for fast switching of FDP configuration of SSD according to claim 5, characterized in that, The step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information further includes at least one of the following steps: Reallocate memory resources; Rebuild the database table indexed by the resource physical block number; Configure the number and attribute information of RUs; Allocate XOR and P2L resources for a single RU; as well as Reinitialize the search structure and list management structure in the GC process.
7. The method for fast switching of FDP configuration of SSD according to claim 3, characterized in that, If the FDP enable status indicator of the target FDP configuration information is not enabled, the initialization is performed according to the preset standard disk mode process; if the FDP enable status indicator of the target FDP configuration information is enabled, the step of re-initializing the hardware and software resources of the solid-state drive according to the target FDP configuration information is executed.
8. A fast FDP configuration switching device for SSDs, characterized in that, Includes a unit for performing the method as described in any one of claims 1-7.
9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.