A bandwidth adjustment method, apparatus, device, medium and product

CN119996209BActive Publication Date: 2026-08-21WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510251526.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2026-08-21
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

但这种方式会产生较大的延迟

Benefits of technology

[0007]在本申请实施例中,获取高速串行计算机扩展总线标准系统中目标链路中目标端口的实时数据量,然后根据实时数据量,确定目标端口对应的目标通道数,在目标端口的目标通道数与使能通道数不同的情况下,生成并下发通道调整指令至目标端口,以对目标端口的通道数进行调整。上述方案通过获取目标端口的实时数据量,确认目标端口的目标通道数,并根据目标通道数与使能通道数的关系,对目标端口的使能通道数进行调整。相较于通过软件对目标链路内端口的使能通道数进行统一配置,可以根据目标端口的实时数据量,对目标端口的使能通道数进行通道调整,降低功耗以及延迟,提高方法的灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996209B_ABST
    Figure CN119996209B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network transmission, and discloses a bandwidth adjustment method, device, equipment, medium and product. The method is applied to a high-speed serial computer expansion bus standard system, and comprises the following steps: acquiring real-time data volume of a target port in a target link; determining a target channel number corresponding to the target port according to the real-time data volume of the target port; if the target channel number of the target port is different from an enabled channel number, generating a channel adjustment instruction according to the target channel number and the enabled channel number; and delivering the channel adjustment instruction to the target port, so as to adjust the enabled channel number of the target port. The application can reduce the delay in the link bandwidth switching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network transmission technology, specifically to a bandwidth adjustment method, apparatus, device, medium, and product. Background Technology

[0002] In PCIe (Peripheral Component Interconnect Express) systems, the link transmission environment can change, leading to link transmission errors or degraded link quality. In such cases, the PCIe link width needs to be dynamically adjusted. However, the link width adjustment process involves a link training procedure, which consumes a significant amount of system latency, and during this time, the link cannot transmit any effective data, thus impacting bandwidth.

[0003] In related technologies, link bandwidth switching is implemented through software. Specifically, the LTSSM (Link Training and Status State Machine) transitions from the normal operating L0 state to the Recovery state, and then to the Configuration state. During this process, the controller sends TS1 (Training Sequence 1) and TS2 (Training Sequence 2) streams to complete the link bandwidth switching. However, this method introduces significant latency.

[0004] Therefore, a low-latency bandwidth adjustment method is needed. Summary of the Invention

[0005] In view of this, this application provides a bandwidth adjustment method that can reduce latency during link bandwidth switching.

[0006] In a first aspect, this application provides a bandwidth adjustment method applied to a high-speed serial computer extended bus standard system. The method includes: acquiring the real-time data volume of a target port within a target link; determining the target channel number corresponding to the target port based on the real-time data volume of the target port; if the target channel number of the target port is different from the number of enabled channels, generating a channel adjustment instruction based on the target channel number and the number of enabled channels; and sending the channel adjustment instruction to the target port to adjust the number of enabled channels of the target port.

[0007] In this embodiment, the real-time data volume of the target port in the target link of the high-speed serial computer extended bus standard system is acquired. Then, based on the real-time data volume, the target channel number corresponding to the target port is determined. If the target channel number differs from the enabled channel number of the target port, a channel adjustment command is generated and sent to the target port to adjust the channel number. This scheme acquires the real-time data volume of the target port, confirms the target channel number, and adjusts the enabled channel number of the target port based on the relationship between the target channel number and the enabled channel number. Compared to uniformly configuring the enabled channel number of ports within the target link through software, this method adjusts the enabled channel number of the target port based on the real-time data volume, reducing power consumption and latency, and improving the flexibility of the method.

[0008] In one optional implementation, determining the number of target channels corresponding to the target port based on the real-time data volume of the target port includes: obtaining the bandwidth and data transmission rate of the target port to determine the first capacity of each channel within the target port; and determining the number of target channels of the target port based on the first capacity and the real-time data volume.

[0009] In this embodiment, the first capacity of the target port is determined by acquiring the bandwidth and data transmission efficiency of the target port, thereby determining the number of target ports. This can improve resource utilization and the flexibility of bandwidth adjustment.

