Solid state disk data transmission rate control method and solid state disk

Dynamically adjusting the data transfer rate through the SSD processor solves the problem of wasted power consumption of SSDs under high-power links, achieving the effect of reducing power consumption while meeting bandwidth requirements.

CN118708128APending Publication Date: 2024-09-27MAXIO TECHNOLOGY (HANGZHOU) CO LTD

Patent Information

Application Number
CN202411192107.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The power consumption of solid-state drives increases when using PCIe Gen5 links, and most scenarios in actual applications only require a lower data transfer rate, resulting in a waste of power consumption.

Method used

The data transfer rate control method is executed by the SSD processor, the amount of data to be transferred is determined according to the flash conversion layer request, the data transfer rate is dynamically switched to match the current demand, and link power consumption is reduced.

Benefits of technology

While meeting the current bandwidth requirements, it reduces the waste of link power consumption of solid-state drives and improves energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708128A
    Figure CN118708128A
Patent Text Reader

Abstract

The invention provides a solid state disk data transmission rate control method and a solid state disk. Data transmission is carried out between the solid state disk and a host through interactive input / output commands. The control method comprises the following steps: determining a to-be-transmitted data volume between the solid state disk and the host within a current time period according to a flash translation layer request, wherein the flash translation layer request is obtained according to an input / output command sent by the host; determining a target transmission rate according to the to-be-transmitted data volume; and switching the data transmission rate between the solid state disk and the host in the current time period to the target transmission rate. The link power consumption waste of the solid state disk can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of memory technology, and in particular to a method for controlling a data transmission rate of a solid state hard disk and a solid state hard disk. Background Art

[0002] The data transmission rate of the PCIe (peripheral component interconnect express) link has been upgraded to Gen5 and is gradually being applied to mainstream solid-state drives (SSDs). This has greatly improved the performance of SSDs while doubling the bandwidth. At the same time, it has also caused power consumption problems: the data transmission rate of the PCIe link has been increased from Gen4 to Gen5, which will cause the power consumption of SSDs to nearly double.

[0003] In actual applications, it is relatively rare for SSDs to work at full bandwidth. Most scenarios involve intermittent reading and writing of a small number of input / output requests (i.e., IO requests). In other words, Gen4 or even lower data transfer rates can meet most scenarios. If SSDs always run at the highest data transfer rate, it will cause a higher power waste of the PCIe link. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a method for controlling the data transmission rate of a solid-state hard disk and a solid-state hard disk, aiming to reduce the link power consumption waste of the solid-state hard disk while meeting the current bandwidth requirements.

[0005] A first aspect of the present disclosure provides a method for controlling the data transmission rate of a solid state drive, which is executed by a processor of the solid state drive, wherein the solid state drive and a host perform data transmission via interactive input / output commands, and the control method includes executing the following control process: Determining the amount of data to be transmitted between the solid-state drive and the host in a current period according to a flash translation layer request, wherein the flash translation layer request is obtained according to an input / output command sent by the host; Determining a target transmission rate according to the amount of data to be transmitted; The data transmission rate between the solid state drive and the host in the current period is switched to the target transmission rate.

[0006] Optionally, the solid state drive includes an NVMe controller, which is used to obtain input / output commands sent by the host and convert the obtained input / output commands into the flash translation layer request.

[0007] Optionally, the NVMe controller is further used to determine the number of input / output commands sent by the host in a current period; The control process executed by the processor also includes: when the number of determined input / output commands is zero, switching the communication link between the solid-state drive and the host to a low power consumption state, and switching the NVMe power state of the solid-state drive to a low power consumption state.

[0008] Optionally, the solid state drive is in full bandwidth working mode, and determining the target transmission rate according to the amount of data to be transmitted is performed when both the first condition and the second condition are satisfied, wherein: The first condition includes: the number of pending input / output commands in the previous period is not zero, and the minimum data transmission rate required by the amount of data to be transmitted between the solid state drive and the host in the previous period is less than a first threshold; The second condition includes: the number of input / output commands to be processed in the current period is not zero.

[0009] Optionally, the communication link between the solid state drive and the host is switched to a low power consumption state, and the target transmission rate is determined according to the amount of data to be transmitted when both the third condition and the fourth condition are satisfied, wherein: The third condition includes: the communication link between the solid state drive and the host exits the low power consumption state, and the NVMe power state of the solid state drive exits the low power consumption state; The fourth condition includes: a minimum data transmission rate required for the amount of data to be transmitted between the solid state drive and the host in a previous period of time is greater than a second threshold.

[0010] Optionally, the solid state drive has a plurality of candidate rates, each of the candidate rates has a corresponding rate range, the rate range includes the corresponding candidate rate, and the plurality of rate ranges do not overlap with each other; Determining a target transmission rate based on the amount of data to be transmitted includes: determining a minimum data transmission rate required for the amount of data to be transmitted between the solid state drive and the host within a current time period, and determining a candidate rate corresponding to a rate range including the determined minimum data transmission rate as the target transmission rate.

