Host command processing system and method, storage device and electronic device
By differentiating data migration command types and employing different descriptor conversion strategies, the problem of wasted resources in solid-state drive controllers is solved, and the response efficiency of data migration commands and the utilization efficiency of hardware resources are improved.
Patent Information
- Application Number
- CN202511247378.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-12-05
AI Technical Summary
In existing technologies, solid-state drive controllers waste resources when converting DMA descriptors, resulting in low response efficiency for data transfer commands.
By introducing a command acquisition module, a first descriptor conversion module, and a second descriptor conversion module, the system distinguishes between descriptor omission conversion commands based on the type of data migration command and uses different conversion strategies to generate target descriptors, thus avoiding resource waste.
It improves the conversion efficiency of DMA descriptors, enhances the response efficiency of data transfer commands, optimizes hardware resource utilization, and extends the lifespan of storage devices.
Smart Images

Figure CN121070280A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a host command processing system and method, a storage device, and an electronic device. BACKGROUND
[0002] With the continuous development of solid state disk technology, the solid state disk implements offloading of a data migration task from a host end to a solid state disk controller to release the computing power of the host end. In the interaction process between the solid state disk controller and the host end, the solid state disk controller obtains a data migration command of the host end, converts the data migration command into a direct memory access (DMA) descriptor, and finally performs corresponding data migration between the host end and the solid state disk according to the DMA descriptor by a DMA controller.
[0003] However, since the data migration command issued by the host end has multiple types, and the current solid state disk controller converts the corresponding DMA descriptor in a fixed descriptor conversion mode, if the data migration command can omit the conversion of part of the DMA descriptor, the solid state disk controller will also convert the part that can be omitted, causing waste of DMA descriptor conversion resources, reducing the conversion efficiency of the DMA descriptor, and thus reducing the response efficiency of the data migration command. SUMMARY
[0004] The present application provides a host command processing system and method, a storage device, and an electronic device to at least solve the problem of waste of DMA descriptor conversion resources, reduction of the conversion efficiency of the DMA descriptor, and thus reduction of the response efficiency of the data migration command in the related art.
[0005] The present application provides a host command processing system, comprising: a command acquisition module, a first descriptor conversion module, a second descriptor conversion module, and a command response module, wherein the command acquisition module is connected to a host end through a bus;
[0006] The command acquisition module is configured to acquire a data migration command issued by the host end through the bus, analyze the command type of the data migration command to determine whether the data migration command is a descriptor omission conversion command, send the data migration command to the first descriptor conversion module in the case where the data migration command is the descriptor omission conversion command, and send the data migration command to the second descriptor conversion module in the case where the data migration command is not the descriptor omission conversion command;
[0007] The first descriptor conversion module is configured to convert the data migration command into a target descriptor according to a preset descriptor omission conversion strategy when the data migration command is obtained, and transmit the target descriptor to the command response module;
[0008] The second descriptor conversion module is configured to convert the data migration command into a target descriptor according to a preset descriptor complete conversion strategy when the data migration command is obtained, and transmit the target descriptor to the command response module.
[0009] The command response module is configured to perform corresponding data migration according to the obtained target descriptor.
[0010] The application further provides a host command processing method, comprising:
[0011] obtaining a data migration command issued by a host end;
[0012] analyzing a command type of the data migration command to determine whether the data migration command is a descriptor omission conversion command;
[0013] in a case where the data migration command is the descriptor omission conversion command, sending the data migration command to a first descriptor conversion module to convert the data migration command into a target descriptor based on the first descriptor conversion module according to a preset descriptor omission conversion strategy;
[0014] in a case where the data migration command is not the descriptor omission conversion command, sending the data migration command to a second descriptor conversion module to convert the data migration command into a target descriptor based on the second descriptor conversion module according to a preset descriptor complete conversion strategy;
[0015] performing corresponding data migration according to the target descriptor.
[0016] The application further provides a storage device, comprising any of the above host command processing systems.
[0017] The application further provides an electronic device, comprising a memory configured to store a computer program, and a processor configured to execute the computer program to implement the steps of any of the above host command processing methods.
[0018] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the above host command processing methods.
[0019] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of any of the above host command processing methods.
[0020] According to the application, the data migration task is distinguished from the conversion of the DMA descriptor which can be omitted according to the command type of the data migration command, if yes, the first descriptor conversion module converts the data migration command into the target descriptor according to the preset descriptor omission conversion strategy, so as to avoid the waste of the DMA descriptor conversion resource of the solid state disk controller and improve the conversion efficiency of the DMA descriptor, and lay a foundation for improving the response efficiency of the data migration command. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described in the following are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 The interaction flow diagram of the host command processing system provided by the embodiments of the present application is shown.
[0023] Figure 2 The structural diagram of the exemplary host command processing system provided by the embodiments of the present application is shown.
[0024] Figure 3 The structural diagram of the command acquisition module provided by the embodiments of the present application is shown.
[0025] Figure 4 The flow diagram of the host command processing method provided by the embodiments of the present application is shown.
[0026] Figure 5 The structural diagram of the storage device provided by the embodiments of the present application is shown.
[0027] Figure 6 The structural diagram of the electronic device provided by the embodiments of the present application is shown. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0029] It should be noted that in the description of the present application, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or apparatus including a series of elements includes not only those elements, but also other elements not explicitly listed, or further includes elements inherent in such a process, method, article or apparatus. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0030] Taking an NVMe solid state disk (NVME SSD) as an example, the NVME SSD greatly releases the CPU computing power by offloading the data transfer task from the CPU to the NVME controller, and the DMA performing the transfer task becomes the key. In the interaction between the NVME and the host end Host, the command (admin / IO) is taken out from the SQ queue Host command, and the command is converted into a dma descriptor (DMA descriptor) to drive the dma to actively transfer data from or to the Host, and the generation efficiency of the dma descriptor and the placement position of the data are important links to improve the data transfer efficiency of the NVME SSD and prolong the service life of the storage device.
[0031] In the related art, in the interaction process with the host end, the solid state disk controller obtains the data transfer command of the host end, and converts the data transfer command into a direct memory access (Direct Memory Access, DMA) descriptor, and finally the DMA controller performs corresponding data transfer between the host end and the solid state disk according to the DMA descriptor.
[0032] However, since the data transfer command issued by the host end has multiple types, and the current solid state disk controller converts the corresponding DMA descriptor in a fixed descriptor conversion mode, if the data transfer command can omit part of the DMA descriptor conversion, the solid state disk controller will also convert the omitted part, causing waste of DMA descriptor conversion resources, reducing the conversion efficiency of the DMA descriptor, and also reducing the response efficiency of the data transfer command.
[0033] To solve the above technical problems, the embodiment of the present application provides a host command processing system, method, storage device and electronic device, the system comprises: a command acquisition module, a first descriptor conversion module, a second descriptor conversion module and a command response module, wherein the command acquisition module is connected with the host end through a bus; the command acquisition module is used for acquiring the data movement command issued by the host end through the bus, analyzing the command type of the data movement command to determine whether the data movement command is a descriptor omission conversion command, in the case of the data movement command being the descriptor omission conversion command, the data movement command is sent to the first descriptor conversion module, in the case of the data movement command not being the descriptor omission conversion command, the data movement command is sent to the second descriptor conversion module; the first descriptor conversion module is used for converting the data movement command into a target descriptor according to a preset descriptor omission conversion strategy when the data movement command is obtained, and transmitting the target descriptor to the command response module; the second descriptor conversion module is used for converting the data movement command into a target descriptor according to a preset descriptor complete conversion strategy when the data movement command is obtained, and transmitting the target descriptor to the command response module; the command response module is used for performing corresponding data movement according to the obtained target descriptor. The system provided by the above scheme can distinguish whether the data movement task is the conversion of the omitted part of the DMA descriptor according to the command type of the data movement command, if yes, the first descriptor conversion module converts the data movement command into a target descriptor according to a preset descriptor omission conversion strategy, so as to avoid wasting the DMA descriptor conversion resources of the solid state disk controller, and at the same time improve the conversion efficiency of the DMA descriptor, which lays a foundation for improving the response efficiency of the data movement command.
[0034] In order for those skilled in the art to better understand the scheme of the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0035] The embodiment of the present application provides a host command processing system, which is used for responding to the data movement command of the host end and the like.
[0036] As shown in Figure 1 , it is an interactive flow diagram of the host command processing system provided by the embodiment of the present application, and the system comprises: a command acquisition module, a first descriptor conversion module, a second descriptor conversion module and a command response module, wherein the command acquisition module is connected with the host end through a bus.
[0037] The command acquisition module is configured to acquire the data migration command issued by the host end through the bus, analyze the command type of the data migration command, determine whether the data migration command is a descriptor omission conversion command, send the data migration command to the first descriptor conversion module in the case where the data migration command is the descriptor omission conversion command, and send the data migration command to the second descriptor conversion module in the case where the data migration command is not the descriptor omission conversion command; the first descriptor conversion module is configured to convert the data migration command into a target descriptor according to a preset descriptor omission conversion strategy when the data migration command is obtained, and transmit the target descriptor to the command response module; the second descriptor conversion module is configured to convert the data migration command into a target descriptor according to a preset descriptor complete conversion strategy when the data migration command is obtained, and transmit the target descriptor to the command response module; and the command response module is configured to perform corresponding data migration according to the obtained target descriptor.
[0038] It should be noted that the embodiment of the present application adds the judgment of the command type in the related art, analyzes the command type of the data migration command by using the command acquisition module, and then determines whether the data migration command is a descriptor omission conversion command according to the command type. The descriptor omission conversion command refers to a part that can be omitted in the conversion of the DMA descriptor (target descriptor), that is, the target descriptor obtained by the conversion of the descriptor omission conversion command is a short format descriptor, and the demand for computing power and other resources is relatively low, so the conversion of the descriptor can be realized by the first descriptor conversion module. The first descriptor conversion module is a functional module newly added to the original solid state disk controller in the embodiment of the present application.
[0039] It should be further noted that if the data migration command is not the descriptor omission conversion command, the descriptor conversion process represented by the data migration command is relatively complex, and the target descriptor obtained by the conversion of the command is a long format descriptor, and the demand for computing power and other resources is relatively high, so the original DMA descriptor conversion architecture (the second descriptor conversion module) of the solid state disk controller can be used to convert the data migration command into a target descriptor according to a relatively complex preset descriptor complete conversion strategy.
[0040] Specifically, after obtaining the target descriptor, the command response module (DMA) controller completes corresponding data migration according to the target descriptor. The data migration includes data migration from the host end memory to the solid state disk and data migration from the solid state disk to the host end memory.
[0041] On the basis of the above-mentioned embodiment, as a kind of implementable mode, in an embodiment, command acquisition module includes:
[0042] The command submission queue acquisition unit is configured to acquire the data migration command from the command submission queue of the host end through the bus.
[0043] The command processing unit is configured to analyze the command type of the data movement command to determine whether the data movement command is the descriptor omission conversion command.
[0044] For example, as shown in Figure 2 As shown in the structural schematic diagram of the exemplary host command processing system provided by the embodiment of the present application, the system comprises a solid state disk controller main module (NVME), a solid state disk controller auxiliary module (NVME SUB), a local memory and a core processing unit (CPU). The solid state disk controller main module comprises a command acquisition module, a first descriptor conversion module and a command response module. The local memory and the core processing unit jointly constitute a second descriptor conversion module. The solid state disk controller main module further comprises a bus interface module (Axi_m_h) and a submission queue acquisition unit (SQ_Fetch). The submission queue acquisition unit (SQ_Fetch) acquires the data movement command from the command submission queue of the host end through the bus interface module (Axi_m_h), and then transmits the acquired data movement command to the command processing unit (CMD_handler). The command processing unit caches the analysis data (the type, format and parameters of the command and other information) of the data movement command to the command state buffer (CMD_status_buffer). When it is determined that the data movement command is the descriptor omission conversion command, the command processing unit transmits the data movement command to the first descriptor conversion module (CMD_desc_gen) through the multiplexer. When it is determined that the data movement command is not the descriptor omission conversion command, the command processing unit transmits the data movement command to the command storage module (CMDSTORE) through the multiplexer, so as to temporarily store the data movement command. The first descriptor conversion module acquires the data movement command value from the local memory through the SSD internal module communication interface (Axi_m_s), and then the core processing unit converts the data movement command into the DMA descriptor in the local memory. The first descriptor conversion module transmits the target descriptor to the command response module through the internal link, and the second descriptor conversion module transmits the target descriptor to the command response module through the APB bus interface (APB_Slv) by the core processing unit. Taking the data movement command as a write command as an example, the command response module moves the data to be written (the data to be transmitted according to the target descriptor) from the host end to the local memory. After the command response module completes the data movement, the completion queue (CQ) is updated, so as to enable the host end to query the command execution result.
[0045] Wherein, since the command issued by the host end is not limited to data migration command, but also includes a variety of admin commands (management command), complete queue includes firmware completion queue (fwcq), hardware completion queue (hwcq) and DMA completion queue (dmcq). Firmware completion queue is used to cache completed firmware configuration admin command, hardware completion queue is used to cache completed hardware configuration admin command, DMA completion queue is used to cache completed data migration command. Completion queue completer (cq_completor) is used to be responsible for the state information of the command execution completion after finishing the arrangement and putting into the corresponding completion queue.
[0046] Wherein, the system provided by the embodiment of the application realizes that on the basis of the original data carrying only long command descriptor, short command descriptor is added, the pressure of command processing is dispersed, hardware resources are efficiently utilized, the use of short command descriptor reduces unnecessary performance loss, more computing resources are saved for SSD local CPU, the use of short command descriptor speeds up the generation speed of descriptor, and the efficiency of command processing is improved, and when the number of NVME internal cache is not enough, target descriptor can be generated in local memory (local memory) with the help of local CPU, so that the processing of the command is more flexible and efficient.
[0047] Specifically, in an embodiment, the command processing unit can specifically analyze the classification characteristic information of the data migration command; determine the command type of the data migration command according to the classification characteristic information of the data migration command; in the case that the command type of the data migration command is an ordinary read-write command, determine that the data migration command is a descriptor omission conversion command; in the case that the command type of the data migration command is a target protection read-write command, determine that the data migration command is not a descriptor omission conversion command.
[0048] Wherein, the target protection read-write command at least increases the end-to-end data protection requirement compared with the ordinary read-write command.
[0049] Specifically, the command processing unit determines the command type of the data migration command by analyzing key parameters (classification feature information) related to protection requirements and function types, etc. in the data migration command. The classification feature information can be a command format defined by the NVMe protocol, such as: “e2e protection enable bit” in the command header (such as a specific bit of the dw10 register); “metadata address field” in the command parameter (if present, usually indicating that data verification is required); the range of the command opcode (to distinguish between normal read / write commands and target protection read / write commands). The normal read / write command only contains basic data transmission parameters and no additional protection configuration command; the target protection read / write command is a command that adds end-to-end data protection (e2e) related configuration based on the normal read / write command, i.e., requires a complete descriptor to carry verification information.
[0050] Specifically, in an embodiment, the first descriptor conversion module can specifically determine whether the local descriptor conversion remaining resources meet the descriptor conversion resource requirements of the data migration command when obtaining the data migration command; and in the case that the local descriptor conversion remaining resources meet the descriptor conversion resource requirements of the data migration command, convert the data migration command into a target descriptor according to a preset descriptor omission conversion strategy.
[0051] The local descriptor conversion remaining resources at least include a buffer ID (BID), which is a number used to identify and manage descriptor buffer space inside the NVMe controller (solid state disk controller).
[0052] Specifically, inside the NVMe controller, a BID management unit is provided to record the use state (free or occupied) of each BID. By tracking the use state of the BID, it can be clearly known how many cache resources are available for use, so as to reasonably arrange the descriptor conversion task.
[0053] Specifically, when the first descriptor conversion module obtains the data migration command, it first reads the information of the BID management unit inside the NVMe controller to check the number of free BIDs. At the same time, according to a preset rule, such as occupying one BID for generating one short format descriptor of a specific type, the number of BIDs required for processing the data migration command is evaluated to determine whether the local descriptor conversion remaining resources (i.e., the number of free BIDs) meet the resource requirements of this descriptor conversion.
[0054] If the number of idle BIDs is greater than or equal to the descriptor conversion resource requirement of the data migration command, it indicates that there is sufficient cache resource to process the command. At this time, the first descriptor conversion module performs a descriptor conversion operation according to a preset descriptor omission conversion strategy. The strategy is to remove the configuration fields related to end-to-end data protection (e2e) and other redundancies in the descriptor, and only keep the core fields such as data migration direction, data address and data length, so as to generate a short-format target descriptor, thereby improving the conversion speed of the descriptor and the processing efficiency of the data migration command.
[0055] Correspondingly, in an embodiment, the first descriptor conversion module is further configured to send the data migration command to the second descriptor conversion module if the local descriptor conversion remaining resource does not meet the descriptor conversion resource requirement of the data migration command.
[0056] Specifically, if the number of idle BIDs is less than the resource requirement, that is, the current cache resource is insufficient to support the fast generation of descriptors in the first descriptor conversion module. In this case, the first descriptor conversion module can send the data migration command to the second descriptor conversion module, generate a long-format target descriptor according to a preset descriptor complete conversion strategy by relying on local memory and local CPU (core processing unit), so as to ensure that the command can be normally processed by descriptor conversion, and further ensure that the data migration command can be normally responded.
[0057] As shown in FIG. 1, the first descriptor conversion module is connected with the command storage module through a multiplexer. When the first descriptor conversion module determines that the local descriptor conversion remaining resource does not meet the descriptor conversion resource requirement of the data migration command, the data migration command is transmitted to the command storage module, and then transmitted to the second descriptor conversion module. Figure 2
[0058] On the basis of the above-mentioned embodiments, as a kind of implementable mode, in an embodiment, the command acquisition module is further configured to:
[0059] In the case of the data migration command being a write command, it is judged whether the data migration command supports flexible data placement according to the write configuration information of the data migration command.
[0060] If the data migration command supports flexible data placement, the solid state disk controller stores the data to be written migrated in hot and cold partition storage after the command response module completes data migration.
[0061] It should be noted that flexible data placement (FDP) is an advanced feature introduced by the NVMe protocol, allowing the host to carry data type information in the write command, guiding the solid state disk SSD to store data with different characteristics to the most suitable flash memory area, to realize the partition storage of hot and cold data, which is beneficial to improve the utilization of storage resources and data access efficiency.
[0062] Specifically, as shown in Figure 3 The structure diagram of the command acquisition module provided by the embodiment of the application is shown. The command acquisition module includes a submission queue acquisition unit, a command processing unit, and a function checking unit. The submission queue acquisition unit, while transmitting the acquired host command (data migration command and admin command) to the command processing unit, also buffers the data migration command. The command processing unit distinguishes the host command into admin command and other I / O command through command analysis, and directly outputs the admin command and other I / O command to the corresponding processing unit. The embodiment of the application does not limit the processing unit to which the admin command and other I / O command are sent. The host command is also distinguished into normal read-write command and target protection read-write command. The normal read-write command and target protection read-write command can be sent to the function checking unit. The function checking unit performs annotation work of fdp function (flexible data placement function) by screening the write command in the obtained command. The function checking unit is used to analyze the DTYPE field of dw12 of the write command, to check the host end configuration. If the DTYPE field of dw12 is 02h, it means that the data migration command supports data fdp function. If the fdp function is not supported, then the DSPEC field of dw13 is checked to obtain the ruhid index, and the ruhid index is compared with the register value configured by the firmware. If the value is less than the register value configured by the firmware (fw), a valid signal is given to indicate that the data migration command supports flexible data placement and is valid, that is, the flexible data placement enablement is valid. If the function detection determines that the data migration command does not support data migration command or the flexible data placement enablement of the data migration command is invalid, but the host end configuration determines that the host end needs the flexible data placement function, the transmission of the data migration command is stopped. By integrating the function checking unit in the command acquisition module, the current system design is compatible with the latest NVME2.1 protocol, the write amplification of the solid state disk is reduced, the performance of the SSD is guaranteed, the safety of data storage is increased, and the service life of the SSD is prolonged.
[0063] The host command processing system provided by the embodiments of the present application comprises a command acquisition module, a first descriptor conversion module, a second descriptor conversion module and a command response module, wherein the command acquisition module is connected with the host end through a bus; the command acquisition module is configured to acquire a data movement command issued by the host end through the bus, analyze the command type of the data movement command to determine whether the data movement command is a descriptor omission conversion command, send the data movement command to the first descriptor conversion module in the case that the data movement command is the descriptor omission conversion command, and send the data movement command to the second descriptor conversion module in the case that the data movement command is not the descriptor omission conversion command; the first descriptor conversion module is configured to convert the data movement command into a target descriptor according to a preset descriptor omission conversion strategy when the data movement command is obtained, and transmit the target descriptor to the command response module; the second descriptor conversion module is configured to convert the data movement command into a target descriptor according to a preset descriptor complete conversion strategy when the data movement command is obtained, and transmit the target descriptor to the command response module; and the command response module is configured to perform corresponding data movement according to the obtained target descriptor. The system provided by the above scheme can distinguish whether the data movement task is the conversion of an omitted part of a DMA descriptor according to the command type of the data movement command, and if so, the first descriptor conversion module converts the data movement command into a target descriptor according to a preset descriptor omission conversion strategy, so as to avoid wasting of the DMA descriptor conversion resources of the solid state disk controller and improve the conversion efficiency of the DMA descriptor, thereby laying a foundation for improving the response efficiency of the data movement command. The generation path of the target descriptor of the short command (ordinary read / write command) is added on the basis of the original target descriptor generation, the time of read / write command data transmission is reduced, the efficiency of data storage location and data transmission is optimized, and the performance of NVME SSD data transmission is improved.
[0064] Those skilled in the art can clearly understand the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation.
[0065] The embodiments of the present application also provide a host command processing method for responding to data movement commands of a host end. The execution subject of the embodiments of the present application is an electronic device, such as a server, a desktop computer, a notebook computer, a tablet computer and other electronic devices that can be used to respond to host end commands.
[0066] As shown in Figure 4 the flowchart of the host command processing method provided by the embodiments of the present application, the method comprises:
[0067] In step 401, a data movement command issued by a host end is acquired.
[0068] In step 402, the command type of the data migration command is analyzed to determine whether the data migration command is a descriptor omission conversion command.
[0069] In step 403, in the case where the data migration command is a descriptor omission conversion command, the data migration command is sent to the first descriptor conversion module, so that the data migration command is converted into a target descriptor based on the first descriptor conversion module according to a preset descriptor omission conversion strategy.
[0070] In step 404, in the case where the data migration command is not a descriptor omission conversion command, the data migration command is sent to the second descriptor conversion module, so that the data migration command is converted into a target descriptor based on the second descriptor conversion module according to a preset descriptor complete conversion strategy.
[0071] In step 405, corresponding data migration is performed according to the target descriptor.
[0072] The features of the embodiments of the host command processing method can be referred to the related descriptions of the embodiments of the host command processing system, which will not be repeated here.
[0073] Embodiments of the present application also provide a storage device for executing the host command processing method provided by the above embodiments.
[0074] As shown in FIG. 10, it is a structural schematic diagram of the storage device provided by the embodiments of the present application. The storage device includes the host command processing system provided by the above embodiments. Figure 5 The features of the embodiments of the storage device can be referred to the related descriptions of the embodiments of the host command processing method, which will not be repeated here.
[0075] Embodiments of the present application also provide an electronic device, as shown in FIG. 11, which is a structural schematic diagram of the electronic device provided by the embodiments of the present application, including a processor 10 and a memory 20, the memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the above host command processing method embodiments.
[0076] Figure 6 Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above host command processing method embodiments when running.
[0077] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above host command processing method embodiments when running.
[0078] In an example embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0079] Embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program, when executed by a processor, implements the steps in any of the host command processing method embodiments described above.
[0080] Embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps in any of the host command processing method embodiments described above.
[0081] The skilled in the art can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0082] The above provides a host command processing system, method, storage device and electronic device. The principles and implementation modes of the present application are described by applying specific examples. The above description of the examples is only applicable to help understand the method and core idea of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A host command processing system, characterized by, include: The system comprises a command acquisition module, a first descriptor conversion module, a second descriptor conversion module, and a command response module, wherein the command acquisition module is connected to the host via a bus. The command acquisition module is used to acquire data transfer commands issued by the host through the bus, analyze the command type of the data transfer commands to determine whether the data transfer commands are descriptor omission conversion commands. If the data transfer commands are descriptor omission conversion commands, the data transfer commands are sent to the first descriptor conversion module. If the data transfer commands are not descriptor omission conversion commands, the data transfer commands are sent to the second descriptor conversion module. The first descriptor conversion module is used to convert the data transfer command into a target descriptor according to a preset descriptor omission conversion strategy when the data transfer command is received, and transmit the target descriptor to the command response module; The second descriptor conversion module is used to convert the data transfer command into a target descriptor according to a preset descriptor complete conversion strategy when the data transfer command is received, and then transmit the target descriptor to the command response module. The command response module is used to perform corresponding data transfer based on the obtained target descriptor.
2. The host command processing system of claim 1, wherein, The command acquisition module includes: The submission queue acquisition unit is used to acquire the data transfer command from the command submission queue on the host side via the bus; The command processing unit is used to analyze the command type of the data transfer command to determine whether the data transfer command is a descriptor omission conversion command.
3. The host command processing system of claim 2, wherein, The command processing unit is specifically used for: Analyze the classification feature information of the data migration commands; Based on the classification feature information of the data migration command, determine the command type of the data migration command; If the command type of the data transfer command is a normal read / write command, then the data transfer command is determined to be a descriptor omission conversion command; If the command type of the data migration command is a target protection read / write command, then the data migration command is determined not to be a descriptor omission conversion command. The target protection read / write command, compared to the ordinary read / write command, adds at least an end-to-end data protection requirement.
4. The host command processing system of claim 1, wherein, The first descriptor conversion module is specifically used for: When the data migration command is received, it is determined whether the remaining local descriptor conversion resources meet the descriptor conversion resource requirements of the data migration command; If the remaining resources for local descriptor conversion meet the descriptor conversion resource requirements of the data migration command, the data migration command is converted into a target descriptor according to a preset descriptor omission conversion strategy.
5. The host command processing system of claim 4, wherein, The first descriptor conversion module is further configured to: If the remaining resources of the local descriptor conversion do not meet the descriptor conversion resource requirements of the data migration command, the data migration command is sent to the second descriptor conversion module.
6. The host command processing system of claim 1, wherein, The command acquisition module is also used for: In a case that the data migration command is a write command, it is judged whether the data migration command supports flexible data placement according to write configuration information of the data migration command; If the data migration command supports flexible data placement, the SSD controller stores the data to be written after migration in a hot partition and a cold partition.
7. A host command processing method, characterized by, The method comprises the steps of: obtaining a data migration command issued by a host; analyzing a command type of the data migration command to determine whether the data migration command is a descriptor omission conversion command; in a case that the data migration command is the descriptor omission conversion command, sending the data migration command to a first descriptor conversion module to convert the data migration command into a target descriptor according to a preset descriptor omission conversion strategy of the first descriptor conversion module; in a case that the data migration command is not the descriptor omission conversion command, sending the data migration command to a second descriptor conversion module to convert the data migration command into a target descriptor according to a preset descriptor complete conversion strategy of the second descriptor conversion module; performing corresponding data migration according to the target descriptor.
8. A storage device, comprising: The host command processing system according to any one of claims 1 to 6. The method comprises the steps of:
9. An electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the host command processing method according to claim 7. The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the host command processing method according to claim 7.
10. A computer-readable storage medium, characterized in that,