[0010] In one optional implementation, a channel adjustment instruction is generated based on the target number of channels and the enabled number of channels, including: determining a first channel of the target port based on the difference between the target number of channels and the enabled number of channels of the target port; and generating a channel adjustment instruction for the first channel.

[0011] In this embodiment, the first channel of the target port is determined based on the difference between the target number of channels and the number of enabled channels, and a channel adjustment command for the first channel is generated. This improves the flexibility of the method and the utilization rate of bandwidth resources, avoiding bandwidth waste or insufficient bandwidth.

[0012] In one optional implementation, determining the first channel of the target port based on the difference between the target number of channels and the number of enabled channels of the target port includes: if the difference is greater than zero, obtaining the number of disabled channels of the target port; if the difference is less than the number of disabled channels, selecting a first number of disabled channels as the first channel; the first number is the same as the difference.

[0013] In this embodiment, when the difference is greater than zero, a first number of disabled channels are determined as the first channel based on the difference, which can dynamically balance system pressure and adapt to sudden flow fluctuations.

[0014] In one optional implementation, determining the first channel of the target port based on the difference between the target number of channels and the number of enabled channels of the target port includes: obtaining the number of enabled channels of the target port when the difference is less than zero; selecting a second number of enabled channels as the first channel; the second number is the same as the absolute value of the difference.

[0015] In this embodiment of the application, when the difference is less than zero, a second number of enable channels are determined as the first channel based on the difference, which can avoid resource waste.

[0016] In one optional implementation, after issuing a channel adjustment command to the target port to adjust the number of enabled channels on the target port, the method further includes: updating the real-time data volume of the target port, and determining the difference between the target number of channels and the number of enabled channels on the target port based on the updated real-time data volume; if the difference is greater than zero, enabling a third number of disabled channels in the target port; the third number is the same as the difference; if the difference is less than zero, disabling a fourth number of enabled channels in the target port; the fourth number is the absolute value of the difference.

[0017] In this embodiment, the real-time data volume of the target port is updated, and the number of enabled channels of the target port is adjusted a second time based on the update result. This can improve the flexibility of the method, optimize resource allocation, and prevent increased latency caused by data lag.

[0018] Secondly, this application provides a bandwidth adjustment device, comprising: an acquisition module for acquiring the real-time data volume of a target port within a target link; a determination module for determining the target number of channels corresponding to the target port based on the real-time data volume of the target port; an adjustment module for generating a channel adjustment instruction based on the target number of channels and the enabled number of channels if the target number of channels of the target port is different from the enabled number of channels; and an update module for sending the channel adjustment instruction to the target port to adjust the enabled number of channels of the target port.

[0019] Thirdly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the bandwidth adjustment method of the first aspect or any corresponding embodiment described above.

[0020] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to perform the bandwidth adjustment method of the first aspect or any corresponding embodiment described above.

[0021] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the bandwidth adjustment method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the link width switching state machine transition in a high-speed serial computer extended bus standard system.

[0024] Figure 2 This is a flowchart illustrating a bandwidth adjustment method according to an embodiment of this application;

[0025] Figure 3 This is a flowchart illustrating another bandwidth adjustment method according to an embodiment of this application;

[0026] Figure 4 This is a schematic diagram of the structure of a high-speed serial computer expansion bus standard system according to an embodiment of this application;

[0027] Figure 5 This is a schematic diagram of the structure of a high-speed serial computer expansion bus standard system before single-port downscaling according to an embodiment of this application;

[0028] Figure 6 This is a schematic diagram of a high-speed serial computer expansion bus standard system with single-port downsampling according to an embodiment of this application;

[0029] Figure 7 This is a schematic diagram of the structure of a high-speed serial computer expansion bus standard system before multi-port downscaling according to an embodiment of this application;

[0030] Figure 8 This is a schematic diagram of the structure of a high-speed serial computer expansion bus standard system before and after multi-port downscaling according to an embodiment of this application;

[0031] Figure 9 This is a structural block diagram of a bandwidth adjustment device according to an embodiment of this application;