[0011] Optionally, switching the data transmission rate between the solid state drive and the host in the current period to the target transmission rate includes: Configuring the rate switching indication field to a valid value to instruct the PCIe controller of the solid state drive to negotiate a rate switch with the host; Configuring the target link rate field to the target transmission rate, so that the PCIe controller and the host perform rate negotiation through a data packet including the target transmission rate; Wherein, if the speed switching negotiation is successful, the data transmission rate between the solid state drive and the host in the current time period is switched to the target transmission rate.

[0012] Optionally, the control method further includes: Receiving a control command sent by the host; Turning on or off the adaptive speed cutting function according to the control command; The control process is performed when the adaptive speed cutting function is turned on.

[0013] Optionally, the control method further includes: monitoring whether there is a compatibility problem in the execution of the control process, and if there is a compatibility problem, turning off the adaptive speed cutting function to end the execution of the control process.

[0014] The second aspect of the present disclosure provides a solid state drive, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of any one of the control methods provided in the first aspect are implemented.

[0015] Optionally, the solid state drive further includes a PCIe controller, and the PCIe controller includes: A PCIe link training state control module, used to control the start of the training process of the data transmission rate of the PCIe link when the rate switching indication field is configured as a valid value; A PCIe transmission end control module, configured to generate a training sequence ordered set using a target link rate field when the training process is started, and send the generated training sequence ordered set to a host so that the host generates a training sequence ordered set using the target link rate field; A PCIe receiving end control module, used for receiving and detecting the content of the data packet sent by the host to determine the type of the data packet; A PCIe link training ordered set detection module, configured to detect the content of the training sequence ordered set sent by the host when the PCIe receiving end control module determines that the data packet sent by the host is a training sequence ordered set; Among them, when the solid-state drive and the host each send and receive more than a preset number of training sequence ordered sets and the contents of the training sequence ordered sets sent and received by each match, the speed cutting negotiation between the solid-state drive and the host based on the training process is successful.

[0016] Optionally, the solid state drive also includes a register, which is used to store the rate switching indication field for use by the PCIe link training state control module, and is also used to store the target link rate field for use by the PCIe transmission end control module.

[0017] Beneficial effects of the present disclosure: The present disclosure provides a method for controlling the data transmission rate of a solid-state hard disk, wherein the solid-state hard disk and the host perform data transmission through interactive input / output commands, and the control method includes executing the following control process: determining the amount of data to be transmitted between the solid-state hard disk and the host in the current period according to a flash conversion layer request, the flash conversion layer request is obtained according to the input / output command sent by the host; determining the target transmission rate according to the amount of data to be transmitted; and switching the data transmission rate between the solid-state hard disk and the host in the current period to the target transmission rate. Therefore, the data transmission rate between the solid-state hard disk and the host in the current period can be adapted to the amount of data to be transmitted, thereby reducing the link power consumption waste of the solid-state hard disk while meeting the current bandwidth requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings.

[0019] Figure 1 Shown is a flow chart of a method for controlling a data transmission rate provided by an embodiment of the present disclosure; Figure 2 Shown are some steps in the control process in one embodiment of the present disclosure; Figure 3 Shown are another part of the steps in the control process in one embodiment of the present disclosure; Figure 4 The figure is a schematic diagram of the system structure supporting rate-cut negotiation in one embodiment of the present disclosure; Figure 5 Shown is a structural schematic diagram of a solid state hard disk in yet another embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In order to facilitate the understanding of the present disclosure, the present disclosure will be described more comprehensively below with reference to the relevant drawings. The preferred embodiments of the present disclosure are given in the drawings. However, the present disclosure can be implemented in different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the content of the present disclosure more thorough and comprehensive.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used in the specification of the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0022] Currently, the SSDs using PCIe links on the market support five data transfer rates, Gen1 to Gen5, among which Gen1 is 2.5 GT / s, Gen2 is 5.0 GT / s, Gen3 is 8.0 GT / s, Gen4 is 16.0 GT / s, and Gen5 is 32.0 GT / s. After the SSD is powered on normally, it is in full bandwidth working mode, that is, it uses the data transfer rate of Gen5 to transfer data with the host.

[0023] In actual applications, it is relatively rare for SSDs to work at full bandwidth. Most scenarios involve intermittent reading and writing of a small number of input / output requests (i.e., IO requests). In other words, the data transmission rate of Gen4 or even lower can meet most scenarios. Therefore, if the SSD always runs at the highest data transmission rate, it will cause a higher power consumption waste of the PCIe link.

[0024] Existing technical solutions use the method of reducing the number of bus channels or lowering the clock frequency to reduce the power consumption of the solid-state drive, but the power consumption reduction of the PCIe link of the solid-state drive is mainly achieved by entering a low-power state or by reducing the data transmission rate of the PCIe link. Reducing the number of bus channels or lowering the clock frequency can reduce the system power consumption of the solid-state drive, but it cannot reduce the power consumption of the PCIe link of the solid-state drive.

