Data transmission rate control method, device, medium and program product
By executing the data transmission rate negotiation method in the basic input and output system of the server, the problem of insufficient data transmission rate between the second PCIe device and the first PCIe device provided by non-mainstream manufacturers is solved, and the server data transmission performance is improved.
Patent Information
- Application Number
- CN202411528035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-10-30
AI Technical Summary
In the server, the data transmission rate between the second PCIe device and the first PCIe device provided by a non-mainstream manufacturer cannot reach the maximum data transmission rate supported by the second PCIe device, resulting in the impact of the data transmission performance of the server.
By executing the data transmission rate negotiation method in the basic input and output system of the target server, the first PCIe device and the second PCIe device are controlled to negotiate the data transmission rate. If the actual data transmission rate does not reach the maximum rate, the actual rate is sent to the second PCIe device to modify the data transmission control parameters until the maximum data transmission rate is reached.
It is realized that while reducing server costs, the data transmission performance of the server is improved, so that the data transmission rate between the first PCIe device and the second PCIe device reaches the maximum data transmission rate supported by the second PCIe device.
Smart Images

Figure CN119046219B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of server technology, and in particular to a method, device, medium and program product for controlling data transmission rate. Background Art
[0002] In a server, a first PCIe device and a second PCIe device connected via a PCIe (Peripheral Component Interconnect Express) bus are generally included. The first PCIe device may include an internal device of the server, such as a CPU (Central Processing Unit), etc. The second PCIe device may include an external device of the server, such as an NVME (Non-Volatile Memory Express) hard disk, a GPU (Graphics Processing Unit), etc.
[0003] At present, in some technologies, in order to reduce server costs, some second PCIe devices use devices provided by non-mainstream manufacturers. For example, the price of NVME hard disks provided by mainstream manufacturers is much higher than that of NVME hard disks provided by non-mainstream manufacturers. In the case of configuring 24 hard disks for a server, if all NVME hard disks provided by mainstream manufacturers are used, the server cost will be huge. Therefore, in order to reduce server costs, some NVME hard disks provided by non-mainstream manufacturers will be used.
[0004] However, due to the lack of large-scale batch testing and the lack of R&D experience of manufacturers, in some servers, the data transmission rate between the second PCIe device provided by these non-mainstream manufacturers and the first PCIe device cannot reach the maximum data transmission rate supported by the second PCIe device, thereby greatly affecting the data transmission performance of the server. Summary of the invention
[0005] In view of this, the present disclosure provides a data transmission rate control method, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the data transmission performance of a server while reducing the cost of the server.
[0006] In a first aspect, the present disclosure provides a method for controlling a data transmission rate, which is applied to a basic input and output system in a target server; the method comprises:
[0007] In response to the target server being executed with a specified operation, controlling the first PCIe device to negotiate a data transmission rate with the second PCIe device to obtain a first actual data transmission rate of a link where the first PCIe device and the second PCIe device are located;
[0008] If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, sending the first actual data transmission rate to the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value;
[0009] Based on the data transmission control parameter, control the first PCIe device and the second PCIe device to continue data transmission rate negotiation to obtain a second actual data transmission rate of the link where the first PCIe device and the second PCIe device are located;
[0010] If the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the first PCIe device is controlled to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device.
[0011] In a second aspect, the present disclosure provides a method for controlling a data transmission rate, which is applied to a first PCIe device in a target server; the method comprises:
[0012] In response to receiving a negotiation instruction sent by the basic input and output system in the target server, performing data transmission rate negotiation with the connected second PCIe device to obtain a first actual data transmission rate of the link where the second PCIe device is located;
[0013] If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, sending the first actual data transmission rate to the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value;
[0014] Based on the data transmission control parameter, continue to negotiate the data transmission rate with the second PCIe device to obtain a second actual data transmission rate of the link where the second PCIe device is located;
[0015] If the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, communication is performed with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device.
[0016] In a third aspect, the present disclosure provides a device for controlling a data transmission rate, the device comprising:
[0017] A first control module, configured to control the first PCIe device to negotiate a data transmission rate with the second PCIe device in response to the target server being executed with a specified operation, so as to obtain a first actual data transmission rate of a link where the first PCIe device and the second PCIe device are located;
[0018] a rate sending module, configured to send the first actual data transmission rate to the second PCIe device if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to a target value;
[0019] A second control module, configured to control the first PCIe device and the second PCIe device to continue data transmission rate negotiation based on the data transmission control parameter, so as to obtain a second actual data transmission rate of the link where the first PCIe device and the second PCIe device are located;
[0020] The third control module is used to control the first PCIe device to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device if the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device.
[0021] In a fourth aspect, the present disclosure provides a device for controlling a data transmission rate, the device comprising:
[0022] A first transmission rate acquisition module, configured to perform data transmission rate negotiation with a connected second PCIe device in response to receiving a negotiation instruction sent by a basic input and output system in the target server, and obtain a first actual data transmission rate of a link where the second PCIe device is located;
[0023] a rate sending module, configured to send the first actual data transmission rate to the second PCIe device if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to a target value;
[0024] A second transmission rate acquisition module, configured to continue data transmission rate negotiation with the second PCIe device based on the data transmission control parameter to obtain a second actual data transmission rate of the link where the second PCIe device is located;
[0025] A communication module is used to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device if the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device.
[0026] In a fifth aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the above method by executing the computer instructions.
[0027] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the above method.
[0028] In a seventh aspect, the present disclosure provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the above method.
[0029] In the technical solutions of some embodiments of the present disclosure, after controlling the first PCIe device to negotiate the data transmission rate with the second PCIe device and obtaining the first actual data transmission rate, if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the first actual data transmission rate is sent to the second PCIe device, and the second PCIe device modifies the parameter value of the data transmission control parameter to the target value, and then the adjustment method of the data transmission signal between the first PCIe device and the second PCIe device can be adjusted. Then, after controlling the first PCIe device and the second PCIe device to continue to negotiate the data transmission rate based on the modified data transmission control parameter, the obtained second actual data transmission rate may reach the maximum data transmission rate supported by the second PCIe device. In this way, the first PCIe device and the second PCIe device can be controlled to communicate based on the maximum data transmission rate supported by the second PCIe device. Based on this principle, when the second PCIe device is not provided by a mainstream manufacturer, the data transmission rate between the first PCIe device and the second PCIe device can also be adjusted according to the method disclosed in the present invention, so that the data transmission rate between the first PCIe device and the second PCIe device reaches the maximum data transmission rate supported by the second PCIe device. Therefore, the data transmission performance of the server can be improved while reducing the server cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 It is a schematic diagram of the connection between a central processing unit and an NVME hard disk in some scenarios provided by an embodiment of the present disclosure;
[0032] Figure 2 is a flow chart of a method for controlling a data transmission rate provided by an embodiment of the present disclosure;
[0033] Figure 3 is a schematic diagram of connection between a first PCIe device and other PCIe devices provided by an embodiment of the present disclosure;
[0034] Figure 4 is a flowchart of a method for controlling a data transmission rate provided by another embodiment of the present disclosure;
[0035] Figure 5 is a schematic diagram of a startup process of a target server provided by an embodiment of the present disclosure;
[0036] Figure 6 is a module schematic diagram of a data transmission rate control device provided by an embodiment of the present disclosure;
[0037] Figure 7 is a module schematic diagram of a data transmission rate control device provided by another embodiment of the present disclosure;
[0038] Figure 8 It is a schematic diagram of the structure of an electronic device provided by some embodiments of the present disclosure. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0040] According to the PCIe protocol, before the server is powered on and the operating system is entered, the first PCIe device and the second PCIe device in the PCIe link will negotiate the data transmission rate. The so-called data transmission rate negotiation is that the first PCIe device and the second PCIe device determine a suitable data transmission rate for data transmission between the two according to the current actual hardware conditions and system configuration. Specifically, the process of data transmission rate negotiation can mainly include the phase0 / 1 stage. In the phase0 / 1 stage, the first PCIe device and the second PCIe device can determine a more suitable data transmission rate between the first PCIe device and the second PCIe device by sending training sequences to each other based on the parameter value of the data transmission control parameter. Among them, the command control parameter can also be called a preset parameter, which is used to adjust the signal amplitude, swing, de-emphasis, etc. of the data transmission signal between the first PCIe device and the second PCIe device. In this way, the attenuation and distortion of the data transmission signal during the transmission process can be compensated, thereby improving the signal integrity and reducing the bit error rate. In the PCIe protocol, multiple parameter values of the command control parameter are defined, and different parameter values can correspond to different signal amplitudes, swings, de-emphasis, etc.
[0041] Furthermore, the data transmission rate determined by the data transmission rate negotiation is usually a standard rate defined in the PCIe protocol, such as 8 GT / s for PCIe 3.0, 16 GT / s for PCIe 4.0, etc. Before each second PCIe device leaves the factory, the manufacturer will write the maximum data transmission rate supported by each second PCIe device in the device firmware according to the standard rate defined in the PCIe protocol, such as 8 GT / s or 16 GT / s. Usually, the data transmission rate determined by the data transmission rate negotiation between the first PCIe device and the second PCIe device is the maximum data transmission rate supported by the second PCIe device.
[0042] However, in some current technologies, after the first PCIe device negotiates the data transmission rate with the second PCIe device provided by a non-mainstream manufacturer, the data transmission rate obtained is not the maximum data transmission rate supported by the second PCIe device. For example, assuming that the first PCIe device is a central processing unit, and the second PCIe device is an NVME hard disk provided by a non-mainstream manufacturer, and the maximum data transmission rate supported by the NVME hard disk is 16GT / s. Figure 1 , is a schematic diagram of the connection between the central processing unit 121 and the NVME hard disk in some scenarios provided by an embodiment of the present disclosure. Figure 1In the example, the PCIe link goes directly out from the port 1211 of the central processor 121, passes through the PCIe link high-speed signal line 122 of the motherboard 12, and provides the external interface 123 of the motherboard 12. The external interface 123 is connected to the NVME hard disk backplane 14 through a slimline cable or a GenZ cable 13, and the NVME hard disk backplane 14 is physically connected to the NVME hard disk 15. Figure 1 In the connection structure shown, after the central processor 121 negotiates the data transmission rate with the NVME hard disk 15, the data transmission rate in the PCIe link will likely drop to 8GT / s, which greatly reduces the data transmission performance of the server.
[0043] After analyzing the PCIe link data where the data transmission rate dropped, it was found that the PCIe link was too long and the data transmission signal was attenuated too much, resulting in weak signal quality. As a result, in the phase 0 / 1 stage, the central processor 121 requested the NVME hard disk preset link but did not fully meet the negotiation standard, which led to the probability of the PCIe link establishment between the central processor 121 and the NVME hard disk 15 timing out and only negotiating to 8GT / s.
[0044] In view of this, refer to Figure 2 , which is an embodiment of the present disclosure and provides a method for controlling data transmission rate, can improve the data transmission performance of the server while reducing the server cost. Figure 2 The control method in the target server can be applied to the basic input / output system in the target server, or can also be applied to the controller for running the basic input / output system in the target server. The target server refers to the server where the PCIe device with the probability of data transmission rate decreasing is located. The basic input / output system can also be called BIOS (Basic Input / Output System), which is mainly used to complete hardware self-check, load the operating system boot program, perform system settings and configuration, etc. before the server enters the operating system, and provide the necessary operating environment for the operating system.
[0045] In the present disclosure, by improving the program code in the basic input and output system, it can be executed when it is running. Figure 2 The invention provides a method for controlling the data transmission rate in order to determine the optimal data transmission rate between PCIe devices before the server enters the operating system. Specifically, Figure 2 The method for controlling the data transmission rate in the embodiment may include the following steps:
[0046] Step S201, in response to a target server being executed with a designated operation, controlling a first PCIe device to negotiate a data transmission rate with a second PCIe device to obtain a first actual data transmission rate of a link between the first PCIe device and the second PCIe device.
[0047] Specifically, as described above, the first PCIe device may include an internal device of the target server, such as a central processing unit, etc. The second PCIe device may include an external device of the target server, such as an NVME hard disk, a GPU, etc. The first PCIe device is connected to the second PCIe through a PCIe bus. The link between the first PCIe device and the second PCIe device may include a physical link and a data link. Among them, the physical link refers to the physical connection medium between the first PCIe device and the second PCIe device, and the data link refers to the data transmission line formed based on the PCIe protocol and the physical link.
[0048] The designated operation for the target server may be a power-on operation. That is, after the target server is powered on, by running the basic input and output system provided by the present disclosure, on the one hand, the target server can be guided to enter the operating system, and on the other hand, before entering the operating system, by executing the control method of the present disclosure, the optimal data transmission rate between the first PCIe device and the second PCIe device can be determined.
[0049] It should be noted that, according to the above description of the PCIe protocol, in some technologies, after each power-on operation is performed on the target server, a data transmission rate negotiation is also performed between the first PCIe device and the second PCIe device to determine the data transmission rate between the first PCIe device and the second PCIe device. However, in these technologies, after the data transmission rate negotiation is successfully performed, regardless of whether the obtained first actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the communication between the first PCIe device and the second PCIe device will be controlled according to the first actual data transmission rate. However, in the solution disclosed in the present invention, the following steps S202 and S203 will continue to be performed based on the obtained first actual data transmission rate to determine the optimal data transmission rate between the first PCIe device and the second PCIe device.
[0050] Step S202: If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the first actual data transmission rate is sent to the second PCIe device so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value.
[0051] Specifically, the data transmission rate negotiation between the first PCIe device and the second PCIe device can also be understood as finding the maximum data transmission rate supported by the link where the first PCIe device and the second PCIe device are located. If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, it means that the maximum data transmission rate supported by the link where the first PCIe device and the second PCIe device are located cannot reach the maximum data transmission rate supported by the second PCIe device. Therefore, data transmission cannot be performed at the maximum data transmission rate supported by the second PCIe device. Obviously, this is unreasonable and will greatly reduce the data transmission performance of the target server. Therefore, the first actual data transmission rate can be sent to the second PCIe device so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value. In this way, the adjustment method of the data transmission signal between the first PCIe device and the second PCIe device can be adjusted, and then the maximum data transmission rate supported by the link where the first PCIe device and the second PCIe device are located can be adjusted.
[0052] In this embodiment, in order to adapt the logic of modifying the data transmission control parameters in the disclosed method, the firmware in the management controller of the second PCIe device can be improved. The firmware refers to the program code burned into the management controller of the second PCIe device by the manufacturer before the second PCIe device leaves the factory. The firmware improvement for the management controller of the second PCIe device can be completed by the manufacturer of the second PCIe device.
[0053] Based on the improved firmware, after the first actual data transmission rate is sent to the second PCIe device, the management controller of the second PCIe device can compare the first actual data transmission rate with the maximum data transmission rate supported by the second PCIe device by running the improved firmware, and if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, modify the parameter value of the data transmission control parameter (i.e., preset parameter) from the default value to the target value.
[0054] In this embodiment, the parameter value of the data transmission control parameter is modified from the default value to 7. Of course, in some other embodiments, the parameter value of the data transmission control parameter may also be modified to a value other than 7. The present disclosure does not limit this.
[0055] Step S203: Based on the data transmission control parameter, the first PCIe device and the second PCIe device are controlled to continue data transmission rate negotiation to obtain a second actual data transmission rate of the link between the first PCIe device and the second PCIe device.
[0056] Since the parameter value of the data transmission control parameter is modified in step S202 (i.e., the adjustment method of the data transmission signal between the first PCIe device and the second PCIe device is adjusted), the obtained second actual data transmission rate may be different from the first actual data transmission rate. Specifically, the second actual data transmission rate may be greater than the first actual data transmission rate, or may be less than the first actual data transmission rate.
[0057] Step S204: if the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the first PCIe device is controlled to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device.
[0058] In this way, the data transmission capacity between the first PCIe device and the second PCIe device can be improved. In summary, in the technical solutions of some embodiments of the present disclosure, after controlling the first PCIe device and the second PCIe device to negotiate the data transmission rate and obtaining the first actual data transmission rate, if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, by sending the first actual data transmission rate to the second PCIe device, and the second PCIe device modifies the parameter value of the data transmission control parameter to the target value, the adjustment method of the data transmission signal between the first PCIe device and the second PCIe device can be adjusted, and then, based on the modified data transmission control parameter, after controlling the first PCIe device and the second PCIe device to continue to negotiate the data transmission rate, the obtained second actual data transmission rate may reach the maximum data transmission rate supported by the second PCIe device. In this way, the first PCIe device and the second PCIe device can be controlled to communicate based on the maximum data transmission rate supported by the second PCIe device. Based on this principle, when the second PCIe device is not provided by a mainstream manufacturer, the data transmission rate between the first PCIe device and the second PCIe device can also be adjusted according to the method disclosed in the present invention, so that the data transmission rate between the first PCIe device and the second PCIe device reaches the maximum data transmission rate supported by the second PCIe device. Therefore, the data transmission performance of the server can be improved while reducing the server cost.
[0059] Further, in some embodiments, corresponding to step S202, if the first actual data transmission rate obtained through the data transmission rate negotiation reaches the maximum data transmission rate supported by the second PCIe device, it means that the maximum data transmission rate supported by the link where the first PCIe device and the second PCIe device are located can reach the maximum data transmission rate supported by the second PCIe device. In this case, the following operations can be performed:
[0060] Stop sending the actual data transmission rate to the second PCIe device, and control the first PCIe device and the second PCIe device to stop negotiating the data transmission rate;
[0061] The first PCIe device is controlled to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device.
[0062] The above stop can be understood as non-execution. In simple terms, when the first actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, there is no need to perform the operation of modifying the data transmission control parameters (i.e., there is no need to send the actual data transmission rate to the second PCIe device), and there is no need to control the first PCIe device and the second PCIe device to continue data transmission rate negotiation, and the first PCIe device and the second PCIe device can be controlled to communicate according to the maximum data transmission rate supported by the second PCIe device.
[0063] In this way, repeated data transmission rate negotiation between the first PCIe device and the second PCIe device can be avoided, so that the target server can enter the operating system as quickly as possible, thereby reducing the startup time of the target server.
[0064] In some embodiments, in step S202, after obtaining the second actual data transmission rate, if the second actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the method of the present disclosure may further include:
[0065] Stop sending the second actual data transmission rate to the second PCIe device, so that the parameter value of the data transmission control parameter continues to be maintained at the target value;
[0066] The first PCIe device is controlled to continue negotiating the data transmission rate with the second PCIe device.
[0067] Specifically, the target value may be a preferred value determined based on the link where the first PCIe device and the second PCIe device are located. Therefore, after the parameter value of the data transmission control parameter is modified to the target value, the parameter value of the data transmission control parameter can be continuously maintained at the target value.
[0068] In the case where the second actual data transmission rate does not reach the maximum data transmission rate, the parameter value of the data transmission control parameter is kept at the target value, and the first PCIe device and the second PCIe device are controlled to continue to negotiate the data transmission rate once or multiple times, which can avoid the problem of inaccurate actual data transmission rate due to the fluctuation of the physical link where the first PCIe device and the second PCIe device are located. For example, when the first PCIe device and the second PCIe device are controlled to negotiate the data transmission rate for the second time, the actual data transmission rate obtained is affected by the fluctuation of the physical link, resulting in the actual data transmission rate obtained not reaching the maximum data transmission rate supported by the second PCIe device. In this case, if the fluctuation effect is eliminated when the first PCIe device and the second PCIe device are controlled to negotiate the data transmission rate for the third time, then the actual data transmission rate obtained can reach the maximum data transmission rate supported by the second PCIe device. Therefore, through multiple data transmission rate negotiations, the problem of inaccurate actual data transmission rate obtained by negotiation due to the fluctuation of the physical link can be reduced, thereby improving the control accuracy of the data transmission rate between the first PCIe device and the second PCIe device.
[0069] Of course, it is understandable that multiple data transmission rate negotiations between the first PCIe device and the second PCIe device will delay the time for the target server to enter the operating system, thereby extending the startup time of the target server. Therefore, the number of data transmission rate negotiations between the first PCIe device and the second PCIe device can be controlled based on the number threshold, so as to control the startup time of the target server.
[0070] Specifically, in some embodiments, before controlling the first PCIe device to continue data transmission rate negotiation with the second PCIe device, the method of the present disclosure may further include:
[0071] Determine whether the following conditions are met:
[0072] When the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device is controlled by a number threshold, the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device does not reach the number threshold.
[0073] Specifically, if the number of data transmission rate negotiations between the first PCIe device and the second PCIe device does not reach the number threshold, the first PCIe device and the second PCIe device can be controlled to continue the data transmission rate negotiation; if the number of data transmission rate negotiations between the first PCIe device and the second PCIe device reaches the number threshold, the first PCIe device and the second PCIe device can be controlled to stop the data transmission rate negotiation. In this way, the startup time of the target server can be effectively controlled while improving the control accuracy of the data transmission rate.
[0074] In some embodiments, when the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device reaches a number threshold, the method of the present disclosure may further include:
[0075] According to the actual data transmission rate obtained by the last data transmission rate negotiation, the first PCIe device is controlled to communicate with the second PCIe device.
[0076] For example, assuming that the number threshold is 4. After controlling the first PCIe device to negotiate the data transmission rate with the second PCIe device for the fourth time, if the actual data transmission rate obtained has not reached the maximum data transmission rate supported by the second PCIe device, the first PCIe device and the second PCIe device can be controlled to stop negotiating the data transmission rate, and the first PCIe device and the second PCIe device can be controlled to communicate according to the actual data transmission rate obtained after controlling the first PCIe device and the second PCIe device to negotiate the data transmission rate for the fourth time.
[0077] In the above embodiment, since the actual data transmission rate between the first PCIe device and the second PCIe device obtained through multiple data transmission rate negotiations does not reach the maximum data transmission rate supported by the second PCIe device, it can be considered that based on the communication link between the first PCIe device and the second PCIe device, communication is not allowed at the maximum data transmission rate supported by the second PCIe device. In this case, it is more accurate to control the communication between the first PCIe device and the second PCIe device according to the actual data transmission rate obtained by the last data transmission rate negotiation, which can reduce problems such as data loss.
[0078] Combined with reference Figure 3 , which is a schematic diagram of the connection between a first PCIe device and other PCIe devices provided in an embodiment of the present disclosure. Figure 3In the embodiment, the first PCIe device is connected to multiple PCIe devices through different links. The second PCIe device is a PCIe device connected to the first PCIe device and meets the specified conditions. Specifically, among the multiple PCIe devices connected to the first PCIe device, some PCIe devices may be PCIe devices provided by mainstream manufacturers, and some PCI devices may be PCIe devices provided by non-mainstream manufacturers. The second PCIe device may be a PCIe device provided by a non-mainstream manufacturer.
[0079] For the PCIe devices provided by mainstream manufacturers, their functions are relatively stable, and the data transmission rate between them and the first PCIe device can be determined according to conventional methods, that is, only one data transmission rate negotiation can be performed. For the second PCIe device provided by a non-mainstream manufacturer, its functions are not stable enough, and the data transmission rate between it and the first PCIe device can be determined according to the method provided by the present disclosure, that is, multiple data transmission rate negotiations can be performed after modifying the parameter value of the data transmission control parameter. By performing different negotiation controls on the PCIe devices of mainstream manufacturers and the PCIe devices of non-mainstream manufacturers, the time consumed by the PCIe devices of mainstream manufacturers can be reduced during the startup of the target server, thereby reducing the startup time of the target server.
[0080] In order to perform different negotiation controls on PCIe devices of mainstream manufacturers and non-mainstream manufacturers, in some embodiments, Figure 2 Each link in may have a corresponding enable register. Before controlling the first PCIe device to negotiate the data transmission rate with the second PCIe device for the first time, the method of the present disclosure may further include:
[0081] Traversing each PCIe device connected to the first PCIe device;
[0082] In the case that the traversed PCIe device is the second PCIe device, determining a first target link where the first PCIe device and the traversed PCIe device are located, and a first enable register corresponding to the first target link;
[0083] The parameter value of the enable parameter is set in the first enable register to be a first function value to enable the repeated negotiation function of the first target link.
[0084] And, in the case that the traversed PCIe device is not the second PCIe device, determining the second target link where the first PCIe device and the traversed PCIe device are located, and a second enable register corresponding to the second target link;
[0085] The parameter value of the enable parameter is set in the second enable register to be a second function value to disable the repeated negotiation function of the second target link.
[0086] In this way, it can be determined based on the function value in the enable register corresponding to each link whether to determine the data transmission rate between the PCIe devices of the corresponding link according to the method of the present disclosure.
[0087] In some embodiments, for the second PCIe device provided by a non-mainstream manufacturer, the function of the second PCIe device when connected to the first PCIe device in the first type of server may be stable, and the function of the second PCIe device when connected to the first PCIe device in the second type of server may be unstable. In order to further reduce the server startup time, before enabling the repeated negotiation function of the first target link in the first enable register corresponding to the first target link, the method of the present disclosure may also include:
[0088] Determine the target type of the target server;
[0089] If it is determined based on the target type of the target server that the target server is a server compatible with the second PCIe device, setting the parameter value of the enable parameter in the first enable register to the second function value to disable the repeated negotiation function of the first target link;
[0090] If the target server is a server that is not compatible with the second PCIe device, the parameter value of the enable parameter is set in the first enable register to be a first function value to enable the repeated negotiation function of the first target link.
[0091] Accordingly, before controlling the first PCIe device to continue the data transmission rate negotiation with the second PCIe device, if the function of the first PCIe device and the second PCIe device to repeatedly negotiate the data transmission rate is controlled by an enabling parameter, it can be determined whether the repeated negotiation function of the link where the first PCIe device and the second PCIe device are located is already in an enabled state according to the value of the enabling parameter. If so, the first PCIe device and the second PCIe device are controlled to continue the data transmission rate negotiation, and if not, the control of the first PCIe device and the second PCIe device to continue the data transmission rate negotiation is stopped.
[0092] Continue reading Figure 3 In some embodiments, each link may also have a corresponding number register. When the repeated negotiation function of the first target link is enabled, the method of the present disclosure may further include:
[0093] A times threshold is set in a times register corresponding to the first target link to control the maximum data transmission rate negotiation times between the first PCIe device and the second PCIe device.
[0094] Specifically, in the case where there are multiple second PCIe devices and multiple first target links, the number thresholds set in the number registers corresponding to at least some of the first target links are different.
[0095] In simple terms, each first target link may have its own corresponding number threshold, and different first target links may have different corresponding number thresholds. When controlling the first PCIe device in one of the first target links to negotiate the data transmission rate with the second PCIe device, the maximum number of data transmission rate negotiations between the first PCIe device and the second PCIe device may be controlled according to the number threshold corresponding to the first target link. In this way, the control is more flexible.
[0096] In some embodiments, the maximum data transmission rate supported by the second PCIe device may be pre-burned by the manufacturer into the management controller firmware of the second PCIe device. Before controlling the first PCIe device to perform the first data transmission rate negotiation with the second PCIe device, the method of the present disclosure may further include:
[0097] Acquire a maximum data transmission rate supported by the second PCIe device from the firmware of the second PCIe device;
[0098] The acquired maximum data transmission rate is saved, so that after each data transmission rate negotiation, it is determined whether the obtained actual data transmission rate reaches the maximum data transmission rate according to the saved maximum data transmission rate.
[0099] Since the maximum data transmission rate included in the firmware of the second PCIe device is burned by the manufacturer, obtaining the maximum data transmission rate supported by the second PCIe device from the firmware of the second PCIe device will obtain a more accurate result.
[0100] In some embodiments, the firmware of the second PCIe device includes a maximum data transfer rate adapted to different types of servers;
[0101] The maximum data transmission rate supported by the second PCIe device is obtained from the firmware of the second PCIe device, including:
[0102] The target server type of the target server is sent to the second PCIe device, so that the second PCIe device returns a maximum data transmission rate that is compatible with the target server type.
[0103] In this way, the obtained results can be more accurate.
[0104] Combined with reference Figure 4 , which is a flowchart of a method for controlling a data transmission rate according to another embodiment of the present disclosure. Figure 4The control method in the embodiment can be applied to the first PCIe device in the target server, such as a central processing unit. Figure 3 Related description, executed on the first PCIe device Figure 4 Before the method in, the basic input and output system can complete the following operations in advance:
[0105] 1) Pre-acquire the maximum data transmission rate supported by the second PCIe device from the firmware of the second PCIe device and save it in the rate register;
[0106] 2) sequentially obtaining device information of each PCIe device connected to the first PCIe device, and judging whether it is necessary to enable the repeated negotiation function of the link where the PCIe device is located based on the device information, and completing the relevant configuration in the enable register corresponding to the link;
[0107] 3) When the repeated negotiation function of a link is enabled, set the number threshold in the number register corresponding to the link.
[0108] Based on the configuration information 1) to 3) above, the first PCIe device can execute Figure 4 Specifically, Figure 4 In the control method, the control method comprises the following steps:
[0109] Step 401, in response to receiving a negotiation instruction sent by a basic input and output system in a target server, performing data transmission rate negotiation with a connected second PCIe device to obtain a first actual data transmission rate of a link where the second PCIe device is located.
[0110] Specifically, during the process of booting the server, the BIOS may send a negotiation instruction to the first PCIe device after completing the above-mentioned operations 1) to 3) and before the server enters the operating system, so as to trigger the first PCIe device to execute the method in steps S401 to S403.
[0111] Step 402: If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the first actual data transmission rate is sent to the second PCIe device so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value.
[0112] Specifically, the first PCIe device may compare the acquired first actual data transmission rate with the rate in the above rate register. If the first actual data transmission rate does not reach the rate in the rate register, it means that the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device. In this case, the first PCIe device may send the first actual data transmission rate to the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value.
[0113] Step 403: Based on the data transmission control parameter, continue to negotiate the data transmission rate with the second PCIe device to obtain a second actual data transmission rate of the link where the second PCIe device is located.
[0114] Step S404: If the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device.
[0115] Figure 4 The control method in Figure 2 The control methods in are basically similar, the main difference is that the execution subjects of the methods are different. For related principles, see Figure 3 The explanation of Figure 3 akin:
[0116] In some embodiments, if the first actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the method of the present disclosure further includes:
[0117] Stop sending the actual data transmission rate to the second PCIe device, and stop performing the second data transmission rate negotiation with the second PCIe device;
[0118] Communicate with the second PCIe device at the maximum data transfer rate.
[0119] In some embodiments, after obtaining the second actual data transmission rate, the method of the present disclosure further includes:
[0120] If the second actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, stop sending the second actual data transmission rate to the second PCIe device, so that the parameter value of the data transmission control parameter continues to be maintained at the target value;
[0121] The first PCIe device is controlled to continue negotiating the data transmission rate with the second PCIe device.
[0122] In some embodiments, before continuing to negotiate the data transmission rate with the second PCIe device, the method of the present disclosure further includes:
[0123] Determine whether at least one of the following conditions is met:
[0124] When the number of data transmission rate negotiations with the second PCIe device is controlled by a number threshold, the number of data transmission rate negotiations performed with the second PCIe device does not reach the number threshold;
[0125] In a case where a function of repeatedly performing data transmission rate negotiation between the first PCIe device and the second PCIe device is controlled by an enabling parameter, determining, according to a value of the enabling parameter, that the repeated negotiation function of the link where the second PCIe device is located is in an enabled state;
[0126] Wherein, when at least one of the above conditions is met, the data transmission rate negotiation with the second PCIe device continues; when at least one of the above conditions is not met, the data transmission rate negotiation with the second PCIe device stops.
[0127] In some embodiments, when at least one of the above conditions is not met and the data transmission rate negotiation with the second PCIe device is stopped, the method of the present disclosure further includes:
[0128] Communicate with the second PCIe device according to the actual data transmission rate obtained by the last data transmission rate negotiation.
[0129] In some embodiments, at least starting from the second data transmission rate negotiation, after each data transmission rate negotiation with the second PCIe device, the method of the present disclosure further includes:
[0130] It is determined whether the actual data transmission rate obtained through the data transmission rate negotiation reaches the maximum data transmission rate. If so, communication is performed with the second PCIe device according to the maximum data transmission rate.
[0131] and Figure 3 The control method in is similar to that in Figure 4In the embodiment, after the first data transmission rate negotiation is performed with the second PCIe device and the first actual data transmission rate is obtained, if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the first actual data transmission rate is sent to the second PCIe device, and the parameter value of the data transmission control parameter is modified to the target value by the second PCIe device, and the adjustment method of the data transmission signal between the first PCIe device and the second PCIe device can be adjusted, and then, after the second data transmission rate negotiation is performed with the second PCIe device based on the modified data transmission control parameter, the obtained second actual data transmission rate may reach the maximum data transmission rate supported by the second PCIe device. In this way, communication with the second PCIe device can be performed based on the maximum data transmission rate supported by the second PCIe device. Based on this principle, when the second PCIe device is not a device provided by a mainstream manufacturer, the data transmission rate between the first PCIe device and the second PCIe device can also be adjusted according to the method disclosed in the present invention, so that the data transmission rate between the first PCIe device and the second PCIe device reaches the maximum data transmission rate supported by the second PCIe device. Therefore, the data transmission performance of the server can be improved while reducing the cost of the server.
[0132] In order to clearly explain the process position of the method disclosed in the target server startup process, Figure 5 , which is a schematic diagram of the startup process of a target server provided by an embodiment of the present disclosure. Figure 5 The target server startup process includes the following steps:
[0133] Step S501: power on the target server.
[0134] Specifically, this step may be manually performed by a staff member, or may be automatically performed by server management software, etc. The present disclosure does not limit this.
[0135] Step S502: the target server is started.
[0136] Step S503: the basic input and output system performs PCIe device enumeration.
[0137] Step S504: load the device firmware of the PCIe device.
[0138] Specifically, the PCIe device here is a PCIe device externally connected to the target server, including PCIe devices provided by mainstream manufacturers and PCIe devices provided by non-mainstream manufacturers.
[0139] Step S505: The PCIe device sets the parameter value of the data transmission control parameter according to the default value.
[0140] Specifically, the PCIe devices provided by mainstream manufacturers and the PCIe devices provided by non-mainstream manufacturers can set the parameter values of the data transmission control parameters of the PCIe links according to the default values.
[0141] Step S506, traverse the PCIe devices and negotiate the data transmission rate in sequence.
[0142] Specifically, in this step, if the PCIe device connected to the first PCIe device is a device provided by a non-mainstream manufacturer, the optimal data transmission rate between PCIe devices can be determined according to the method disclosed in the present invention; if the PCIe device connected to the first PCIe device is a device provided by a mainstream manufacturer, the optimal data transmission rate between PCIe devices can be determined according to conventional methods.
[0143] Step S507: The PCIe device is connected according to the negotiated data transmission rate.
[0144] Step S508: the target server enters the operating system.
[0145] This completes the entire description of the control method disclosed herein.
[0146] and Figure 2 Corresponding to the data transmission rate control method in the present disclosure, the present disclosure also provides a data transmission rate control device. Figure 6 , which is a module schematic diagram of a data transmission rate control device provided in some embodiments of the present disclosure. Figure 6 In the control device, the control device comprises:
[0147] The first control module 601 is used for controlling the first PCIe device to negotiate the data transmission rate with the second PCIe device in response to the target server being executed with the specified operation, so as to obtain the first actual data transmission rate of the link where the first PCIe device and the second PCIe device are located;
[0148] The rate sending module 602 is used to send the first actual data transmission rate to the second PCIe device if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value;
[0149] The second control module 603 is used to control the first PCIe device and the second PCIe device to continue the data transmission rate negotiation based on the data transmission control parameter, so as to obtain a second actual data transmission rate of the link where the first PCIe device and the second PCIe device are located;
[0150] The third control module 604 is configured to control the first PCIe device to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device if the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device.
[0151] In some embodiments, if the first actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the rate sending module 602 is also used to stop sending the actual data transmission rate to the second PCIe device; the second control module 603 is also used to control the first PCIe device and the second PCIe device to stop negotiating the data transmission rate; the third control module 604 is also used to control the first PCIe device and the second PCIe device to communicate according to the maximum data transmission rate supported by the second PCIe device.
[0152] In some embodiments, after obtaining the second actual data transmission rate, if the second actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the rate sending module 602 is also used to stop sending the second actual data transmission rate to the second PCIe device so that the parameter value of the data transmission control parameter continues to remain at the target value; the second control module 603 is also used to control the first PCIe device and the second PCIe device to continue data transmission rate negotiation.
[0153] In some embodiments, before controlling the first PCIe device to continue data transmission rate negotiation with the second PCIe device, the second control module 603 is further configured to determine whether at least one of the following conditions is met:
[0154] When the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device is controlled by a number threshold, the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device does not reach the number threshold;
[0155] In a case where a function of repeatedly performing data transmission rate negotiation on a link where the first PCIe device and the second PCIe device are located is controlled by an enabling parameter, determining, according to a value of the enabling parameter, that the repeated negotiation function on the link where the first PCIe device and the second PCIe device are located is in an enabled state;
[0156] Among them, when at least one of the above conditions is met, the first PCIe device and the second PCIe device are controlled to continue negotiating the data transmission rate; when at least one of the above conditions is not met, the first PCIe device and the second PCIe device are controlled to stop negotiating the data transmission rate.
[0157] In some embodiments, when at least one of the above conditions is not met and the first PCIe device and the second PCIe device are controlled to stop negotiating the data transmission rate, the third control module 604 is also used to control the first PCIe device and the second PCIe device to communicate according to the actual data transmission rate obtained by the last data transmission rate negotiation.
[0158] In some embodiments, the first PCIe device is connected to a plurality of PCIe devices through different links, and each link has a corresponding enable register, and the second PCIe device is a PCIe device connected to the first PCIe device and meets a specified condition; before controlling the first PCIe device to negotiate a data transmission rate with the second PCIe device for the first time, the first control module 601 is further used to:
[0159] Traversing each PCIe device connected to the first PCIe device;
[0160] In the case that the traversed PCIe device is the second PCIe device, determining a first target link where the first PCIe device and the traversed PCIe device are located, and a first enable register corresponding to the first target link;
[0161] The parameter value of the enable parameter is set in the first enable register to be a first function value to enable the repeated negotiation function of the first target link.
[0162] In some embodiments, when the traversed PCIe device is not the second PCIe device, the first control module 601 is further configured to:
[0163] Determine a second target link where the first PCIe device and the traversed PCIe device are located, and a second enable register corresponding to the second target link;
[0164] The parameter value of the enable parameter is set in the second enable register to be a second function value to disable the repeated negotiation function of the second target link.
[0165] In some embodiments, each link also has a corresponding number register; when the repeated negotiation function of the first target link is enabled, the first control module 601 is further used to:
[0166] A times threshold is set in a times register corresponding to the first target link to control the maximum data transmission rate negotiation times between the first PCIe device and the second PCIe device.
[0167] In some embodiments, when there are multiple second PCIe devices and multiple first target links, the first control module 601 is further configured to:
[0168] The number thresholds set in the number registers corresponding to at least some of the first target links are different.
[0169] In some embodiments, before controlling the first PCIe device to perform data transmission rate negotiation with the second PCIe device for the first time, the first control module 601 is further configured to:
[0170] Acquire a maximum data transmission rate supported by the second PCIe device from the firmware of the second PCIe device;
[0171] The acquired maximum data transmission rate is saved, so that after each data transmission rate negotiation, it is determined whether the obtained actual data transmission rate reaches the maximum data transmission rate according to the saved maximum data transmission rate.
[0172] In some embodiments, the firmware of the second PCIe device includes a maximum data transmission rate adapted to different types of servers; the first control module 601 is specifically used to:
[0173] The target server type of the target server is sent to the second PCIe device, so that the second PCIe device returns a maximum data transmission rate that is compatible with the target server type.
[0174] and Figure 4 Corresponding to the data transmission rate control method in the present disclosure, the present disclosure also provides a data transmission rate control device. Figure 7 , which is a module schematic diagram of a data transmission rate control device provided in some embodiments of the present disclosure. Figure 7 In the control device, the control device comprises:
[0175] The first transmission rate acquisition module 701 is used to negotiate the data transmission rate with the connected second PCIe device in response to receiving the negotiation instruction sent by the basic input and output system in the target server, and obtain the first actual data transmission rate of the link where the second PCIe device is located;
[0176] The rate sending module 702 is used to send the first actual data transmission rate to the second PCIe device if the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value;
[0177] A second transmission rate acquisition module 703, configured to continue data transmission rate negotiation with the second PCIe device based on the data transmission control parameter to obtain a second actual data transmission rate of the link where the second PCIe device is located;
[0178] The communication module 704 is configured to communicate with the second PCIe device at the maximum data transmission rate supported by the second PCIe device if the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device.
[0179] In some embodiments, if the first actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the rate sending module 702 is also used to stop sending the actual data transmission rate to the second PCIe device, and the second transmission rate acquisition module 703 is also used to stop the second data transmission rate negotiation with the second PCIe device; the communication module 704 is also used to communicate with the second PCIe device at the maximum data transmission rate.
[0180] In some embodiments, after obtaining the second actual data transmission rate, if the second actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, the second transmission rate acquisition module 703 is also used to stop sending the second actual data transmission rate to the second PCIe device so that the parameter value of the data transmission control parameter continues to remain at the target value; the communication module 704 is also used to control the first PCIe device and the second PCIe device to continue data transmission rate negotiation.
[0181] In some embodiments, before continuing the data transmission rate negotiation with the second PCIe device, the second transmission rate acquisition module 703 is further configured to determine whether at least one of the following conditions is met:
[0182] When the number of data transmission rate negotiations with the second PCIe device is controlled by a number threshold, the number of data transmission rate negotiations performed with the second PCIe device does not reach the number threshold;
[0183] In a case where a function of repeatedly performing data transmission rate negotiation between the first PCIe device and the link where the second PCIe device is located is controlled by an enabling parameter, determining, according to a value of the enabling parameter, that the repeated negotiation function of the link where the second PCIe device is located is in an enabled state;
[0184] Wherein, when at least one of the above conditions is met, the data transmission rate negotiation with the second PCIe device continues; when at least one of the above conditions is not met, the data transmission rate negotiation with the second PCIe device stops.
[0185] In some embodiments, when at least one of the above conditions is not met and the data transmission rate negotiation with the second PCIe device is stopped, the second transmission rate acquisition module 703 is further used to:
[0186] Communicate with the second PCIe device according to the actual data transmission rate obtained by the last data transmission rate negotiation.
[0187] In some embodiments, at least starting from the second data transmission rate negotiation, after each data transmission rate negotiation with the second PCIe device, the communication module 704 is further configured to:
[0188] It is determined whether the actual data transmission rate obtained through the data transmission rate negotiation reaches the maximum data transmission rate. If so, communication is performed with the second PCIe device according to the maximum data transmission rate.
[0189] The reasoning device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0190] The inference device disclosed in the present invention has the same beneficial effects as the above-mentioned inference method, which will not be described in detail here.
[0191] Combined with reference Figure 8 , is a schematic diagram of the structure of an electronic device provided by some embodiments of the present disclosure. Figure 8 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0192] The processor 10 may be a first PCIe device, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0193] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0194] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0195] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0196] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0197] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0198] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0199] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for controlling data transmission rate, characterized in that: A basic input and output system applied to a target server; the method comprising: In response to the target server being executed with a specified operation, controlling the first PCIe device to negotiate a data transmission rate with the second PCIe device to obtain a first actual data transmission rate of a link where the first PCIe device and the second PCIe device are located; If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, sending the first actual data transmission rate to the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value; When a preset condition is met, based on the data transmission control parameter, controlling the first PCIe device and the second PCIe device to continue data transmission rate negotiation to obtain a second actual data transmission rate of the link where the first PCIe device and the second PCIe device are located; If the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, controlling the first PCIe device to communicate with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device; The preset condition is at least one of the following conditions: When the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device is controlled by a number threshold, the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device does not reach the number threshold; When the function of repeatedly performing data transmission rate negotiation between the first PCIe device and the second PCIe device is controlled by an enabling parameter, it is determined, based on the value of the enabling parameter, that the repeated negotiation function of the link where the first PCIe device and the second PCIe device are located is in an enabled state.
2. The method according to claim 1, characterized in that: If the first actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, the method further includes: Stop sending the first actual data transmission rate to the second PCIe device, and control the first PCIe device and the second PCIe device to stop negotiating the data transmission rate; According to the maximum data transmission rate supported by the second PCIe device, the first PCIe device is controlled to communicate with the second PCIe device.
3. The method according to claim 1, characterized in that After obtaining the second actual data transmission rate, the method further includes: If the second actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, stop sending the second actual data transmission rate to the second PCIe device, so that the parameter value of the data transmission control parameter continues to be maintained at the target value; Control the first PCIe device and the second PCIe device to continue data transmission rate negotiation.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the preset condition is not met, the first PCIe device and the second PCIe device are controlled to stop negotiating the data transmission rate.
5. The method according to claim 4, characterized in that In the case where at least one of the above conditions is not met and the first PCIe device and the second PCIe device are controlled to stop negotiating the data transmission rate, the method further includes: According to the actual data transmission rate obtained by the last data transmission rate negotiation, the first PCIe device is controlled to communicate with the second PCIe device.
6. The method according to claim 4, characterized in that The first PCIe device is connected to a plurality of PCIe devices through different links, and each link has a corresponding enable register, and the second PCIe device is a PCIe device connected to the first PCIe device and meets a specified condition; Before controlling the first PCIe device to perform data transmission rate negotiation with the second PCIe device for the first time, the method further includes: Traversing each of the PCIe devices connected to the first PCIe device; In a case where the traversed PCIe device is the second PCIe device, determining a first target link where the first PCIe device and the traversed PCIe device are located, and a first enable register corresponding to the first target link; The parameter value of the enable parameter is set in the first enable register to be a first function value to enable a repeated negotiation function of the first target link.
7. The method according to claim 6, characterized in that In the case that the traversed PCIe device is not the second PCIe device, the method further includes: Determine a second target link where the first PCIe device and the traversed PCIe device are located, and a second enable register corresponding to the second target link; The parameter value of the enable parameter is set in the second enable register to be a second function value to disable the repeated negotiation function of the second target link.
8. The method according to claim 6, characterized in that Each of the links also has a corresponding number register; In the case where the repeated negotiation function of the first target link is enabled, the method further includes: A times threshold is set in a times register corresponding to the first target link to control the maximum data transmission rate negotiation times between the first PCIe device and the second PCIe device.
9. The method according to claim 8, characterized in that In the case where there are multiple second PCIe devices and multiple first target links, the method further includes: The number thresholds set in the number registers corresponding to at least some of the first target links are different.
10. The method according to claim 1, characterized in that Before controlling the first PCIe device to perform data transmission rate negotiation with the second PCIe device for the first time, the method further includes: Acquire the maximum data transmission rate supported by the second PCIe device from the firmware of the second PCIe device; The acquired maximum data transmission rate is saved, so as to determine whether the obtained actual data transmission rate reaches the maximum data transmission rate according to the saved maximum data transmission rate after each data transmission rate negotiation.
11. The method according to claim 10, characterized in that The firmware of the second PCIe device includes a maximum data transfer rate adapted to different types of servers; The obtaining, from the firmware of the second PCIe device, the maximum data transmission rate supported by the second PCIe device comprises: The target server type of the target server is sent to the second PCIe device, so that the second PCIe device returns a maximum data transmission rate that is compatible with the target server type.
12. A method for controlling data transmission rate, characterized in that: A first PCIe device is applied to a target server; the method comprising: In response to receiving a negotiation instruction sent by the basic input and output system in the target server, performing data transmission rate negotiation with the connected second PCIe device to obtain a first actual data transmission rate of the link where the second PCIe device is located; If the first actual data transmission rate does not reach the maximum data transmission rate supported by the second PCIe device, sending the first actual data transmission rate to the second PCIe device, so that the second PCIe device modifies the parameter value of the data transmission control parameter to the target value; When the preset condition is met, based on the data transmission control parameter, continue to negotiate the data transmission rate with the second PCIe device to obtain a second actual data transmission rate of the link where the second PCIe device is located; If the second actual data transmission rate reaches the maximum data transmission rate supported by the second PCIe device, communicating with the second PCIe device according to the maximum data transmission rate supported by the second PCIe device; The preset condition is at least one of the following conditions: When the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device is controlled by a number threshold, the number of data transmission rate negotiations performed between the first PCIe device and the second PCIe device does not reach the number threshold; When the function of repeatedly performing data transmission rate negotiation between the first PCIe device and the second PCIe device is controlled by an enabling parameter, it is determined, based on the value of the enabling parameter, that the repeated negotiation function of the link where the first PCIe device and the second PCIe device are located is in an enabled state.
13. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data transmission rate control method described in any one of claims 1 to 11, or executes the data transmission rate control method described in claim 12 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data transmission rate control method described in any one of claims 1 to 11, or to execute the data transmission rate control method described in claim 12.
15. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the data transmission rate control method according to any one of claims 1 to 11, or to execute the data transmission rate control method according to claim 12.
Citation Information
Patent Citations
PCIE (Peripheral Component Interface Express) equipment link rate matching method, system on chip and computer equipment
CN114416636A
Hard disk data access method and device, equipment and medium
CN114816254A