[0032] Figure 10 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] PCIe interfaces are widely used in high-speed interconnect devices. With the implementation of artificial intelligence and large-scale applications, the industry's demand for high-bandwidth, low-latency PCIe systems is becoming increasingly strong.

[0035] For high-speed I / O (Input / Output) chips, the PCIe protocol requires real-time transmission of large amounts of data. To support higher transmission efficiency, the PCIe standard protocol supports multi-port transmission. A port consists of one or more physical layers, and each port is independent of the others, enabling higher transmission efficiency.

[0036] In PCIe systems, changes in the link transmission environment can lead to link transmission errors or degraded link quality. Therefore, it's necessary to dynamically adjust the PCIe link width. However, this link width adjustment process involves link training, which consumes significant system latency. Furthermore, during this period, the link cannot transmit any effective data, significantly impacting transmission bandwidth.

[0037] Figure 1 This is a schematic diagram of the link width switching state machine transition in a high-speed serial computer extended bus standard system. Figure 1The upper part describes the speed switching method in the Configuration state. We can see that the LTSSM transitions from the normal L0 (full-function) state to the RCVRY (Recovery) state, and then to the Configuration state. During this process, the controller sends TS1 and TS2 streams to complete the link width switching. The Configuration states are sequentially: CFG_LNKWD_START (Configuration Link Width Start), CFG_LNKWD_ACCPT (Configuration Link Width Accept), CFG_LNKWD_WAIT (Configuration Link Width Wait), and CFG_COMPLETE (Configuration Complete). When switching the link width from x8 (eight channels) to x4 (four channels) in this way, a significant latency will occur due to the need to retrain the link.

[0038] In practical applications, the total time for switching the link width from x8 to x4 in this method is 8 microseconds because it involves retraining the link. Furthermore, during the switch from x8 to x4 via Configuration mode, the width-shaving process enters Recovery and Config Linkwidth states. At this time, all links need to enter Configuration state for retraining, which prevents data transmission and thus impacts transmission bandwidth.

[0039] Figure 1 Below is an example of reducing the link width from x8 to x4 using L0p (low power state). In practical applications, since L0p avoids entering Recovery for retraining, the total processing time is reduced to 700 nanoseconds.

[0040] In addition, in PCIe systems, each port typically operates independently, and their data transmission states differ. If the bandwidth is not adjusted individually based on the state of each port, it will affect resource utilization.

[0041] This application provides a bandwidth adjustment method. It acquires the real-time data volume of a target port in a high-speed serial computer extended bus standard system, then determines the target number of channels corresponding to the target port based on the real-time data volume. If the target number of channels differs from the number of enabled channels, a channel adjustment command is generated and sent to the target port to adjust the number of channels. This scheme acquires the real-time data volume of the target port, confirms the target number of channels, and adjusts the number of enabled channels based on the relationship between the target number and the number of enabled channels. Compared to uniformly configuring the number of enabled channels within a target link via software, this method allows for channel adjustment of the target port without affecting data service transmission, reducing power consumption and latency.

[0042] According to an embodiment of this application, a bandwidth adjustment method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0043] This embodiment provides a bandwidth adjustment method, which is applied to a high-speed serial computer expansion bus standard system. Figure 2 This is a flowchart of a bandwidth adjustment method according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps:

[0044] Step S201: Obtain the real-time data volume of the target port within the target link.

[0045] In high-speed serial computer extended bus standard systems, different devices have different data transmission bandwidth requirements. By adjusting the bandwidth, appropriate resources can be allocated to different connected devices, avoiding unnecessary resource waste. Therefore, the bandwidth can be adjusted according to the amount of data transmitted at the target port within the target link, thereby optimizing system power consumption.

[0046] For example, when the system does not require a large amount of data transmission, bandwidth can be reduced to decrease the system's power consumption. Bandwidth can also be reduced when the system load is low or connected devices are inactive, thereby lowering overall power consumption.

[0047] The target port within the target link can be determined based on the port settings in the high-speed serial computer expansion bus standard system. Specifically, an independent port within the system can be selected as the target port for subsequent bandwidth adjustments, which can reduce costs while ensuring system performance.