[0025] In view of this, an embodiment of the present disclosure provides a method for controlling the data transmission rate of a solid-state hard disk, aiming to reduce the link power consumption waste of the solid-state hard disk while meeting the current bandwidth demand.

[0026] Figure 1 The flowchart of the method for controlling the data transmission rate of a solid-state drive provided by the embodiment of the present disclosure is shown. The data transmission rate refers to the data transmission rate between the solid-state drive and the host. The solid-state drive and the host perform data transmission through interactive input / output (IO) commands. The control method is executed by the processor of the solid-state drive. Figure 1 As shown, the control method includes executing the following control process: Step S110, determining the amount of data to be transmitted between the solid state drive and the host in the current period according to a Flash Translation Layer (FTL) request, wherein the FTL request is obtained according to an input / output command sent by the host.

[0027] Step S120, determining a target transmission rate according to the amount of data to be transmitted.

[0028] Step S130, switching the data transmission rate between the solid state drive and the host in the current period to the target transmission rate.

[0029] Specifically, the host will put a series of input / output commands into the submission queue (SQ), and notify the SSD to fetch the commands by knocking on the doorbell register. Since the retrieved input / output commands indicate the amount of data that needs to be transmitted in the next period of time, the amount of data to be transmitted between the SSD and the host in the current period can be determined based on the input / output commands retrieved at the beginning of the current period, and the minimum data transmission rate required for the amount of data to be transmitted can be obtained by dividing the determined amount of data to be transmitted by the length of the current period. The above-mentioned determination of the target transmission rate based on the amount of data to be transmitted may be to determine the target transmission rate based on the minimum data transmission rate. In the embodiment of the present disclosure, the starting time of a time period may be the time when the input / output command is executed based on the current notification received, and the end time may be the time when the next notification is received.

[0030] In the disclosed embodiment, the target transmission rate is determined according to the amount of data to be transmitted. Therefore, after the data transmission rate between the solid-state hard disk and the host in the current time period is switched to the target transmission rate, the data transmission rate between the solid-state hard disk and the host in the current time period is adapted to the amount of data to be transmitted. Therefore, the link power consumption waste of the solid-state hard disk is reduced while meeting the current bandwidth demand.

[0031] The following is a detailed introduction to each step of the control method provided in the embodiment of the present disclosure.

[0032] In an optional embodiment, the solid state drive includes an NVMe (Non-Volatile Memory Express, non-volatile memory host controller interface specification) controller, and the NVMe controller is used to obtain input / output commands sent by the host and convert the obtained input / output commands into the flash translation layer request described in step S110.

[0033] Furthermore, the NVMe controller is also used to determine the number of input / output commands sent by the host in the current period, and the control process executed by the processor of the solid-state drive also includes: when the determined number of input / output commands is zero (i.e., there are no input / output commands to be processed), the communication link between the solid-state drive and the host is switched to a low power state (e.g., L1.2 power gating state), and the NVMe power state of the solid-state drive is switched to a low power state (e.g., PS3 state or PS4 state), thereby interspersing the hardware switching to a low power state during the data transmission rate switching process to achieve further reduction in power consumption.

[0034] In an optional embodiment, the solid-state drive has multiple candidate rates, the candidate rates have corresponding rate ranges, the rate range includes the corresponding candidate rates and the multiple rate ranges do not overlap with each other, step S120, determining the target transmission rate based on the amount of data to be transmitted, including: determining the minimum data transmission rate required for the amount of data to be transmitted between the solid-state drive and the host in the current time period, and determining the candidate rate corresponding to the rate range including the determined minimum data transmission rate as the target transmission rate.

[0035] For example, the solid-state drive supports Gen1~Gen5, so there are five candidate rates from Gen1 to Gen5. The rate range corresponding to Gen1 is (v1 x , v1 y ) and v1 x <2.5 GT / s <v1 y , the rate range corresponding to Gen2 is (v2 x , v2 y ) and v2 x <5.0GT / s <v2 y , the rate range corresponding to Gen3 is (v3 x , v3 y ) and v3 x <8.0 GT / s <v3 y , the rate range corresponding to Gen4 is (v4 x , v4 y ) and v4 x <16.0 GT / s <v4 y , the rate range corresponding to Gen5 is (v5 x , v5 y ) and v5 x <32.0GT / s <v5 y , where v1 x <v1 y ≤v2 x <v2 y ≤v3 x <v3 y ≤v4x <v4 y ≤v5 x <v5 y . Further, v1 x Can be set to 0, v5 y Can be set to infinity, so that in v1 y =v2 x 、v2 y =v3 x 、v3 y =v4 x and v4 y =v5 x In the case of the above five rate ranges, four gradually increasing thresholds v1 y 、v2 y 、v3 y and v4 y In this example, the minimum data transmission rate determined above can be combined with four gradually increasing thresholds v1 y 、v2 y 、v3 y and v4 y The comparison is performed to determine a rate range that includes the minimum data transmission rate, and then the target transmission rate is determined.