[0048] After identifying the target port, a traffic monitoring module can be used to obtain the real-time data volume of the target port. Alternatively, relevant network analysis software can be used to read the real-time data volume of the target port.

[0049] Step S202: Determine the number of target channels corresponding to the target port based on the real-time data volume of the target port.

[0050] First, determine the theoretical bandwidth of the target port's standard channel based on the basic parameters of the high-speed serial computer expansion bus standard system. Then, determine the theoretical number of channels required for the real-time data volume of the target port as the target number of channels.

[0051] Step S203: If the target number of channels and the number of enabled channels of the target port are different, then a channel adjustment command is generated based on the target number of channels and the number of enabled channels.

[0052] If the number of target channels on the target port is different from the number of enabled channels, it means that the bandwidth of the target port is not compatible with the amount of data being transmitted. The number of channels on the target port needs to be adjusted to accommodate the current amount of data being transmitted.

[0053] When the number of target channels exceeds the number of enabled channels, it indicates that the real-time data volume of the target port is large, which may lead to data congestion. In this case, it is necessary to appropriately increase the number of enabled channels on the target port to avoid system failures caused by data congestion.

[0054] When the number of target channels is less than the number of enabled channels, it indicates that the real-time data volume of the target port is relatively small, which will result in some resource waste. The number of enabled channels of the target port can be appropriately reduced to improve resource utilization.

[0055] Step S204: Send a channel adjustment command to the target port to adjust the number of enabled channels on the target port.

[0056] After generating the channel adjustment command, the channel adjustment command is sent to the target port to adjust the number of enabled channels on the target port. This can meet the bandwidth requirements of the target port while avoiding resource waste and improving system reliability and resource utilization.

[0057] After receiving a channel adjustment command, the target port can first analyze it to determine the first channel that needs adjustment and the adjustment type, so that the target port can adjust the first channel.

[0058] When the channel adjustment command is to reduce the number of enabled channels on the target port, the enabled channels that need to be turned off within the target port can be determined based on the number of enabled channels to be reduced, and then turned off.

[0059] In some alternative implementations, the enabled channel with the smallest data transmission volume can be selected to be turned off based on the data volume of each enabled channel within the target port, thereby reducing the impact on data transmission at the target port.

[0060] When the channel adjustment command is to increase the number of enabled channels of the target port, the channels that need to be opened within the target port can be determined according to the number of enabled channels to be added as needed, and then enabled to reduce the data transmission pressure of the originally enabled channels.

[0061] In some alternative implementations, the channels that need to be enabled can be selected based on the priority of the channels within the target port, thereby reducing the data transmission pressure on the originally enabled channels and improving the system's operating efficiency.

[0062] The bandwidth adjustment method provided in this embodiment acquires the real-time data volume of the target port in the target link of the high-speed serial computer extended bus standard system. Then, based on the real-time data volume, it determines the target channel number corresponding to the target port. If the target channel number differs from the enabled channel number of the target port, a channel adjustment command is generated and sent to the target port to adjust the channel number. This scheme acquires the real-time data volume of the target port, confirms the target channel number, and adjusts the enabled channel number of the target port based on the relationship between the target channel number and the enabled channel number. Compared to uniformly configuring the enabled channel number of ports within the target link through software, this method adjusts the enabled channel number of the target port based on the real-time data volume, reducing power consumption and latency, and improving the flexibility of the method.

[0063] This embodiment provides yet another bandwidth adjustment method, which is applied to a high-speed serial computer expansion bus standard system. Figure 3 This is a flowchart of a bandwidth adjustment method according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps:

[0064] Step S301: Obtain the real-time data volume of the target port within the target link.

[0065] Please see details Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0066] Step S302: Determine the number of target channels corresponding to the target port based on the real-time data volume of the target port.

[0067] Please see details Figure 2 Step S202 of the illustrated embodiment will not be described again here.

[0068] In some optional implementations, step S302 above includes:

[0069] Step S3021: Obtain the bandwidth and data transmission rate of the target port to determine the first capacity of each channel within the target port.

[0070] The bandwidth and data transmission efficiency of the target port can be determined based on the protocol of the high-speed serial computer extended bus standard system. Then, the product of the bandwidth and data transmission efficiency is calculated to obtain the initial capacity of the channel within the target port.

[0071] Step S3022: Determine the target number of channels for the target port based on the first capacity and the real-time data volume.

[0072] The target number of channels for the target port can be determined by calculating the quotient of the real-time data volume and the first capacity of the channel, and then rounding the quotient up.

[0073] In practical applications, the number of target channels can be adjusted based on the efficiency loss of channels within the target port during data transmission, thereby improving the stability of data transmission within the system.

[0074] In some possible implementations, when the target number of channels is greater than the maximum number of channels within the target port, the maximum number of channels is used as the target number of channels. This is to avoid errors in adjusting the channels at the target port.

[0075] Step S303: If the target number of channels and the number of enabled channels of the target port are different, then a channel adjustment command is generated based on the target number of channels and the number of enabled channels.

[0076] Specifically, step S303 includes:

[0077] Step S3031: Determine the first channel of the target port based on the difference between the target number of channels and the number of enabled channels of the target port.

[0078] Specifically, when the number of target channels on the target port is greater than the number of enabled channels, the number of first channels can be the difference between the number of target channels and the number of enabled channels. When the difference is greater than the number of disabled channels in the target port, the number of disabled channels in the target port can be used as the first channel. This is to avoid errors during channel adjustment and improve the robustness of the method.

[0079] If the number of target channels at the target port is less than the number of enabled channels, the number of the first channel can be the difference between the number of enabled channels and the number of target channels.

[0080] In some optional implementations, step S3031 above includes:

[0081] Step a1: If the difference is greater than zero, obtain the number of disabled channels of the target port.

[0082] Specifically, by calling relevant commands, the channel status information of the target port can be obtained, thereby determining the number of disabled channels on the target port.

[0083] If the difference is greater than the number of disabled channels, the number of the first channel is equal to the number of disabled channels at the target port.

[0084] Step a2: If the difference is less than the number of disabled channels, select the first number of disabled channels as the first channel; the first number is the same as the difference.

[0085] If the difference is less than the number of disabled channels, the same number of disabled channels as the difference can be selected as the first channel for subsequent channel enabling to meet the data transmission requirements within the port.

[0086] In some optional implementations, step S3031 above includes:

[0087] Step b1: If the difference is less than zero, obtain the number of enabled channels of the target port.

[0088] If the difference is less than zero, the number of enabled channels on the target port can be obtained by calling the relevant command.

[0089] Step b2: Select the second number of enable channels as the first channel; the second number is the same as the absolute value of the difference.

[0090] Step S3032: Generate a channel adjustment command for the first channel.

[0091] If the target number of channels is greater than the number of enabled channels, a channel shutdown command is generated for the first channel to adjust the channels of the target port.

[0092] If the target number of channels is less than the number of enabled channels, a channel enable command is generated for the first channel to adjust the channel of the target port.

[0093] Step S304: Send a channel adjustment command to the target port to adjust the number of enabled channels on the target port.

[0094] Please see details Figure 2 Step S204 of the illustrated embodiment will not be described again here.

[0095] In some optional implementations, the step S304 above is followed by:

[0096] Step S305: Update the real-time data volume of the target port, and based on the updated real-time data volume, determine the difference between the target channel number and the enabled channel number of the target port.

[0097] Please see Figure 2In step S201 of the illustrated embodiment, the real-time data volume of the target port is acquired and updated. Then, based on the updated real-time data volume, the target channel number corresponding to the target port is updated. The difference between the target channel number and the enabled channel number of the target port is recalculated. If the difference is equal to zero, it indicates that the real-time data volume of the target port is compatible with the bandwidth, and no adjustment to the enabled channel number of the target port is required.

[0098] Step S306: If the difference is greater than zero, enable the third number of disabled channels within the target port; the third number is the same as the difference.

[0099] If the difference is greater than zero, it indicates that there may be congestion in the data transmission at the target port. Therefore, it is necessary to enable a third number of disabled channels within the target port to prevent data loss due to congestion. The third number is the same as the difference.