[0036] In some examples, the solid-state drive is in full-bandwidth operating mode, and step S120, determining the target transmission rate based on the amount of data to be transmitted, is performed when both the first condition and the second condition are met, wherein the first condition includes: the number of input / output commands to be processed in the previous time period is not zero, and the minimum data transmission rate required for the amount of data to be transmitted between the solid-state drive and the host in the previous time period is less than a first threshold; the second condition includes: the number of input / output commands to be processed in the current time period is not zero.

[0037] Figure 2 The full bandwidth working mode is shown as Gen5 and the rate range corresponding to the five candidate rates of Gen1~Gen5 is as above composed of four gradually increasing thresholds v1 y 、v2 y 、v3 y and v4 y When the process is divided, it controls part of the steps in the process. Figure 2 As shown, this part of the control process includes: Step S201, determining whether the number M(n) of input / output commands to be processed within the time period T(n) is zero, wherein if it is zero, executing step S201a, otherwise executing step S202; Step S201a, switching the communication link between the solid state drive and the host to the L1.2 power gating state, and switching the NVMe power state of the solid state drive to the PS3 state or the PS4 state; Step S202, determining whether the minimum data transmission rate v(n) required for the amount of data to be transmitted between the solid state drive and the host within the time period T(n) is less than a threshold value v4 y , where if it is not less than the threshold v4 y Then n is incremented by 1 and the process returns to step S201; otherwise, the process returns to step S203; Step S203, determining whether the number M(n+1) of input / output commands to be processed within the time period T(n+1) is zero, wherein if it is zero, executing step S203a, otherwise executing step S204; Step S203a, switching the communication link between the solid state drive and the host to the L1.2 power gating state, and switching the NVMe power state of the solid state drive to the PS3 state or the PS4 state; Step S204, determining whether the minimum data transmission rate v(n+1) required for the amount of data to be transmitted between the solid state drive and the host within the time period T(n+1) is less than a threshold value v4 y , where if it is not less than the threshold v4 y Then n is incremented by 2 and the process returns to step S201, otherwise the process returns to step S205; Step S205: determine whether the minimum data transmission rate v(n+1) is less than the threshold v3 y , where if it is not less than the threshold v3 y Then execute step S205a, otherwise execute step S206; Step S205a, switching the data transmission rate between the solid state drive and the host in time period T(n+1) from Gen5 to Gen4; Step S206, determine whether the minimum data transmission rate v(n+1) is less than the threshold v2 y , where if it is not less than the threshold v2 y Then execute step S206a, otherwise execute step S207; Step S206a, switching the data transmission rate between the solid state drive and the host in the time period T(n+1) from Gen5 to Gen3; Step S207, determine whether the minimum data transmission rate v(n+1) is less than the threshold v1 y , where if it is not less than the threshold v1 y Then execute step S207a, otherwise execute step S208; Step S207a, switching the data transmission rate between the solid state drive and the host from Gen5 to Gen2 within the time period T(n+1); Step S208 , switching the data transmission rate between the solid state drive and the host from Gen5 to Gen1 within the time period T(n+1).

[0038] The multiple steps executed above can start from executing step S201 when n=1, wherein steps S201 and S202 are for determining whether the above-mentioned first condition is met, and step S203 is for determining whether the above-mentioned second condition is met. Step S120 will only be executed when both the first condition and the second condition are met, that is, the target transmission rate is determined according to the amount of data to be transmitted. Figure 2 In the example shown, the execution process of step S120 includes steps S204, S205, S206 and S207, that is, by sequentially comparing the minimum data transmission rate v(n+1) with the threshold v4 y 、v3 y 、v2 y and v1 y The comparison is performed to determine the target transfer rate.

[0039] It should be understood that the threshold value v4 in step S202 y As an example of the first threshold in the first condition above, only when the minimum data transmission rate v(n) required by the amount of data to be transmitted between the SSD and the host in the time period T(n) is less than the threshold v4 y In the case of , the data transmission rate can be switched only within the period T(n+1), where the period T(n) is the previous period in the first condition, and the period T(n+1) is the current period in the second condition. In other examples, the first threshold can be set to a value greater than the threshold v1 based on practical needs. y The larger the value of the first threshold, the greater the possibility of switching the data transmission rate within the time period T(n+1).