[0100] In practice, the number of disabled channels in the target port may be less than the difference between the target number of channels and the number of enabled channels. Therefore, the third quantity is the number of disabled channels in the target port.

[0101] Step S307: If the difference is less than zero, close the fourth number of enabled channels in the target port; the fourth number is the absolute value of the difference.

[0102] If the difference is less than zero, it indicates that there may be resource waste in the data transmission of the target port. Therefore, the fourth enabled channel within the target port needs to be disabled to reduce power consumption. The fourth enabled channel is the same as the absolute value of the difference.

[0103] The bandwidth adjustment method provided in this embodiment determines the first channel of the target port based on the difference between the target number of channels and the number of enabled channels, and generates a channel adjustment command for the first channel. This can improve the flexibility of the method and the utilization rate of bandwidth resources, avoiding bandwidth waste or insufficient bandwidth problems.

[0104] Figure 4 This is a schematic diagram of a high-speed serial computer expansion bus standard system to which the bandwidth adjustment method provided in this application embodiment is applicable. The protocol corresponding to the high-speed serial computer expansion bus standard system in the figure is PCIe 6.0.

[0105] Reference Figure 4The PCIe system has eight independent ports, each with 8 channels (x8). The independent ports are PCIe Port_0, PCIe Port_1, PCIe Port_2, PCIe Port_3, PCIe Port_4, PCIe Port_5, PCIe Port_6, and PCIe Port_7. A traffic monitoring module is added to the PCIe system to monitor the throughput (total data) transmitted by each independent port per unit time.

[0106] In a specific implementation, the link transmission can be divided into several levels based on the throughput of each independent port per unit time and the data volume of all ports in the entire link, and the link can be adjusted according to the amount of data transmitted in the PCIe system.

[0107] In a practical application, the port channel is x8, and the link transmission is divided into 4 levels, representing the current data transmission volume. See Table 1:

[0108] Table 1

[0109] 1 0-10GB x1 2 10-20GB x2 3 20-40GB x4 4 40GB or more x8

[0110] With port channel x8, when the data throughput of the port is between 0 and 10 GB (gigabytes) per unit time, the port transmission level is level 1. This indicates that the data transmission volume of the port channel is small and the port channel is relatively idle, allowing for bandwidth reduction to save power. The expected width of this level is x1 (single channel), meaning that a width of x1 is sufficient to handle the data throughput of the port under the current port status, thus initiating the bandwidth reduction from x8 to x1.

[0111] During bandwidth reduction, channel 0, which is always active, can continue normal data transmission. When the data throughput of a single port of the link increases to a different expected bandwidth, the port is widened again, thus adaptively adjusting the link bandwidth.

[0112] For single-port links, the hardware can adaptively adjust the bandwidth using L0p based on the current data volume being transmitted on the port. This effectively saves system resources and power consumption without affecting normal service transmission.

[0113] In a practical application, the structural diagram of a single-port PCIe system is as follows: Figure 5As shown, the port has 8 channels, continuously transmitting data. A traffic monitoring module is installed within the system to monitor the port's data throughput. PCIeLane_0, PCIe Lane_1, PCIe Lane_2, PCIe Lane_3, PCIe Lane_4, PCIe Lane_5, PCIe Lane_6, and PCIe Lane_7 represent the port's eight channels. When the traffic monitoring module detects that the port's data throughput has decreased from 59GB to 30GB per unit time, requiring only four channels to complete data transmission, the port initiates L0p mode channel reduction, decreasing the port's channel count from x8 to x4. Figure 6 As shown, during the reduction of channels, PCIe Lane_0 to PCIe Lane_3 operate normally without affecting data transmission. The traffic monitoring module continuously monitors the data throughput within the port. Once the data throughput exceeds 40GB, L0p mode is restarted to increase the bandwidth, achieving adaptive dynamic adjustment of the link width.

[0114] For multi-port links, data from all ports can be monitored, and the link width of the ports can be adjusted using L0p based on the data volume of each port and the current bandwidth of each port.

[0115] In a practical application, the structural diagram of a multi-port PCIe system is as follows: Figure 7 As shown, the system includes a traffic monitoring module. The system comprises three ports: Port0 (x4), Port1 (x2, 2 channels), and Port2 (x2). Port0 corresponds to PCIe Lane_0, PCIe Lane_1, PCIe Lane_2, and PCIe Lane_3; Port1 corresponds to PCIe Lane_4 and PCIe Lane_5; and Port2 corresponds to PCIe Lane_6 and PCIe Lane_7. When the traffic monitoring module detects a decrease in the data throughput per unit time at any of the three ports, it reduces Port0 to x2, and both Port1 and Port2 reduce to x1. Figure 8 As shown, during the speed reduction process, PCIe Lane_0, PCIe Lane_1, PCIe Lane_4, and PCIe Lane_6 all operate normally and do not affect data transmission. 5) The traffic monitoring module continuously counts the data throughput. Once the data throughput exceeds the threshold, it initiates the L0p mode bandwidth increase operation to achieve adaptive dynamic adjustment of the link width.

[0116] In some alternative implementations, PCIe systems are deployed in servers and data centers, where data transmission is highly periodic. Therefore, the bandwidth selection can be dynamically adjusted according to different application scenarios to ultimately optimize bandwidth and power consumption. Future expansion can incorporate the latest AI (Artificial Intelligence) training algorithms to predict the bandwidth of each port as the amount of data transmitted increases, providing a more accurate reference for system bandwidth control and enabling more precise dynamic adjustment of the PCIe system's width.

[0117] This application addresses the issue of the lack of a defined hardware-based method for controlling link width switching in the PCIe 6.0 protocol, where a new L0p state was added. By innovatively incorporating a hardware traffic monitoring module, the link width is adaptively adjusted via L0p based on the data throughput of each port. This dynamic adjustment of link width saves power without affecting data service transmission.

[0118] In addition, the method can dynamically configure the throughput level of each port according to different application scenarios, thereby making more flexible adjustments to the link width for different deployment scenarios and optimizing system power consumption.

[0119] In addition, by utilizing the L0p state added by the PCIe 6.0 protocol, there is no need to add a new LTSSM state. The implementation method is simple, highly versatile, and the newly added port traffic monitoring modules can be easily integrated into existing solutions.

[0120] This embodiment also provides a bandwidth adjustment device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0121] This embodiment provides a bandwidth adjustment device, such as... Figure 9 As shown, it includes:

[0122] The acquisition module 901 is used to acquire the real-time data volume of the target port within the target link;

[0123] The determination module 902 is used to determine the number of target channels corresponding to the target port based on the real-time data volume of the target port;

[0124] The adjustment module 903 is used to generate a channel adjustment command based on the target number of channels and the enabled number of channels if the target number of channels and the enabled number of channels of the target port are different.

[0125] The update module 904 is used to send channel adjustment commands to the target port to adjust the number of enabled channels on the target port.

[0126] In some alternative implementations, the determining module 902 includes:

[0127] The first capacity determination unit is used to obtain the bandwidth and data transmission rate of the target port in order to determine the first capacity of each channel within the target port.

[0128] The target channel number determination unit is used to determine the target channel number of the target port based on the first capacity and the real-time data volume.

[0129] In some alternative implementations, the adjustment module 903 includes:

[0130] The first channel determination unit is used to determine the first channel of the target port based on the difference between the number of target channels and the number of enabled channels of the target port.

[0131] Specify the generation unit for generating channel adjustment instructions for the first channel.

[0132] In some optional implementations, the first channel determining unit includes:

[0133] The disabled channel count acquisition subunit is used to acquire the number of disabled channels of the target port when the difference is greater than zero.

[0134] The first selection subunit is used to select a first number of disabled channels as the first channel when the difference is less than the number of disabled channels; the first number is the same as the difference.

[0135] In some optional implementations, the first channel determining unit includes:

[0136] The Enable Channel Count Acquisition Subunit is used to acquire the number of enabled channels of the target port when the difference is less than zero.

[0137] The second selection subunit is used to select a second number of enable channels as the first channel; the second number is the same as the absolute value of the difference.

[0138] In some alternative implementations, the bandwidth adjustment device includes:

[0139] The update module is used to update the real-time data volume of the target port and, based on the updated real-time data volume, determine the difference between the target number of channels and the number of enabled channels of the target port.

[0140] The enable module is used to enable a third number of disabled channels within the target port when the difference is greater than zero; the third number is the same as the difference.

[0141] The shutdown module is used to shut down the fourth number of enabled channels within the target port when the difference is less than zero; the fourth number is the absolute value of the difference.

[0142] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0143] In this embodiment, the bandwidth adjustment device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0144] This application also provides a computer device having the above-described features. Figure 9 The bandwidth adjustment device shown.

[0145] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application, such as... Figure 10 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 10 Take a processor 10 as an example.

[0146] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0147] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0148] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0149] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0150] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.

[0151] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.

[0152] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0153] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0154] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A bandwidth adjustment method, characterized in that, The method is applied to a high-speed serial computer extended bus standard system, and the method includes: Obtain the real-time data volume of the target port within the target link; The number of target channels corresponding to the target port is determined based on the real-time data volume of the target port; If the target number of channels for the target port is different from the number of enabled channels, a channel adjustment command is generated based on the target number of channels and the number of enabled channels. For a single-port link, the bandwidth is adjusted using L0p based on the current data volume level of the port link. For a multi-port link, the link width is adjusted using L0p based on the data volume of the port and the port's current data volume level. A channel adjustment command is sent to the target port to adjust the number of enabled channels on the target port.

2. The method according to claim 1, characterized in that, Determining the number of target channels corresponding to the target port based on the real-time data volume of the target port includes: The bandwidth and data transmission rate of the target port are obtained to determine the first capacity of each channel within the target port; Based on the first capacity and the real-time data volume, the target number of channels for the target port is determined.

3. The method according to claim 1, characterized in that, The step of generating channel adjustment instructions based on the target number of channels and the enabled number of channels includes: The first channel of the target port is determined based on the difference between the target number of channels and the number of enabled channels of the target port; Generate a channel adjustment command for the first channel.

4. The method according to claim 3, characterized in that, Determining the first channel of the target port based on the difference between the target channel number and the enabled channel number of the target port includes: If the difference is greater than zero, obtain the number of disabled channels of the target port; If the difference is less than the number of disabled channels, a first number of disabled channels are selected as the first channel; the first number is the same as the difference.

5. The method according to claim 3, characterized in that, Determining the first channel of the target port based on the difference between the target channel number and the enabled channel number of the target port includes: If the difference is less than zero, obtain the number of enabled channels of the target port; Select a second number of enable channels as the first channel; the second number is the same as the absolute value of the difference.

6. The method according to any one of claims 1-3, characterized in that, After sending the channel adjustment command to the target port to adjust the number of enabled channels on the target port, the method further includes: Update the real-time data volume of the target port, and based on the updated real-time data volume, determine the difference between the target number of channels and the number of enabled channels of the target port; If the difference is greater than zero, enable a third number of disabled channels within the target port; the third number is the same as the difference. If the difference is less than zero, a fourth number of enabled channels within the target port are disabled; the fourth number is the absolute value of the difference.

7. A bandwidth adjustment device, characterized in that, The device includes: The acquisition module is used to acquire the real-time data volume of the target port within the target link; The determination module is used to determine the number of target channels corresponding to the target port based on the real-time data volume of the target port; The adjustment module is used to generate a channel adjustment command based on the target number of channels and the enabled number of channels if the target number of channels for the target port is different from the enabled number of channels. For a single-port link, the bandwidth is adjusted using L0p based on the current data volume level of the port link. For a multi-port link, the link width is adjusted using L0p based on the data volume of the port and the port level. The update module is used to send channel adjustment instructions to the target port to adjust the number of enabled channels of the target port.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the bandwidth adjustment method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the bandwidth adjustment method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the bandwidth adjustment method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Link width adjusting method and device, equipment and storage medium

    CN112433596A

  • SYSTEMS AND METHODS FOR REDUCING LATENCY AND POWER CONSUMPTION IN A PERIPHERAL COMPONENT INTERCONNECT EXPRESS (PCIe) SYSTEM

    US20240419613A1