[0040] It should be noted that after step S202 is executed, if it is determined that the minimum data transmission rate v(n) is not less than the threshold value v4 y , it is determined that the first condition is not satisfied, so that the data transmission rate will not be switched in the time period T(n+1), and the next time period after n is incremented by 1 is determined as the previous time period in the first condition to see whether the first condition can be satisfied. In addition, after step S204 is executed, if it is determined that the minimum data transmission rate v(n+1) is not less than the threshold value v4 y, it is determined that the period T(n+1) still needs the full bandwidth working mode, so there is no need to switch the data transmission rate; at the same time, the period T(n+1) as the next period of the period T(n) has been determined to have a minimum data transmission rate v(n+1) not less than the threshold v4 y , so that the time period T(n+1) as the previous time period in the first condition cannot satisfy the first condition, so next it is necessary to determine whether the time period T(n+2) as the previous time period in the first condition satisfies the first condition, so after step S204 is executed, if it is determined that the minimum data transmission rate v(n+1) is not less than the threshold value v4 y , then n is incremented by 2 and the process returns to step S201.

[0041] In the above-mentioned case where the solid-state hard disk is in full-bandwidth working mode, step S120 is executed only when both the first condition and the second condition are met. The hardware is switched to a low power consumption state during the data transmission rate switching process, and the first condition set based on the first threshold can avoid occasional situations triggering the execution of step S120 and even frequent switching of data transmission rates.

[0042] Figure 2 Taking the speed reduction initiated by Gen5 as an example, it should be understood that this does not represent a limitation on the starting data transmission rate of the speed reduction. In other embodiments, when the data transmission rate between the solid state drive and the host is a first preset rate other than Gen5 (e.g., one of the rates in Gen1 to Gen4), if the target transmission rate determined based on the amount of data to be transmitted in the current period is less than the first preset rate, the data transmission rate between the solid state drive and the host in the current period will also be reduced from the first preset rate to the target transmission rate.

[0043] In other examples, the communication link between the solid-state drive and the host is switched to a low-power state. In this case, the NVMe power state of the solid-state drive can be switched to a low-power state or not. Step S120, determining the target transmission rate based on the amount of data to be transmitted, is performed when both the third condition and the fourth condition are met, wherein the third condition includes: the communication link between the solid-state drive and the host exits the low-power state, and the NVMe power state of the solid-state drive exits the low-power state; the fourth condition includes: the minimum data transmission rate required for the amount of data to be transmitted between the solid-state drive and the host in the previous period is greater than the second threshold.

[0044] Figure 3 The full bandwidth working mode is shown as Gen5 and the rate range corresponding to the five candidate rates of Gen1~Gen5 is as above composed of four gradually increasing thresholds v1 y 、v2 y 、v3 y and v4y Another part of the steps in the control process can be separated out. Figure 3 As shown, when the communication link between the solid-state drive and the host exits the low power state and the NVMe power state of the solid-state drive exits the low power state, this part of the steps in the control process includes: Step S301, determining whether the minimum data transmission rate v(n) required for the amount of data to be transmitted between the solid state drive and the host within the time period T(n) is greater than a threshold value v1 y , where if it is not greater than the threshold v1 y Then n is incremented by 1 and the process returns to step S301, otherwise the process returns to step S302; Step S302, determining whether the minimum data transmission rate v(n+1) required for the amount of data to be transmitted between the solid state drive and the host within the time period T(n+1) is less than a threshold value v1 y , where if it is less than the threshold v1 y Then execute step S302a, otherwise execute step S303; Step S302a, maintaining the data transmission rate between the solid state drive and the host in the time period T(n+1) at the rate after wake-up, that is, Gen1; Step S303: determine whether the minimum data transmission rate v(n+1) is less than the threshold v2 y , where if it is less than the threshold v2 y Then execute step S303a, otherwise execute step S304; Step S303a, switching the data transmission rate between the solid state drive and the host in the time period T(n+1) from the rate after wake-up to Gen2; Step S304, determine whether the minimum data transmission rate v(n+1) is less than the threshold v3 y , where if it is less than the threshold v3 y Then execute step S304a, otherwise execute step S305; Step S304a, switching the data transmission rate between the solid state drive and the host in the time period T(n+1) from the rate after wake-up to Gen3; Step S305: determine whether the minimum data transmission rate v(n+1) is less than the threshold v4 y , where if it is less than the threshold v4 y Then execute step S305a, otherwise execute step S306; Step S305a, switching the data transmission rate between the solid state drive and the host in the time period T(n+1) from the rate after wake-up to Gen4; Step S306, switching the data transmission rate between the solid state drive and the host within the time period T(n+1) from the rate after wake-up to Gen5.

[0045] The multiple steps executed above can be started after the communication link between the solid-state drive and the host exits the low-power state and the NVMe power state of the solid-state drive exits the low-power state in response to the wake-up signal, and step S301 is executed starting from n=1, that is, step S301 is executed starting from n=1 when the third condition is met. Step S301 is to determine whether the above-mentioned fourth condition is met. Step S120 will only be executed after the fourth condition is met, that is, the target transmission rate is determined according to the amount of data to be transmitted. Figure 3 In the example shown, the execution process of step S120 includes steps S302, S303, S304 and S305, that is, by sequentially comparing the minimum data transmission rate v(n+1) with the threshold v1 y 、v2 y 、v3 y and v4 y The comparison is performed to determine the target transfer rate.

[0046] It should be understood that the threshold v1 in step S301 y As an example of the second threshold value in the fourth condition above, only when the minimum data transmission rate v(n) required by the amount of data to be transmitted between the SSD and the host in the time period T(n) is greater than the threshold value v1 y In the case of , the data transmission rate can be switched only within the period T(n+1), where the period T(n) is the previous period in the fourth condition, and the period T(n+1) is the current period. In other examples, the second threshold can be set to a value less than the threshold v1 based on practical needs. y The smaller the second threshold value is, the greater the possibility of switching the data transmission rate within the time period T(n+1).

[0047] It should be noted that after waking up, the solid state drive is usually set to have a smaller wake-up rate, that is, the minimum rate Gen1 among Gen1 to Gen5 is used. After step S301 is executed, if it is determined that the minimum data transmission rate v(n) is not greater than the threshold value v1 y , it is determined that the fourth condition is not satisfied. In this case, the time period T(n+1) will still use the wake-up rate to transmit data between the solid-state drive and the host. Next, after n is incremented by 1, it is determined whether the next time period of time T(n) can satisfy the fourth condition as the previous time period in the fourth condition.

[0048] In the above case where the communication link between the solid state drive and the host is switched to a low power consumption state, step S120 is performed only when both the third condition and the fourth condition are met, wherein the fourth condition set based on the second threshold can avoid frequent switching of data transmission rates triggered by occasional situations.

[0049] Figure 3 Taking Gen1 as an example to initiate the speed increase, it should be understood that this does not mean a limitation on the starting data transmission rate of the speed increase. In other embodiments, when the data transmission rate between the solid state drive and the host is a second preset rate other than Gen1 (for example, one of the rates from Gen2 to Gen5), if the target transmission rate determined according to the amount of data to be transmitted in the current period is greater than the second preset rate, the data transmission rate between the solid state drive and the host in the current period will also be increased from the second preset rate to the target transmission rate.

[0050] In an optional embodiment, step S130, switching the data transmission rate between the solid state drive and the host in the current time period to the target transmission rate, includes: configuring the rate switching indication (Directed Speed ​​Change) field to a valid value, such as a binary value of 1, to indicate that the PCIe controller of the solid state drive negotiates speed switching with the host; configuring the target link rate (Target Link Speed) field to the target transmission rate, so that the PCIe controller and the host negotiate speed switching through a data packet including the target transmission rate; wherein, when the speed switching negotiation is completed, the data transmission rate between the solid state drive and the host in the current time period is switched to the target transmission rate.

[0051] Figure 4 The following is a schematic diagram of the system structure that supports speed negotiation. Figure 4 As shown, the solid state drive 100 includes a processor 110, a register 120, a PCIe controller 130, a sending unit 140 and a receiving unit 150, wherein the processor 110 is used to execute the data transmission rate control method provided in the embodiment of the present disclosure, the register 120 is used to store the rate switching indication field and the target link rate field, the PCIe controller 130 is used to read the configured rate switching indication field and the target link rate field from the register 120 to perform rate switching negotiation, the sending unit 140 is used to forward the data packet sent by the PCIe controller 130 during the rate switching negotiation to the receiving unit 210 included in the host 200 through the data differential line, and the receiving unit 150 is used to receive the data packet sent by the sending unit 220 included in the host 200 during the rate switching negotiation through the data differential line and forward the received data packet to the PCIe controller 130.

[0052] For SSDs using PCIe links, the above data packets are Training Sequence Ordered Sets (TS OS for short). Training Sequence Ordered Sets are specific data packets defined by the PCIe protocol for PCIe link training, including a data rate support field and using the data rate support field to train the data transmission rate of the PCIe link.

[0053] like Figure 4 As shown, the PCIe controller 130 includes: a PCIe transmission end control module 131, which is used to generate a training sequence ordered set using the configured target link rate field read from the register 120 when the training process of the data transmission rate of the PCIe link is turned on, and send the generated training sequence ordered set to the host 200 so that the host 200 uses the target link rate field to generate the training sequence ordered set; a PCIe receiving end control module 132, which is used to receive and detect the content of the data packet sent by the host 200 to determine the type of the data packet; a PCIe link training ordered set detection module 133, which is used to detect the content of the training sequence ordered set sent by the host 200 when the PCIe receiving end control module 132 determines that the data packet sent by the host 200 is a training sequence ordered set; a PCIe link training state control module 134, which is used to control the training process of the PCIe link, for example, controlling the start of the training process of the data transmission rate of the PCIe link according to the rate switching indication field stored in the register 120.

[0054] Specifically, for the PCIe transmission end control module 131, it uses the target link rate field to generate a training sequence ordered set, that is, it generates a training sequence ordered set by setting the data rate providing field to the target transmission rate configured on the target link rate field; for the host 200, after receiving the training sequence ordered set through the receiving unit 210, it will parse the received training sequence ordered set to obtain the target transmission rate configured on the target link rate field, and use the target link rate field to generate a training sequence ordered set, that is, it generates a training sequence ordered set by setting the data rate providing field to the target transmission rate, and then reply the generated training sequence ordered set to the solid state drive 100 through the sending unit 220.

[0055] When the solid state drive 100 and the host 200 have each sent and received a sufficient number (for example, more than a preset number) of training sequence ordered sets and the content of the training sequence ordered sets sent by each match the content of the received training sequence ordered sets, the speed negotiation between the solid state drive 100 and the host 200 based on this training process is successful. Specifically, the PCIe transmission end control module 131 generates a training sequence ordered set using the target link rate field, and the host 200 generates a training sequence ordered set using the target link rate field, so that the content of the training sequence ordered sets sent and received by the solid state drive 100 and the host 200 are matched, that is, the data rate provision field in the training sequence ordered set sent by each is consistent with the data rate provision field in the received training sequence ordered set.

[0056] In an optional embodiment, the control method provided by the embodiment of the present disclosure also includes: receiving a control command issued by the host, turning on or off the adaptive speed cutting function according to the control command, and once the adaptive speed cutting function is turned on, it will always be effective, regardless of whether the solid-state drive is powered on or off and whether it is restarted. The adaptive speed cutting function may not be turned on by default for the solid-state drive, and the turning on of the adaptive speed cutting function is only controlled by the host through a control command. For a solid-state drive using a PCIe link, the control command may be an NVMe vendor command. The above control process is executed when the adaptive speed cutting function is turned on, and the execution of the control process is determined by the user operating the host, thereby achieving the purpose of flexibly adapting to the needs of different users.

[0057] Furthermore, the control method provided by the embodiment of the present disclosure also includes: monitoring whether there are compatibility issues in the execution of the control process, and if there are compatibility issues, turning off the adaptive speed cutting function to end the execution of the control process until receiving a control command to restart the adaptive speed cutting function, so as to avoid negative impact on the link of the solid-state drive and improve the working stability of the solid-state drive. Specifically, compatibility issues include situations where other functions of the solid-state drive prevent the control process from being executed correctly. For example, when the solid-state drive is in full-bandwidth working mode, although the first condition and the second condition are met and the minimum data transmission rate v(n+1) is greater than the threshold value v2 y and less than the threshold v3 y , but other features of the SSD prevent the data transfer rate from switching to Gen3.

[0058] The data transmission rate control method provided above is suitable for intermittent reading and writing of a small number of input / output requests. If the interval between two adjacent input / output requests is long and the solid-state drive and the host do not need to transmit data for a long period of time, the solid-state drive can use a more appropriate data transmission rate in combination with a low power consumption state to meet the application and achieve power consumption savings.

[0059] Corresponding to the data transmission rate control method provided in the above embodiments, another embodiment of the present disclosure provides a solid-state hard disk, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, the steps of any one of the control methods provided in the above embodiments are implemented, thereby reducing the link power consumption waste of the solid-state hard disk while meeting the current bandwidth requirements.

[0060] Figure 5 FIG. 1 is a schematic diagram of the structure of a solid state drive provided by an embodiment of the present disclosure. Figure 5 As shown, the solid state drive 100 includes a processor 110 and a memory 170 , and thus can reduce link power consumption waste under the control of the processor 110 . Figure 5 It is also shown that the solid state drive 100 includes a PCIe controller 130 and an NVMe controller 160, wherein the NVMe controller 160 provides the number of input / output commands and the flash translation layer request to the processor 100, and the processor 110 configures the rate switching indication field and the target link rate field for the PCIe controller 130 to perform speed negotiation. It should be understood that Figure 5 The structure shown does not constitute a limitation on the specific structure of the solid state drive provided in the embodiment of the present disclosure. In some examples, the solid state drive 100 may also be as follows: Figure 4 Shown include Figure 5 Some devices not shown in the figure.

[0061] In practice, the computer program code for executing the above-mentioned method for controlling the data transfer rate of the solid state drive can be written in one or more programming languages ​​or a combination thereof, wherein the programming language includes an object-oriented programming language (such as Java, Smalltalk, C++), and also includes a conventional procedural programming language (such as "C" language or similar programming languages). The program code can be executed as an independent software package.

[0062] In addition, in this article, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0063] Finally, it should be noted that: Obviously, the above embodiments are only examples for clearly illustrating the present disclosure, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection of the present disclosure.

Claims

1. A method for controlling the data transmission rate of a solid state drive, executed by a processor of the solid state drive, wherein the solid state drive and a host perform data transmission via interactive input / output commands, and the control method comprises executing the following control process: Determining the amount of data to be transmitted between the solid-state drive and the host in a current period according to a flash translation layer request, wherein the flash translation layer request is obtained according to an input / output command sent by the host; Determining a target transmission rate according to the amount of data to be transmitted; The data transmission rate between the solid state drive and the host in the current period is switched to the target transmission rate.

2. The control method according to claim 1, wherein: The solid state drive includes an NVMe controller, which is used to obtain an input / output command sent by the host and convert the obtained input / output command into the flash translation layer request.

3. The control method according to claim 2, wherein: The NVMe controller is also used to determine the number of input / output commands sent by the host in the current period; The control process executed by the processor also includes: when the number of determined input / output commands is zero, switching the communication link between the solid-state drive and the host to a low power consumption state, and switching the NVMe power state of the solid-state drive to a low power consumption state.

4. The control method according to claim 3, wherein: The solid state drive is in full bandwidth working mode, and determining the target transmission rate according to the amount of data to be transmitted is performed when both the first condition and the second condition are met, wherein: The first condition includes: the number of pending input / output commands in the previous period is not zero, and the minimum data transmission rate required for the amount of data to be transmitted between the solid state drive and the host in the previous period is less than a first threshold; The second condition includes: the number of input / output commands to be processed in the current period is not zero.

5. The control method according to claim 3, wherein: The communication link between the solid state drive and the host is switched to a low power consumption state, and the target transmission rate is determined according to the amount of data to be transmitted when both the third condition and the fourth condition are satisfied, wherein: The third condition includes: the communication link between the solid state drive and the host exits the low power consumption state, and the NVMe power state of the solid state drive exits the low power consumption state; The fourth condition includes: a minimum data transmission rate required for the amount of data to be transmitted between the solid state drive and the host in a previous period of time is greater than a second threshold.

6. The control method according to claim 1, wherein: The solid state drive has a plurality of candidate rates, each of the candidate rates has a corresponding rate range, the rate range includes the corresponding candidate rates and the plurality of rate ranges do not overlap with each other; Determining a target transmission rate based on the amount of data to be transmitted includes: determining a minimum data transmission rate required for the amount of data to be transmitted between the solid state drive and the host within a current time period, and determining a candidate rate corresponding to a rate range including the determined minimum data transmission rate as the target transmission rate.

7. The control method according to claim 1, wherein: Switching the data transmission rate between the solid state drive and the host in the current period to the target transmission rate includes: Configuring the rate switching indication field to a valid value to instruct the PCIe controller of the solid state drive to negotiate a rate switch with the host; Configuring the target link rate field to the target transmission rate, so that the PCIe controller and the host perform rate negotiation through a data packet including the target transmission rate; Wherein, if the speed switching negotiation is successful, the data transmission rate between the solid state drive and the host in the current time period is switched to the target transmission rate.

8. The control method according to any one of claims 1 to 7, further comprising: Receiving a control command sent by the host; Turning on or off the adaptive speed cutting function according to the control command; The control process is performed when the adaptive speed cutting function is turned on.

9. The control method according to claim 8, further comprising: The execution of the control process is monitored to determine whether there is a compatibility problem, and if there is a compatibility problem, the adaptive speed cutting function is disabled to terminate the execution of the control process.

10. A solid state hard disk comprising: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the control method according to any one of claims 1 to 9 are implemented.

11. The solid state drive according to claim 10, further comprising a PCIe controller, wherein the PCIe controller comprises: A PCIe link training state control module, used to control the start of the training process of the data transmission rate of the PCIe link when the rate switching indication field is configured as a valid value; A PCIe transmission end control module, configured to generate a training sequence ordered set using a target link rate field when the training process is started, and send the generated training sequence ordered set to a host so that the host generates a training sequence ordered set using the target link rate field; A PCIe receiving end control module, used for receiving and detecting the content of the data packet sent by the host to determine the type of the data packet; A PCIe link training ordered set detection module, configured to detect the content of the training sequence ordered set sent by the host when the PCIe receiving end control module determines that the data packet sent by the host is a training sequence ordered set; Among them, when the solid-state drive and the host each send and receive more than a preset number of training sequence ordered sets and the contents of the training sequence ordered sets sent and received by each match, the speed cutting negotiation between the solid-state drive and the host based on the training process is successful.

12. The solid-state hard disk according to claim 11 further includes a register, wherein the register is used to store the rate switching indication field for use by the PCIe link training state control module, and is also used to store the target link rate field for use by the PCIe transmission end control module.

Citation Information

Patent Citations

  • Test verification method and device for dynamic conversion of data transmission rate of solid state disk

    CN114625584A

  • Solid state disk control method and device, electronic equipment and storage medium

    CN118051183A

  • Apparatus and method for controlling data rate ofmobile terminal in a wireless communication system

    KR1020050058876A

  • Link speed recovery in a data storage system

    US10754798B1

  • Memory system

    US20120159051A1

Cited By

  • Data transmission rate control method and device, medium and program product

    CN119046219A

  • Power consumption adjusting method and device and PCIe system

    CN119668984A

  • A power consumption adjustment method and device, and a PCIe system

    CN119668984B

  • Data optimization storage method based on artificial intelligence

    CN120255804A

  • Data transmission rate control method, device, medium and program product

    WO2026091561A1