WO2012106934A1 - Pci快速通道设备、链路能量管理方法及系统 - Google Patents

Pci快速通道设备、链路能量管理方法及系统 Download PDF

Info

Publication number
WO2012106934A1
WO2012106934A1 PCT/CN2011/077657 CN2011077657W WO2012106934A1 WO 2012106934 A1 WO2012106934 A1 WO 2012106934A1 CN 2011077657 W CN2011077657 W CN 2011077657W WO 2012106934 A1 WO2012106934 A1 WO 2012106934A1
Authority
WO
WIPO (PCT)
Prior art keywords
link
bit width
rate
current
adjustment
Prior art date
Application number
PCT/CN2011/077657
Other languages
English (en)
French (fr)
Inventor
李延松
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2011/077657 priority Critical patent/WO2012106934A1/zh
Priority to CN201180001310XA priority patent/CN102439916B/zh
Priority to EP11858152.9A priority patent/EP2685760B1/en
Publication of WO2012106934A1 publication Critical patent/WO2012106934A1/zh
Priority to US14/083,826 priority patent/US9423864B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3278Power saving in modem or I/O interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3253Power saving in bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4009Coupling between buses with data restructuring
    • G06F13/4018Coupling between buses with data restructuring with data-width conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to communication technologies, and in particular, to a PCI fast channel device, a link energy management method and system. Background technique
  • PCI Fast Track provides a high-speed point-to-point serial communication link for PCI Fast Track devices.
  • the PCI Express channel is used for multimedia, high-speed LAN and other data. Intensive applications provide sufficient bandwidth while also facing energy management issues in the link.
  • the power consumption in the PCI fast channel link increases as the link bandwidth increases, and the link bandwidth is related to the link transmission rate and bit width.
  • the link bandwidth can be reduced by reducing the link transmission rate or bit width, thereby reducing the power consumption of the link.
  • the link transmission rate or bit width is increased.
  • the bandwidth of the link meets the service requirements of the link. Therefore, energy management of the link can be achieved by adjusting the rate and/or bit width of the link.
  • the PCI Express channel device can control the physical layer state machine migration according to the traffic volume in the link, and adjust the rate or the bit width of the PCI fast channel link by controlling the physical layer state machine migration, thereby implementing the service according to the service.
  • the amount of energy is used to manage the energy of the link.
  • the PCI Express channel device controls its physical layer state machine to enter the recovery state from the normal working state, that is, interrupts the data transmission and reception in the current link, and then enters the configuration state, in the configuration state.
  • the PCI Express Channel device can achieve the required bandwidth by adjusting the link rate or bit width to achieve energy management for the PCI Express Channel link.
  • the embodiments of the present invention provide a PCI fast channel device, a link energy management method, and a system, which are used to solve the problem that the transmission data is easily lost in the PCI fast channel link energy management process.
  • an embodiment of the present invention provides a PCI fast channel link energy management method, including:
  • the first device acquires adjustment information for adjusting a current rate and/or a bit width of the PCI Expressway link
  • the first device stops data transmission, and clears a master device enable bit of a configuration space command register of the second device of the link end, so that the second device stops data transmission after the current data transmission ends;
  • the first device performs an adjustment process on the rate and/or the bit width of the link according to the adjustment information; the first device resumes data transmission, and re-enables the location of the master device to enable the first A device and a second device retransmit data by adjusting the processed rate and/or bit width.
  • the embodiment of the invention further provides a PCI fast channel device, including:
  • An obtaining module configured to obtain adjustment information for adjusting a current rate and/or a bit width of a PCI fast channel link
  • control module configured to stop data transmission of the PCI fast channel device, and clear a master device enable bit of a configuration space command register of the link peer device, so that the peer device stops data after the current data transmission ends Transmitting; further for recovering data transmission of the PCI Express channel device after the rate and/or bit width adjustment processing of the link, and re-enabling the location of the master device to enable the PCI fast channel device and The peer device retransmits the data by adjusting the processed rate and/or the bit width;
  • a processing module configured to adjust a link rate and/or a bit width according to the adjustment information Reason.
  • the embodiment of the present invention further provides a PCI fast channel link energy management system, including: a first device and a second device that mutually transmit and receive data, the first device is the PCI fast channel device, and the second device is A device at the upstream interface of a PCI Express Channel or a PCI Fast Track switch.
  • a PCI fast channel link energy management system including: a first device and a second device that mutually transmit and receive data, the first device is the PCI fast channel device, and the second device is A device at the upstream interface of a PCI Express Channel or a PCI Fast Track switch.
  • the PCI fast channel device realizes energy management of the link by dynamically adjusting the link rate and/or the bit width; and before the link rate and/or the bit width is adjusted, the link is cleared first.
  • the master device enable bit of the configuration space command register of the peer device, so that the link peer device stops data transmission after the current data transmission ends, and ensures that the data being sent and received in the link is not lost due to link adjustment, thereby Ensure that link adjustment does not affect the services of the link.
  • FIG. 1 is a flowchart of an embodiment of a PCI fast channel link energy management method according to the present invention
  • FIG. 2 is a partial flowchart of another embodiment of a PCI fast channel link energy management method according to the present invention.
  • FIG. 3 is a detailed flowchart of performing energy management on a link during operation of a first device according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an embodiment of a PCI fast channel device according to the present invention.
  • FIG. 5 is a schematic structural diagram of another embodiment of a PCI fast channel device according to the present invention.
  • FIG. 6 is a schematic structural diagram of an embodiment of a PCI fast channel link energy management system according to the present invention
  • FIG. 7 is a diagram showing an example of application to a PCI fast channel system according to an embodiment of the present invention. detailed description
  • FIG. 1 is a flowchart of an embodiment of a method for managing a link energy of a PCI fast channel according to the present invention. As shown in FIG. 1 , the method in this embodiment includes:
  • Step 101 The first device acquires adjustment information for adjusting a current rate and/or a bit width of the PCI fast channel link.
  • the first device and the second device are PCI fast channel devices that transmit and receive data to each other through a PCI fast channel link.
  • the first device can be the root complex device of the PCI fast channel.
  • the first device may take corresponding measures according to the obtained adjustment information for adjusting the current rate and/or the bit width of the PCI fast channel link. The link is adjusted.
  • the adjustment information acquired by the first device may be information generated by the first device after detecting the link parameter, the working state, or the like, or may be configured to obtain the configuration information adjusted for the link, such as a pair set by the user. Information about the link being adjusted. Because the traffic in the PCI Expressway link dynamically changes with the service requirements of the PCI Expressway device. For example, the traffic of the telecommunication device is small in the early morning every day. If the communication bandwidth is the same as during the day, The energy consumption is very large. When the service is busy, if the bandwidth of the communication link is insufficient, the communication service is affected. Therefore, the PCI fast channel device should be able to dynamically adjust the link as the traffic in the link changes. Bandwidth.
  • the PCI Express channel device can control the generation of adjustment information by detecting the traffic of the link or the like.
  • Step 102 The first device stops data transmission, and clears a master device enable bit of a configuration space command register of the second device of the link end, so that the second device stops data transmission after the current data transmission ends.
  • the first device After acquiring the adjustment information, the first device actively stops the data transmission of the local end, and at the same time, clears the master device enable bit of the second device of the PCI Express channel link, so that the second device sends the data packet currently being sent. After the end, the new data is stopped. When the first device and the second device stop transmitting data, there is no data in the link. The first device can adjust the link as needed.
  • the master enable bit in this embodiment is the bit 2 (master enable) in the 16-bit command register at the offset address 04 in the configuration space of the second device. The master enable bit indicates whether the PCI fast channel device can Send data out as the primary device.
  • the device can actively send data to the PCI Expressway link; when it is 0, the device cannot actively send data, and can only passively accept access from other devices.
  • a PCI Express channel device such as an Ethernet controller.
  • One side of the Ethernet controller is connected to the PCI Express channel link, and the other side is connected to an Ethernet link. Ethernet can be implemented through the Ethernet controller.
  • the transfer of data between the PCI Express channel and the PCI Express Channel such as forwarding data packets received from the Ethernet to the PCI Expressway link.
  • the master enable bit of the Ethernet controller is cleared, it will not actively send data to the PCI Express channel link on the PCI Express channel side, including data packets and message packets, and it will go to the Ethernet chain.
  • the traffic side sends a flow control packet, and the other device is required to temporarily send data to itself.
  • the first device sets the master enable bit of the second device to control the data transmission of the second device. When the second device needs to stop sending data to the second device, the master enable bit of the second device may be cleared. After the master enable bit is cleared, the two devices will automatically stop sending data to the PCI fast channel link, so that the second device stops sending data to the first device.
  • the first device clears the master device enable bit of the second device at the opposite end of the link, Waiting for a predetermined period of time, so that the second device sends the current data packet and then adjusts the link. Specifically, the first device waits for a predetermined time to generate stop information after clearing the master device enable bit of the configuration space command register of the second device of the link end, and waits for a predetermined time according to the
  • the maximum packet length defined by the PCI Express Channel Specification and the current transmission rate of the link are estimated, and the waiting time is generally not more than 1 millisecond; or the first device ends the acquisition of the received current data packet sent by the second device.
  • the stop information is generated after the flag; the first device restarts the adjustment process of the link rate and/or the bit width according to the stop information.
  • Step 103 The first device performs an adjustment process on a link rate and/or a bit width according to the adjustment information.
  • the first device can adjust the link rate and bit width according to the obtained adjustment information. If the traffic in the link is small, reduce the link transmission rate or bit width or reduce the link rate and bit width to save the link power consumption. When the traffic in the link is large, increase the link. The transmission rate or bit width or both increases the link rate and bit width to meet the traffic requirements of the link transmission.
  • the PCI Express Channel device is configured according to the PCI Express Channel Specification and is configured with a plurality of control and status registers. By setting the enable bit value of the register, the device can perform or not perform the corresponding function or obtain some state values.
  • the main registers involved are link control register, link status register, link control 2 register, etc., where the link control register bit 5 (retrain link) is triggered.
  • the enable bit of the renegotiation at both ends of the link the link state of the link status register stores a link negotiation state value indicating whether the link is negotiated, and the link state register stores the chain in bit 3-0.
  • the current transmission rate value of the path, the current bit width of the link is stored in bit 9-4 of the link status register, and the desired link rate value can be set in bit 3-0 of the second register of the link control.
  • different chip vendors can customize the functions of some registers in their chip products according to specific needs.
  • the first device may also initiate renegotiation with the second device, so that the first device and the second device will send and receive data rates and/or bits. Width adjustment to adjust the rate and/or bit width of the processed link, ensuring that the rate and bit width of data transmitted and received at both ends match the rate and bit width of the adjusted link of the first device, and the first device is at both ends After the renegotiation is completed and the negotiation is completed, the data transmission and reception at both ends of the link is resumed.
  • the PCI Express channel device adjusts the link processing, if the bit 5 of the link control register is 1, the PCI Express channel device will initiate renegotiation with the link peer device, and after renegotiation, the PCI fast channel The device confirms that the negotiation is completed through bitl l of the link status register. Since each PCI fast channel device adjusts the link rate and/or bit width, the link status register bits 3-0 and bit 9-4 are updated according to the adjustment. The corresponding rate and bit width are in the middle. Therefore, the PCI Express channel device can confirm whether the rate and the bit width after the negotiation is completed are consistent with the expected value through bit 3-0 and bit 9-4 of the link status register. After confirming that the renegotiation is completed, The first device can retransmit data by the rate and bit width corresponding to bits 3-0 and bit 9-4 of the link status register.
  • the first device may adjust the link rate according to the obtained adjustment information, adjust the bit width of the link, and adjust the link rate and the bit width at the same time.
  • the first device when adjusting the rate of the link, can adjust by directly setting the desired link rate. Specifically, if the obtained adjustment information is to reduce or increase the current rate of the link to a certain link rate, the first device may write the link rate to bit 3-0 of the link control 2 register. Therefore, when the first device adjusts the current rate of the link, the current rate of the link can be adjusted according to the rate value written in bit 3-0 of the link control 2 register.
  • the first device may adjust the bit width of the link by setting a channel prohibition function of the interface link. Specifically, if the obtained adjustment information is to reduce the current bit width of the link to a certain link bit width, the first device turns off the link bit width and the link level width by the previous level. Any interface link channel between link widths adjusts the current bit width of the link. Take the initial bit width of the link as x8 (defined as laneO-7) as an example. When you want to adjust the link bit width to x4, you only need to turn off any one of lane4-7. If you want to adjust to 2, You need to turn off any of lane2, 3; if you want to adjust to 1, turn off lanel Just fine.
  • x8 defined as laneO-7
  • the configuration operation method is similar. If the adjustment information is to increase the current bit width of the link to a certain link bit width, the first device performs the current bit width of the link by enabling all interface link channels corresponding to the link bit width. Adjustment processing. For example, if you need to restore the current bit width x4 bit width to x8, you must enable lane4-7 all. If you restore the bit width of xl to x8, you must enable lanell-7.
  • the link bit width adjustment implemented in this manner is based on the fact that most PCI fast channel devices generally do not have the function of dynamically adjusting the bit width, but generally provide an enabling function of a certain channel (lane) of the interface link, and the present invention
  • the embodiment uses the function of the lane to simulate the failure of a link by turning off the lane.
  • the active trigger device re-negotiates with the peer device to re-determine the link.
  • the bit width is used to shield the faulty link to obtain a smaller bit width.
  • the link bit width is increased, the previously masked lane can be re-enabled, and then the device and the peer are actively triggered.
  • the device re-negotiates and re-determines the bit width of the link to obtain a larger bit width, so that the device without the bit width adjustment function can implement the bit of the link by controlling the enable function of the interface link lane.
  • the wide adjustment means that the energy management of the link is completed by the bit width adjustment on the device without the bit width adjustment function.
  • the PCI fast channel supports multiple bit widths, for example, 1, 2, 4, 8, 16, and 32 lanes can be selected in a link, that is, the link supports xl, x2, x4, x8, xl6, x32.
  • the bit width can be flexibly configured according to the application in use, so the channel width of the link is adjusted by setting the channel prohibition function of the interface link to have more flexibility for energy management of the link.
  • the adjustment of the bit width of the link may be adjusted by directly setting a desired bit width by the first device. Specifically, if the obtained adjustment information is to reduce or increase the current bit width of the link to If a certain link width is desired to be adjusted, the first device adjusts the current bit width of the link by setting the current bit width of the link to the desired link width, in a specific application. This can be achieved in a similar manner to the above adjustment of the rate.
  • Step 104 The first device resumes data transmission, and re-enables the location of the master device, so that the first device and the second device retransmit and transmit the rate and/or the bit width after the adjustment process. According to.
  • the data in the link needs to be restored in time.
  • the first device can initiate data transmission to the link.
  • the first device passes the The master enable bit of the second device is set to retransmit data to the link.
  • the link adjustment is completed after the two ends of the link recover data after receiving and processing the adjusted rate and/or the bit width. If the rate and/or the bit width in the link need to be dynamically adjusted according to the service traffic in the link. , repeat the above steps.
  • the first device after acquiring the adjustment information for adjusting the link, the first device does not directly interrupt the data transmission and reception at both ends, but uses corresponding protection measures for the ongoing data transmission and reception in the link to avoid being sent and received. data lost. Because the PCI Express channel link is in normal operation, there will be data transmission and reception on the PCI Fast Track link. If the link device is not protected, the rate or bit width is adjusted, and the upper layer of the link device is the software layer or device. If the core layer still sends data continuously, it will inevitably cause data loss. Therefore, it is necessary to suspend the data transmission of the upper layer first, then start the link adjustment and renegotiation, and then resume the data transmission after completion, thereby avoiding the underlying link. The operation has an impact on the business.
  • the first device that initiates the adjustment of the link actively stops the local data transmission, and controls the peer device to send the data currently being sent by clearing the master enable bit of the second device configuration space command register of the link peer. Stop the data transmission after the completion, on the one hand, let the peer device control the other device that sends the data to the PCI Express channel link through the peer device to suspend sending data to itself, and on the other hand, let the peer device quickly forward to the PCI. After the data packet sent by the channel link is sent, the new data packet is sent, so that the first device stops the data transmission on both ends of the link and then adjusts the link to ensure that the link adjustment does not affect the service.
  • the energy management of the link can be implemented by adjusting the rate and/or the bit width of the link; and before the rate and/or the bit width of the link is adjusted, the configuration space of the link peer device is cleared first.
  • the master device enable bit of the command register, so that the link peer device stops data transmission after the current data transmission ends, ensuring that the data being transmitted in the link is not lost due to link adjustment, thereby ensuring that the link adjustment does not affect.
  • the service of the link further, by setting the enable function of the lane of the interface link
  • the bit width adjustment of the link can be implemented on a device without a bit width adjustment function, which is advantageous for adopting a more flexible bit width adjustment method for energy management of the link.
  • the first device before acquiring the adjustment information for adjusting the link, may further include: determining, by the first device, whether the current link state is determined according to the detection, whether the rate or the bit width is adjusted, and what is satisfied. The operation of adjusting the rate or bit width of the link.
  • FIG. 2 is a partial flow chart of another embodiment of a method for managing energy of a PCI fast-track link according to the present invention. As shown in FIG. 2, before the step 101 shown in FIG. 1 , the method in this embodiment may further include:
  • Step 201 The first device reads the current rate and bit width of the link from the link status register.
  • Step 202 Perform adjustment processing on the current rate and/or the bit width of the link according to the rate and bit width that the link can transmit and the current rate and bit width of the link.
  • the first device can read the current transmission rate value and the bit width value of the link from bit 3-0 and bit 9-4 of the link status register respectively, and can determine whether the pair is correct according to the obtained rate and the bit width. It is adjusted, for example, the link current rate is 2.5 Gbps, the bit width is x8, and the link can transmit a minimum rate of 2.5 Gbps, and the maximum bit width is x8. If the bandwidth of the link needs to be adjusted to a low position The bit width can only be adjusted, and the rate cannot be adjusted. If the bandwidth of the link needs to be adjusted to a higher position, the rate can only be adjusted, and the bit width cannot be adjusted.
  • the method of determining the adjustment rate and/or the bit width is similar. Therefore, the first device can determine the rate and/or the bit width of the link based on the current rate and bit width.
  • Step 203 The first device acquires current service traffic of the link.
  • the first device acquiring the current service traffic of the link may include, but is not limited to, obtaining the current traffic (Traffic) as follows:
  • the first device obtains the number of times the packet is received or received by the link in a unit time or the number of interruptions; and determines the current service traffic of the link according to the number of the packets or the number of interruptions.
  • the real device checks The traffic of the link is measured to determine if the rate and/or bit width of the current link needs to be adjusted.
  • Step 204 Generate a pair according to a comparison result between the service traffic and a preset traffic threshold.
  • the first device compares the obtained service traffic with the preset traffic threshold, and generates corresponding adjustment information according to the comparison result, so that the adjustment of the link is started according to the adjustment information.
  • the service traffic is compared with the traffic threshold. If the service traffic is greater than the traffic threshold, that is, the traffic in the link is relatively busy, then The current bandwidth of the link needs to be increased to meet the service requirements when the link is busy. Therefore, the current rate and/or the bit width of the link can be adjusted. If the service traffic is smaller than the traffic threshold, the link is If there are relatively few services, the current bandwidth of the link needs to be reduced to reduce the power consumption when the link traffic is small.
  • the first device may have different traffic thresholds each time the traffic is acquired. For comparison, the device can be adjusted in stages according to the size of the traffic, and the current rate and bit width of the link can be accurately adjusted to an appropriate value.
  • the specific operation is: the first device generates, according to a comparison result between the service traffic and a preset traffic threshold, a current rate and/or a bit width of the link to be adjusted to a rate corresponding to the traffic threshold.
  • Bit width adjustment information For example, the PCI Express Channel device interface link currently has a rate of 5 Gbps and a bit width of x8. This rate and bit width can be adjusted downward.
  • the traffic is divided into two thresholds Thrl and Thr2, and Thrl>Thr2, the first threshold.
  • the Thrl and the second threshold Thr2 respectively correspond to different bandwidths, and the adjustment of the bandwidth may be performed by adjusting the rate or by using the alignment width, or both.
  • the link rate can be reduced from 5 Gbps to 2.5 Gbps, and the link width can be reduced to x4; when the traffic is lower than the second threshold Thr2, if the last time After the bandwidth is reduced, the bit width is x4, and the link width can be reduced to xl. If the rate is lower, the bit width can be reduced from x8 to x4 in this adjustment.
  • the link rate can be increased from 2.5 Gbps to 5 Gbps, and the bit width can be increased from xl to x4.
  • the bit width can be further increased from x4 to x8. If the rate is increased last time, the bit width can be increased from xl. To x4.
  • the traffic transmitted in the link is dynamically changed by setting the traffic threshold to multiple It is more suitable for the dynamic adjustment of the dynamic change of the traffic in the link in the actual application.
  • the link can reduce the bandwidth when the service is not busy, thereby reducing the power consumption in the link.
  • the link increases bandwidth to meet business needs when traffic is heavy.
  • the first device determines whether the link can be adjusted by using the current rate and the bit width, and is in the link. When the service traffic meets the adjustment condition, the corresponding adjustment information is generated to initiate the adjustment of the link. Further, by setting multiple traffic thresholds, the device can be adjusted in stages according to the service traffic size, and the current link can be Accurate adjustment of the rate and bit width to the appropriate values not only ensures the real-time business needs of the link, but also effectively manages the energy of the link.
  • FIG. 3 is a detailed flowchart of performing energy management on a link in a running process of a first device according to an embodiment of the present invention. As shown in FIG. 3, the first device performs operations in operation as follows:
  • Step 301 Read a current link rate and a bit width from the link status register.
  • Step 302 Confirm that the current rate and/or the bit width of the link can be adjusted.
  • Step 303 Obtain current service traffic of the link.
  • Step 306 The service traffic is compared with a preset traffic threshold. If the traffic is less than the threshold, step 305 is performed. If the traffic is greater than the threshold, step 306 is performed.
  • Step 305 generating adjustment information that reduces the current rate and/or the bit width of the link by one step, and further performing step 307;
  • Step 306 Generate adjustment information that increases a current rate and/or a bit width of the link by one level.
  • Step 307 Stop sending data.
  • Step 308 Clear the master device enable bit of the peer device configuration space command register.
  • Step 309 Wait for a predetermined time, so that the peer device sends the current data.
  • Step 310 Adjust the bit width or adjust the link width by turning off or turning on the corresponding interface link channel or specifying the link width to be adjusted.
  • the second register specifies a link rate that is desired to be adjusted to adjust the rate;
  • Step 311 Start renegotiation and confirm that the negotiation is completed.
  • Step 312 Re-set the master device enable bit of the peer device, so that the peer device retransmits data.
  • the first device can complete the link adjustment by performing the foregoing operations. If the service traffic in the link can be adjusted compared with the preset other traffic thresholds, the foregoing operation step 304 and subsequent operations can be performed again. .
  • the PCI fast channel device of this embodiment includes: an obtaining module 40, a control module 41, and a processing module 42, wherein 40.
  • the adjusting information is used to obtain adjustment information for adjusting a current rate and/or a bit width of the PCI fast channel link.
  • the control module 41 is configured to stop data transmission of the PCI fast channel device, and clear the link end.
  • a master device enable bit of a configuration space command register of the second device, such that the second device stops data transmission after the current data transmission ends; and is further configured to resume the rate after the link rate and/or bit width adjustment processing Data transmission of the PCI Express channel device, and re-setting the master device enable bit, so that the PCI fast channel device and the second device retransmit data by adjusting the processed rate and/or bit width; the processing module 42 And adjusting the rate and/or the bit width of the link according to the adjustment information.
  • the control module 41 first stops the data transmission of the link fast PCI channel device, and then clears the peer device. After the primary device enables the data transmission, the peer device stops the data transmission after the current data is sent. After the devices at both ends of the PCI Express channel link stop transmitting and receiving data, the processing module 42 pairs the link according to the adjustment information acquired by the acquiring module.
  • the control module 41 restores the data transmission of the local end, and at the same time, re-sets the master device enable bit of the peer device, so that the data is also re-transmitted, and the link is restored to the normal transmission state after the adjustment.
  • the processing module of the embodiment of the present invention can implement energy management of the link by adjusting the rate and/or the bit width of the link; and before the processing module adjusts the rate and/or the bit width of the link, the control module clears the link first.
  • the master device enable bit of the configuration space command register of the peer device, so that the link peer device stops data transmission after the current data transmission ends, and ensures that the data being transmitted in the link is not lost due to link adjustment, thereby Ensure that link adjustment does not affect the services of the link.
  • FIG. 5 is a schematic structural diagram of another embodiment of a PCI fast track device according to the present invention.
  • the obtaining module 40 may include The plurality of obtaining units are configured to obtain corresponding pre-processing information
  • the control module 41 may include a generating unit, configured to generate corresponding control information
  • the processing module 42 may include a negotiating unit, configured to renegotiate with the peer device.
  • the obtaining module 40 includes a first obtaining unit 401, a second obtaining unit 403, a third obtaining unit 405, a determining unit 402, and a generating unit 404.
  • the first obtaining unit 401 is configured to read the current rate and the bit width of the link from the link status register.
  • the determining unit 402 is configured to determine the pair according to the rate and the bit width that the link can transmit and the current rate and the bit width. The current rate of the link and the current rate and/or bit width of the path are adjusted.
  • the second obtaining unit 403 is configured to obtain the number of times the packet is received or received by the link in a unit time, or the number of interruptions, and determine the current service traffic of the link according to the number of times of the packet or the number of interruptions.
  • the determining unit 402 determines, when the link can be adjusted, the adjustment information about the current rate and/or the bit width of the PCI fast channel link according to the comparison result of the service traffic and the preset traffic threshold, and the generating unit 404
  • the service traffic obtained by the second obtaining unit 403 can be compared with a preset different traffic threshold, so that the PCI fast channel device can adjust the link in stages according to the service traffic size, and can The current rate and bit width of the link are precisely adjusted to the appropriate values.
  • Third acquisition unit 405 is configured to acquire the adjustment information generated by the generating unit 404, so that the control module 41 starts the transmission of the stop link data, and the processing module 42 performs corresponding adjustment processing according to the adjustment information.
  • the control module 41 includes a stop unit 411, a recovery unit 413, and a generation unit 412.
  • the stopping unit 411 is configured to stop data transmission of the PCI fast channel device, and clear the master device enable bit of the configuration space command register of the link peer device, so that the peer device sends the current data after the end of the current data transmission. Stop data transmission.
  • the recovery unit 413 is configured to resume data transmission of the PCI fast channel device after the rate and/or bit width adjustment processing of the link, and re-enable the location of the master device to enable the PCI fast channel device and The peer device retransmits the data by adjusting the processed rate and/or bit width.
  • the generating unit 412 is configured to wait for a predetermined time to generate stop information after the unit 411 clears the master device enable bit of the configuration space command register of the link peer device; or the PCI fast channel device receives the sending of the peer device
  • the stop information is generated after the end of the current data, so that the control module 41 controls the processing module 42 to initiate an adjustment process for the rate and/or the bit width of the link based on the stop information.
  • the processing module 42 may include a selection unit 420, a first processing unit 421, a second processing unit 422, a third processing unit 423, and a negotiating unit 424, where the selecting unit 420 is configured to select a corresponding one according to the adjustment information acquired by the obtaining module 40.
  • the first processing unit 421 is configured to: if the adjustment information is to reduce the current bit width of the link to a certain link width, by closing the link bit width and the link Any interface link channel between the bit width of the bit width of the bit width adjusts the current bit width of the link; and if the adjustment information is to increase the current bit width of the link to a certain link bit Width, adjust the current bit width of the link by enabling all interface link channels corresponding to the link width; and setting the channel forbidden function of the interface link to adjust the bit width of the link by the first processing unit,
  • the PCI Express channel device that does not have the function of dynamically adjusting the bit width can also implement the energy management of the link by adopting a flexible bit width adjustment method.
  • the second processing unit 422 is configured to: if the adjustment information is to reduce or increase the current bit width of the link to a certain link bit width, set the current bit width of the link to the link bit width. Adjusting the current bit width of the link, and the second processing unit 422 can provide a bit width adjustment similar to the link rate adjustment mode provided by the device. Entire function module.
  • the third processing unit 423 is configured to: if the adjustment information is to reduce or increase the current rate of the link to a certain link rate, write the link rate to the link control second register; When the current rate is adjusted, the current rate of the link is adjusted according to the rate value written in the second register of the link control.
  • the negotiating unit 424 is configured to start renegotiation according to the link renegotiation enable bit in the link control register, so that the PCI fast channel device and the peer device adjust the rate and/or the bit width of the data to be sent and received to the The PCI Express Channel device adjusts the processed rate and/or bit width; and confirms that the renegotiation is complete based on the link negotiated status value in the Link Status Register.
  • the renegotiation with the peer device initiated by the processing unit after the link adjustment is performed by the processing unit 424 enables the devices at both ends to adjust the rate and/or the bit width of the transmitted and received data to the rate of the adjusted link and/or
  • the bit width ensures that the rate and bit width of the data transmitted and received at both ends match the rate and bit width of the adjusted link of the PCI Express channel device.
  • the PCI Express channel device resumes the link after the renegotiation of the devices at both ends is completed and the negotiation is confirmed. Data is sent and received at both ends.
  • the generating unit in the obtaining module compares the service traffic with the preset different traffic thresholds, and generates corresponding adjustments according to the comparison result.
  • the information enables the PCI Express channel device to adjust the link in stages according to the traffic volume, and can accurately adjust the current rate and bit width of the link to an appropriate value;
  • the PCI fast channel can be enabled by multiple processing units in the processing module.
  • the device adopts different adjustment methods to adjust the link, and the first processing unit can enable the PCI fast channel device that does not have the function of dynamically adjusting the bit width to implement the energy management of the link by adopting a flexible bit width adjustment method.
  • the PCI Express channel device in the above embodiment of the PCI Express Channel device is a device at a downlink interface of a root fast node of a PCI fast channel or a switch of a PCI fast channel; the peer device is a PCI fast channel.
  • the PCI fast channel device can be used to implement the technical solution of the foregoing PCI fast channel link energy management method embodiment, and the working principle and technical effects achieved are similar to the method embodiments.
  • FIG. 6 is a schematic structural diagram of an embodiment of a PCI fast track link energy management system according to the present invention. As shown in FIG.
  • the PCI fast channel link energy management system of this embodiment includes a first device 50 and a second device that transmit and receive data to each other. 51.
  • the first device 50 is the PCI fast channel device of the embodiment shown in FIG. 4 or FIG. 5, and the second device 51 is the device at the uplink interface of the PCI fast channel end device or the PCI fast channel switch.
  • FIG. 7 is a schematic diagram of an embodiment of the present invention applied to a PCI fast channel system.
  • the PCI fast channel system shown in FIG. 7 includes multiple devices for transmitting data based on the PCI fast channel link 60.
  • the first device or the PCI Express channel device in the embodiment of the present invention may be the root complex device 62 in the figure, or may be the device at the downlink interface of the PCI Expressway switch 63, and the second device or the peer device may be The endpoint device 61 of the Ethernet controller or the like may also be a device at the uplink interface of the PCI Expressway switch 63.
  • the PCI fast channel link 60 between the root complex device 62 and the endpoint device 61 uses the energy management method of the embodiment of the present invention.
  • the root complex device 62 When the traffic volume in the PCI fast channel link 60 is small, After the root complex device 62 can generate the adjustment information by detecting the traffic flow, the root complex device 62 stops transmitting data to the endpoint device 61, and then clears the master device enable bit of the endpoint device 61 to cause the endpoint device 61 to send the current data.
  • the data is sent to the root complex device 62, and the root complex device 62 waits for a predetermined time to adjust the link rate and/or the bit width according to the adjustment information, and renegotiates with the endpoint device 62 to make both ends Adjusting the rate and/or bit width of the transceiving data to the rate and/or bit width after the root complex device 62 adjusts the processing, the root complex device 62 confirms that the negotiation resumes sending data to the endpoint device 62, while the endpoint device 62 The master enable bit is reasserted to enable it to resend data to the root complex device 62.
  • the root complex device 62 clears the master device enable bit of the endpoint device, it can stop data transmission before the link adjustment, thereby avoiding loss of data being transmitted and received in the link, and ensuring link adjustment. Does not affect the business of the link, Improve the security of data transmission during link energy management. In addition, if the root complex device 62 clears the master device enable bit of the endpoint device, it can stop data transmission before the link adjustment, thereby avoiding loss of data being transmitted and received in the link, and ensuring link adjustment. Does not affect the business of the link, Improve the security of data transmission during link energy management. In addition, if the root complex device
  • the function of adjusting the bit width of the link by setting the interface link channel introduced in the above embodiment of the present invention is to improve the flexibility of the link adjustment in the link energy management. Sex.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Communication Control (AREA)

Description

PCI快速通道设备、 链路能量管理方法及系统 技术领域
本发明涉及通信技术, 尤其涉及一种 PCI快速通道设备、 链路能量管理 方法及系统。 背景技术
夕卜邵设备互连快速通道 (Peripheral Component Interconnect Express, 简 称: PCI快速通道)为 PCI快速通道设备提供一种高速的点到点串行通信链 路, PCI快速通道在为多媒体、 高速局域网等数据密集型应用提供足够带宽 的同时也面临着链路中的能量管理问题。
PCI快速通道链路中的功耗随着链路带宽的增大而增大, 而链路带宽与 链路的传输速率和位宽相关, 在链路中业务流量较小时, 不需要高带宽时, 可以通过降低链路的传输速率或位宽来降低链路的带宽, 从而降低链路的功 耗, 当链路中业务流量增大时, 再通过提高链路的传输速率或位宽来提高链 路的带宽以满足链路的业务需求。 因此, 通过调整链路的速率和 /或位宽可以 实现链路的能量管理。 现有技术中, PCI 快速通道设备可以根据链路中业 务量大小控制物理层状态机迁移,通过控制物理层状态机的迁移对 PCI 快 速通道链路的速率或位宽进行调整, 从而实现根据业务量大小进行链路的能 量管理。 具体来说, 当链路中的业务量变化时, PCI 快速通道设备控制其 物理层状态机从正常工作状态进入恢复状态, 即中断当前链路中的数据收 发, 再进入配置状态, 在配置状态, PCI 快速通道设备可通过调整链路的 速率或位宽的方式获得需要的带宽, 从而实现对 PCI 快速通道链路的能量 管理。
但是, 上述 PCI快速通道链路的能量管理过程中, 物理层状态机从正常 工作状态进入恢复状态时, PCI快速通道设备中断了当前链路中正在进行的 数据收发, 从而导致正在收发的数据丟失。 发明内容
本发明实施例提供一种 PCI快速通道设备、 链路能量管理方法及系统, 用以解决上述 PCI 快速通道链路能量管理过程中易导致传输数据丟失的问 题。
为实现上述目的, 本发明实施例提供一种 PCI快速通道链路能量管理方 法, 包括:
第一设备获取对 PCI快速通道链路当前的速率和 /或位宽进行调整处理的 调整信息;
所述第一设备停止数据发送, 并清除链路对端第二设备的配置空间命令 寄存器的主设备使能位, 以使所述第二设备在当前数据发送结束后停止数据 发送;
所述第一设备根据所述调整信息对链路的速率和 /或位宽进行调整处理; 所述第一设备恢复数据发送, 并重新对所述主设备使能位置位, 以使所 述第一设备和第二设备以调整处理后的速率和 /或位宽重新收发数据。
本发明实施例还提供一种 PCI快速通道设备, 包括:
获取模块, 用于获取对 PCI快速通道链路当前的速率和 /或位宽进行调整 处理的调整信息;
控制模块, 用于停止所述 PCI快速通道设备的数据发送, 并清除链路对 端设备的配置空间命令寄存器的主设备使能位, 以使所述对端设备在当前数 据发送结束后停止数据发送; 还用于在链路的速率和 /或位宽调整处理之后恢 复所述 PCI快速通道设备的数据发送, 并重新对所述主设备使能位置位, 以 使所述 PCI快速通道设备和对端设备以调整处理后的速率和 /或位宽重新收发 数据;
处理模块, 用于根据所述调整信息对链路的速率和 /或位宽进行调整处 理。
本发明实施例还提供一种 PCI快速通道链路能量管理系统, 包括: 相互 收发数据的第一设备和第二设备,所述第一设备为上述的 PCI快速通道设备, 所述第二设备为 PCI快速通道的端点设备或 PCI快速通道的交换机的上行接 口处的设备。
由上述技术方案可知, PCI 快速通道设备通过动态调整链路的速率和 / 或位宽实现对链路的能量管理; 而且在对链路的速率和 /或位宽调整之前, 通 过先清除链路对端设备的配置空间命令寄存器的主设备使能位, 以使链路对 端设备在当前数据发送结束后停止数据发送, 保证链路中正在收发的数据不 会因链路调整而丟失, 从而保证链路调整不影响链路的业务。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明 PCI快速通道链路能量管理方法一个实施例的流程图; 图 2为本发明 PCI快速通道链路能量管理方法另一个实施例的部分流程 图;
图 3为本发明实施例中第一设备运行过程中对链路进行能量管理的详细 流程图;
图 4为本发明 PCI快速通道设备一个实施例的结构示意图;
图 5为本发明 PCI快速通道设备另一实施例的结构示意图;
图 6为本发明 PCI快速通道链路能量管理系统实施例的结构示意图; 图 7为本发明实施例应用于 PCI快速通道系统中的实例图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明 PCI快速通道链路能量管理方法一个实施例的流程图, 如图 1所示, 本实施例的方法包括:
步骤 101、 第一设备获取对 PCI快速通道链路当前的速率和 /或位宽进行 调整处理的调整信息。
本实施例中, 第一设备和第二设备为通过 PCI快速通道链路进行彼此收 发数据的 PCI快速通道设备。 第一设备可以为 PCI快速通道的根联合体设备
( Root Complex )或 PCI快速通道的交换机(Switch ) 的下行接口处的设备, 第二设备可以为 PCI快速通道的端点设备 ( Endpoint )或 PCI快速通道的交换 机的上行接口处的设备。 当需要对链路当前的数据传输速率、 位宽等进行调 整时, 第一设备可以根据获取的对 PCI快速通道链路当前的速率和 /或位宽进 行调整处理的调整信息采取相应的措施对链路进行调整处理。
实际应用中, 第一设备获取的调整信息可以为第一设备通过检测链路参 数、 工作状态等后触发生成的信息, 也可以为获取的对链路进行调整的配置 信息, 如用户设置的对链路进行调整的信息。 因为 PCI快速通道链路中的业 务流量是随着 PCI快速通道设备的业务需求而动态变化的, 例如, 电信设备 的业务流量在每天的凌晨是艮小的, 若采用和白天一样的通信带宽, 则能量 消耗是非常大的; 而当业务繁忙时, 若通信链路的带宽不足, 则影响通信业 务, 所以, PCI快速通道设备应能随着链路中业务流量的变化而动态地调整 链路的带宽。 具体地, PCI 快速通道设备可以通过检测链路的流量等来控制 生成调整信息。 步骤 102、 所述第一设备停止数据发送, 并清除链路对端第二设备的配 置空间命令寄存器的主设备使能位, 以使所述第二设备在当前数据发送结束 后停止数据发送。
第一设备在获取调整信息后首先主动停止本端的数据发送, 同时, 通过 清除 PCI快速通道链路对端第二设备的主设备使能位, 使第二设备在将当前 正在发送的数据包发送结束后停止发送新的数据, 当第一设备和第二设备都 停止数据发送后链路中没有数据收发, 第一设备就可以对链路进行需要的调 整。本实施例中的主设备使能位为第二设备的配置空间中在偏移地址 04处的 16位命令寄存器中的 bit2位 ( master enable ) , 该 master enable位表示这个 PCI快速通道设备能否作为主设备向外发送数据。 当它为 1时, 设备可以主 动向 PCI快速通道链路上发送数据; 当它为 0时, 设备不能主动发送数据, 只能被动地接受其他设备对自己的访问。 以以太网控制器之类的 PCI快速通 道设备为例进行说明, 该以太网控制器一侧连接 PCI快速通道链路, 另一侧 连接以太网链路, 通过该以太网控制器可以实现以太网和 PCI快速通道之间 数据的传输, 如将从以太网上接收的数据报文转发到 PCI快速通道链路上。 当该以太网控制器的 master enable位清零后, 它在 PCI快速通道一侧将不会 主动向 PCI快速通道链路发送数据, 包括数据报文和消息报文, 同时它会向 以太网链路一侧发送流控报文, 要求对方设备暂时不要向自己发送数据, 可 以有两种方式: 一种是 Xon、 Xoff机制, 用流控报文的某个参数表示允许发 送和禁止发送, 另一种是耗尽机制, 用流控报文中的某个参数表示对方设备 需要等待多长时间, 超时后可以继续发送。 本实施例通过第一设备设置第二 设备的 master enable位来控制第二设备的数据发送, 当需要停止第二设备向 自己发送数据时, 可以对第二设备的 master enable位进行清零, 第二设备在 master enable位清零后会主动停止向 PCI快速通道链路发送数据, 从而实现 第二设备停止向第一设备发送数据。
具体应用中, 第一设备在清除链路对端第二设备的主设备使能位后可以 等待预定的一段时间, 以使第二设备将当前的数据报文发送完毕再对链路进 行调整。 具体为, 第一设备在清除链路对端第二设备的配置空间命令寄存器 的主设备使能位后等待预定的时间生成停止信息, 等待预定的时间可以根据
PCI快速通道规范定义的最大报文长度和链路当前的发送速率估算出, 该等 待时间一般不会超过 1毫秒; 或者第一设备在获取接收的所述第二设备发送 的当前数据报文结束标志后生成停止信息; 第一设备根据该停止信息再启动 对链路的速率和 /或位宽进行调整处理。
步骤 103、 所述第一设备根据所述调整信息对链路的速率和 /或位宽进行 调整处理。
当 PCI快速通道链路两端的设备都停止数据收发后, 第一设备可以根据 上述获取的调整信息对链路的速率、 位宽等进行调整。 如链路中业务流量较 小时通过降低链路的传输速率或位宽或者同时降低链路的速率和位宽以节省 链路的功耗; 当链路中业务流量较大时通过提高链路的传输速率或位宽或者 同时提高链路的速率和位宽以满足链路传输的业务需求。
PCI 快速通道设备依照 PCI快速通道规范定义, 配置有多种控制和状态 寄存器, 通过设置寄存器的使能位值可以使设备执行或不执行相应的功能或 者获取某些状态值, 本发明实施例中主要涉及的寄存器有链路控制 (link control )寄存器、 链路状态 (link status)寄存器、 链路控制第二( link control 2 ) 寄存器等, 其中, 链路控制寄存器的 bit5(retrain link)为触发链路两端重新协 商的使能位, 链路状态寄存器的 bitl l(link training)中存储着表示链路是否协 商完成的链路协商状态值, 链路状态寄存器的 bit3-0 中存储着链路当前的传 输速率值, 链路状态寄存器的 bit9-4 中存储着链路当前的位宽, 链路控制第 二寄存器的 bit3-0 中可以设置期望调整的链路速率值。 另外, 不同芯片商家 也可以根据特定的需要在其芯片产品中自定义扩展一些寄存器的功能。
具体实施中, 第一设备在对链路的速率和 /或位宽调整处理后, 还可以启 动与第二设备重新协商, 以使第一设备和第二设备将收发数据的速率和 /或位 宽调整到调整处理后的链路的速率和 /或位宽, 保证两端收发数据的速率和位 宽与第一设备调整后的链路的速率和位宽匹配, 第一设备在两端设备重新协 商完毕并确认协商完成后再恢复链路两端的数据收发。 具体来说, 当 PCI快 速通道设备对链路调整处理后若链路控制寄存器的 bit5位为 1 , 则 PCI快速 通道设备将会启动与链路对端设备重新协商, 重新协商之后, PCI 快速通道 设备通过链路状态寄存器的 bitl l确认协商完成, 由于每次 PCI快速通道设 备对链路的速率和 /或位宽调整后, 会根据该调整更新链路状态寄存器的 bit3-0和 bit9-4中对应的速率和位宽, 因此, PCI快速通道设备还可以通过链 路状态寄存器的 bit3-0和 bit9-4确认协商完成后的速率和位宽是否与期望的 一致, 确认重新协商完成之后, 第一设备即可以链路状态寄存器的 bit3-0和 bit9-4对应的速率和位宽重新收发数据。
本步骤中, 第一设备可以根据上述获取的调整信息对链路的速率进行调 整、 也可以对链路的位宽进行调整, 还可以对链路的速率和位宽同时调整。
可选地, 当对链路的速率进行调整时, 第一设备可以通过直接设置期望 的链路速率来调整。 具体来说, 若上述获取的调整信息为将链路当前的速率 降低到或者提高到某一链路速率,则所述第一设备可以将该链路速率写入 link control 2寄存器的 bit3-0中; 从而当第一设备对链路当前的速率进行调整时, 可以根据 link control 2寄存器的 bit3-0中写入的速率值对链路当前的速率进 行调整处理。
可选地, 当对链路的位宽进行调整时, 第一设备可以通过设置接口链路 的通道禁止功能对链路的位宽进行调整。 具体来说, 若上述获取的调整信息 为将链路当前的位宽降低到某一链路位宽, 则所述第一设备通过关闭该链路 位宽与该链路位宽的上一级链路位宽之间任意的接口链路通道对链路当前的 位宽进行调整处理。以链路最初的位宽是 x8 (定义为 laneO-7 )为例进行说明, 当希望将链路位宽调整到 x4时, 只需要关闭 lane4-7中的任何一个; 如果希 望调整到 2,则需要关闭 lane2、3中的任何一个;如果希望调整到 1 ,关闭 lanel 即可。 对于最初位宽是 32、 16、 4、 2等情形, 配置操作方法类似。 若所述调 整信息为将链路当前的位宽提高到某一链路位宽, 则所述第一设备通过开启 该链路位宽对应的所有接口链路通道对链路当前的位宽进行调整处理。 例如 需要将当前的位宽 x4的位宽恢复到 x8, 则必须将 lane4-7全部使能; 如果将 xl的位宽恢复到 x8, 必须将 lanel-7全部使能。 通过这种方式实现的链路位 宽调整是基于多数 PCI快速通道设备一般不具有动态调整位宽的功能, 但一 般都提供了接口链路的某个通道(lane )的使能功能, 本发明实施例通过利用 lane的这个功能通过关闭 lane来模拟某个链路的故障, 由于 PCI快速通道设 备检测到链路故障时主动触发设备与对端设备进行重新协商(retrain ) , 重新 确定链路的位宽, 以将故障链路屏蔽掉, 从而获取一个较小的位宽; 而需要 将链路位宽增大时, 可以将先前屏蔽掉的 lane重新使能开启, 再主动触发设 备与对端设备进行重新协商, 重新确定链路的位宽, 以获取一个较大的位宽, 从而使不具有位宽调整功能的设备可以通过控制接口链路 lane的使能功能来 实现对链路的位宽调整, 即在不具有位宽调整功能的设备上实现通过位宽调 整来完成链路的能量管理。 而且, 由于 PCI快速通道支持多种位宽, 例如某 个链路中可以选择 1、 2、 4、 8、 16、 32个 lane, 即该链路支持 xl、 x2、 x4、 x8、 xl6、 x32的位宽, 在使用中可以根据应用灵活配置, 因此通过设置接口 链路的通道禁止功能调整链路的位宽以对链路的能量管理具有更加的灵活 性。
可选地, 对链路的位宽的调整还可以通过第一设备直接设置期望的位宽 来调整, 具体来说, 若上述获取的调整信息为将链路当前的位宽降低到或提 高到某一期望调整到的链路位宽, 则所述第一设备通过将链路当前的位宽设 定到该期望的链路位宽来对链路当前的位宽进行调整处理, 具体应用中可根 据上述对速率的调整类似的方法实现。
步骤 104、 所述第一设备恢复数据发送, 并重新对所述主设备使能位置 位, 以使所述第一设备和第二设备以调整处理后的速率和 /或位宽重新收发数 据。
当上述对链路的调整处理结束后, 需要及时恢复链路中的数据收发, 对 于本端, 第一设备可以主动启动向链路上发送数据, 对于链路对端, 第一设 备通过对第二设备的 master enable位进行置位使其重新向链路发送数据。 当 链路两端以调整处理后的速率和 /或位宽恢复数据收发后即完成了一次链路 的调整, 若链路中的速率和 /或位宽需要随链路中的业务流量动态调整, 则重 复上述步骤即可。
本实施例中, 第一设备在获取对链路进行调整的调整信息后, 并非是直 接中断两端的数据收发, 而是对链路中正在进行的数据收发采用相应的保护 措施, 避免正在收发的数据丟失。 因为, PCI快速通道链路两端在正常运行 时, PCI快速通道链路上都会有数据收发, 若链路设备不做保护就调整速率或 位宽, 而链路设备的上层如软件层或器件核心层仍有数据在不断地发送, 则 必然会造成数据的丟失, 因此需要先将上层的数据发送暂停, 然后启动链路 的调整重新协商, 完成以后再恢复数据的发送, 从而避免链路底层的操作对 业务带来影响。 本实施例中主动发起调整的链路第一设备通过主动停止本端 数据发送,并通过清除链路对端第二设备配置空间命令寄存器的 master enable 位控制对端设备将当前正在发送的数据发送完毕后停止数据发送, 一方面让 对端设备控制其上层通知通过该对端设备向 PCI快速通道链路发送数据的其 他设备暂停向自己发送数据,另一方面让对端设备将当前向 PCI快速通道链路 发送的数据包发送完毕后停止发送新的数据包, 从而使第一设备在链路两端 都停止数据发送后再对链路进行调整, 保证对链路的调整不影响业务。
本发明实施例通过调整链路的速率和 /或位宽可实现对链路的能量管理; 而且在对链路的速率和 /或位宽调整之前, 通过先清除链路对端设备的配置空 间命令寄存器的主设备使能位, 以使链路对端设备在当前数据发送结束后停 止数据发送, 保证链路中正在传输的数据不会因链路调整而丟失, 从而保证 链路调整不影响链路的业务;进一步地,通过设置接口链路的 lane的使能功能 来模拟链路故障,从而在不具有位宽调整功能的设备上实现链路的位宽调整, 有利于对链路的能量管理中采用更加灵活的位宽调整的方式。
在上述实施例中, 第一设备在获取对链路进行调整的调整信息之前, 还 可以进一步包括第一设备根据检测判断当前的链路状态确定能否对速率或位 宽进行调整,以及满足什么条件才对链路的速率或位宽进行调整的操作过程。
图 2为本发明 PCI快速通道链路能量管理方法另一个实施例的部分流程 图, 如图 2所示, 在上述图 1所示的步骤 101之前, 本实施例的方法还可以 包括:
步骤 201、 第一设备从链路状态寄存器中读取链路当前的速率和位宽。 步骤 202、 根据链路能够传输的速率和位宽以及链路当前的速率和位宽 确定对链路当前的速率和 /或位宽进行调整处理。
第一设备在运行中, 可以从链路状态寄存器的 bit3-0和 bit9-4中分别读 取链路当前的传输速率值和位宽值, 根据获取的速率和位宽可以判断出能否 对其进行调整, 例如链路当前的速率为 2.5 Gbps, 位宽为 x8, 而该链路能够 传输的最小速率为 2.5 Gbps, 最大位宽为 x8, 若需要对该链路的带宽向低处 调整则只能对位宽进行调整, 不能对速率调整, 若需要对该链路的带宽向高 处调整则只能对速率进行调整, 不能对位宽进行调整。 链路当前的速率和位 宽为其他数值时, 或者链路能够传输的速率和位宽的极限值为其他数值时, 判断确定调整速率和 /或位宽的方法类似。 因此, 第一设备可以根据当前的速 率和位宽确定出对链路的速率和 /或位宽进行调整。
步骤 203、 所述第一设备获取链路当前的业务流量。
具体来说, 第一设备获取链路当前的业务流量可以包括但不限于如下方 式获取当前的业务流量(Traffic ) :
第一设备获取单位时间内通过所述链路收发的报文计数或中断次数; 再 根据所述报文计数或中断次数确定所述链路当前的业务流量。
第一设备在确定出能否对链路的速率和 /或位宽进行调整后, 通过实时检 测链路的业务流量以确定对当前链路的速率和 /或位宽是否需要调整。
步骤 204、 根据所述业务流量与预设的流量门限值的比较结果, 生成对
PCI快速通道链路当前的速率和 /或位宽的调整信息。
第一设备根据上述获取的业务流量与预设的流量门限值进行比较, 根据 比较结果生成相应的调整信息, 从而再根据该调整信息启动对链路的调整。
具体来说, 若预设的流量门限值为一个, 则每次获取业务流量与该流量 门限值进行比较, 若业务流量大于该流量门限值, 即链路中业务相对较繁忙, 则需要将链路当前的带宽提高才能满足链路繁忙时的业务需求, 因此可以将 链路当前的速率和 /或位宽向提高的方向调整; 若业务流量小于该流量门限 值, 即链路中业务相对较少, 则需要将链路当前的带宽降低以减小链路业务 较少时的功耗。
若预设的流量门限值为多个, 每个流量门限值与链路特定带宽的速率和 位宽相对应, 则第一设备在每次获取业务流量时可以与不同的流量门限值进 行比较, 使设备可以根据业务流量大小分阶段调整, 并且能将链路当前的速 率和位宽精确调整到适当的数值。 具体操作为: 第一设备根据所述业务流量 与预设的某个流量门限值的比较结果, 生成将链路当前的速率和 /或位宽调整 到与该流量门限值对应的速率和位宽的调整信息。 例如, PCI快速通道设备接 口链路当前的速率为 5Gbps, 位宽为 x8, 此速率和位宽均可向下调整, 业务流 量划分为两个门限 Thrl和 Thr2, 且 Thrl>Thr2, 第一门限 Thrl和第二门限 Thr2 分别对应不同的带宽, 对带宽的调整可以采用对速率调整也可以采用对位宽 调整, 还可以同时对二者均调整。 当业务流量低于第一门限 Thrl时, 可以将 链路的速率从 5Gbps降低到 2.5Gbps, 也可以将链路的位宽降低到 x4; 当业务 流量低于第二门限 Thr2时, 若上次带宽调低后位宽是 x4, 则还可以再将链路 位宽降低到 xl , 若上次调低的是速率, 则本次调整时可以将位宽从 x8降低到 x4。若当前的速率为 2.5Gbps,位宽为 xl , 则当业务流量超过第二门限 Thr2时, 可以将链路的速率从 2.5Gbps提高到 5Gbps, 也可以将位宽从 xl提高到 x4, 当 业务流量还超过第一门限 Thrl时, 若上次调高的是位宽, 则还可以进一步将 位宽从 x4提高到 x8 , 若上次调高的是速率, 则可以将位宽从 xl提高到 x4。 链 路的当前速率和位宽为其他值时, 或者业务流量的门限划分为更多个时, 其 调整方法类似。
由于第一设备和第二设备之间的收发的数据量是随设备的业务需求而随 机变化的, 因此在链路中传输的业务流量是动态变化的, 通过将流量门限值 设置为多个, 更加适用于实际应用中链路中业务流量动态的变化时的动态调 整, 通过采用这种动态调整方式可以使链路在业务不忙时降低带宽从而减小 链路中的功耗, 而当链路在业务繁忙时提高带宽以满足业务需求。
本发明实施例在达到上述图 1所示实施例的技术效果的基础上, 进一步 地, 第一设备通过获取的当前的速率和位宽确定能否对链路进行调整, 而且 在链路中的业务流量满足调整条件时, 生成相应的调整信息以启动对链路的 调整; 进一步地, 通过设置多个流量门限值, 可以使设备根据业务流量大小 分阶段调整, 并且能将链路当前的速率和位宽精确调整到适当的数值, 既能 够保证链路实时的业务需求, 又能对链路的能量进行有效的管理。
图 3为本发明实施例中第一设备运行过程中对链路进行能量管理的详细 流程图, 如图 3所示, 第一设备在运行中执行操作如下:
步骤 301 , 从链路状态寄存器中读取链路当前的速率和位宽;
步骤 302、 确认能对链路当前的速率和 /或位宽进行调整处理;
步骤 303、 获取链路当前的业务流量;
步骤 304、 将业务流量与预设的某个流量门限值进行比较, 若业务流量小 于门限值, 则执行步骤 305 , 若业务流量大于门限值, 则执行步骤 306;
步骤 305、 生成将链路当前的速率和 /或位宽降低一级的调整信息, 并进 一步执行步骤 307;
步骤 306、 生成将链路当前的速率和 /或位宽提高一级的调整信息; 步骤 307、 停止发送数据; 步骤 308、 清除对端设备配置空间命令寄存器的主设备使能位;
步骤 309、 等待预定的时间, 以使对端设备将当前数据发送完毕; 步骤 310、通过关闭或开启相应的接口链路通道或者指定期望调整的链路 位宽以调整位宽或者通过链路控制第二寄存器指定期望调整的链路速率以调 整速率;
步骤 311、 启动重新协商并确认协商完成;
步骤 312、对对端设备的主设备使能位重新置位, 以使对端设备重新收发 数据。
第一设备通过执行上述的操作可以完成一次的链路调整, 如果链路中的 业务流量与预设的其他流量门限值相比还可以调整, 则重新执行上述操作步 骤 304及后续操作即可。
图 4为本发明 PCI快速通道设备一个实施例的结构示意图,如图 4所示, 本实施例的 PCI快速通道设备包括: 获取模块 40、 控制模块 41和处理模块 42, 其中, 获耳 莫块 40, 用于获取对 PCI快速通道链路当前的速率和 /或位宽 进行调整处理的调整信息; 控制模块 41 , 用于停止所述 PCI快速通道设备的 数据发送,并清除链路对端第二设备的配置空间命令寄存器的主设备使能位, 以使所述第二设备在当前数据发送结束后停止数据发送; 还用于在链路的速 率和 /或位宽调整处理之后恢复所述 PCI快速通道设备的数据发送, 并重新对 所述主设备使能位置位, 以使所述 PCI快速通道设备和第二设备以调整处理 后的速率和 /或位宽重新收发数据; 处理模块 42, 用于根据所述调整信息对链 路的速率和 /或位宽进行调整处理。
本发明实施例中, 获取模块 40获取对链路的速率和 /或位宽进行调整的 调整信息后, 控制模块 41首先停止链路本端 PCI快速通道设备的数据发送, 再通过清除对端设备的主设备使能位, 使对端设备将当前数据发送完毕后也 停止数据发送; 当 PCI快速通道链路两端的设备都停止数据收发后, 处理模 块 42根据获取模块获取的调整信息对链路的速率和 /或位宽进行调整处理, 当调整处理结束, 控制模块 41恢复本端的数据发送, 同时对对端设备的主设 备使能位进行重新置位, 使其也重新发送数据, 保证链路在调整后恢复到正 常传输状态。
本发明实施例处理模块通过调整链路的速率和 /或位宽可实现对链路的 能量管理; 而且处理模块在对链路的速率和 /或位宽调整之前, 控制模块通过 先清除链路对端设备的配置空间命令寄存器的主设备使能位, 以使链路对端 设备在当前数据发送结束后停止数据发送, 保证链路中正在传输的数据不会 因链路调整而丟失, 从而保证链路调整不影响链路的业务。
图 5为本发明 PCI快速通道设备另一实施例的结构示意图,如图 5所示, 本实施例的 PCI快速通道设备中, 在上述图 4所示实施例的基础上, 获取模 块 40可以包括多个获取单元, 用于获取相应的预处理信息, 控制模块 41可 以包括生成单元,用于生成相应的控制信息,处理模块 42可以包括协商单元, 用于与对端设备重新协商。
具体来说, 获取模块 40包括第一获取单元 401、 第二获取单元 403、 第 三获取单元 405、 确定单元 402和生成单元 404。 其中, 第一获取单元 401用 于从链路状态寄存器中读取链路当前的速率和位宽; 确定单元 402用于根据 链路能够传输的速率和位宽以及当前的速率和位宽确定对链路当前的速率和 路当前的速率和 /或位宽进行调整。 第二获取单元 403用于获取单位时间内通 过所述链路收发的报文计数或中断次数, 根据所述报文计数或中断次数确定 所述链路当前的业务流量; 生成单元 404用于在确定单元 402确定对链路能 够进行调整时根据所述业务流量与预设的流量门限值的比较结果,生成对 PCI 快速通道链路当前的速率和 /或位宽的调整信息, 生成单元 404在生成调整信 息过程中, 可以将第二获取单元 403获取的业务流量与预设的不同流量门限 值进行比较, 从而使 PCI快速通道设备可以根据业务流量大小分阶段调整链 路, 并且能将链路当前的速率和位宽精确调整到适当的数值。 第三获取单元 405用于获取生成单元 404生成的调整信息, 以使控制模块 41启动停止链路 数据的发送以及处理模块 42根据该调整信息进行相应的调整处理。
控制模块 41包括停止单元 411、 恢复单元 413和生成单元 412。 其中, 停止单元 411用于停止所述 PCI快速通道设备的数据发送, 并清除链路对端 设备的配置空间命令寄存器的主设备使能位, 以使所述对端设备在当前数据 发送结束后停止数据发送。 恢复单元 413用于在链路的速率和 /或位宽调整处 理之后恢复所述 PCI快速通道设备的数据发送, 并重新对所述主设备使能位 置位, 以使所述 PCI快速通道设备和对端设备以调整处理后的速率和 /或位宽 重新收发数据。 生成单元 412用于停止单元 411清除链路对端设备的配置空 间命令寄存器的主设备使能位后等待预定的时间生成停止信息; 或者, 所述 PCI快速通道设备接收到所述对端设备发送的当前数据的结束标志后生成停 止信息, 以使控制模块 41控制处理模块 42根据该停止信息启动对链路的速 率和 /或位宽进行调整处理。
处理模块 42可以包括选择单元 420、 第一处理单元 421、 第二处理单元 422、 第三处理单元 423和协商单元 424, 其中, 选择单元 420, 用于根据获 取模块 40获取的调整信息选择相应的对链路处理的处理单元;第一处理单元 421 , 用于若所述调整信息为将链路当前的位宽降低到某一链路位宽, 则通过 关闭该链路位宽与该链路位宽的上一级链路位宽之间任意的接口链路通道对 链路当前的位宽进行调整处理; 以及若所述调整信息为将链路当前的位宽提 高到某一链路位宽, 则通过开启该链路位宽对应的所有接口链路通道对链路 当前的位宽进行调整处理; 通过第一处理单元设置接口链路的通道禁止功能 对链路的位宽进行调整, 使不具有动态调整位宽的功能的 PCI快速通道设备 也能够采用灵活的位宽调整的方法实现链路的能量管理。 第二处理单元 422, 用于若所述调整信息为将链路当前的位宽降低到或提高到某一链路位宽, 则 通过将链路当前的位宽设定到该链路位宽对链路当前的位宽进行调整处理, 该第二处理单元 422可以为设备提供的类似于链路速率调整的方式的位宽调 整功能模块。 第三处理单元 423 , 用于若所述调整信息为将链路当前的速率 降低到或者提高到某一链路速率 ,则将该链路速率写入链路控制第二寄存器; 当对链路当前的速率进行调整时, 根据所述链路控制第二寄存器中写入的速 率值对链路当前的速率进行调整处理。 协商单元 424, 用于根据链路控制寄 存器中的链路重新协商使能位启动重新协商, 以使所述 PCI快速通道设备和 对端设备将收发数据的速率和 /或位宽调整到所述 PCI快速通道设备调整处理 后的速率和 /或位宽; 并根据链路状态寄存器中的链路协商状态值确认重新协 商完成。 通过协商单元 424在处理单元对链路调整后启动的与对端设备的重 新协商, 可使两端设备将收发数据的速率和 /或位宽调整到调整处理后的链路 的速率和 /或位宽,保证两端收发数据的速率和位宽与 PCI 快速通道设备调整 后的链路的速率和位宽匹配, PCI 快速通道设备在两端设备重新协商完毕并 确认协商完成后再恢复链路两端的数据收发。
本实施例在达到上述 PCI快速通道设备实施例一的技术效果的基础上, 进一步通过获取模块中的生成单元将业务流量与预设的不同流量门限值进行 比较, 根据比较结果生成相应的调整信息, 使 PCI快速通道设备可以根据业 务流量大小分阶段调整链路, 并且能将链路当前的速率和位宽精确调整到适 当的数值; 通过处理模块中的多个处理单元可以使 PCI快速通道设备选用不 同的调整方式对链路进行调整, 而且通过第一处理单元可以使不具有动态调 整位宽的功能的 PCI快速通道设备也能够采用灵活的位宽调整的方法实现链 路的能量管理。
上述 PCI快速通道设备实施例中的 PCI快速通道设备为 PCI快速通道的 根联合体设备 ( Root Complex )或 PCI快速通道的交换机(Switch ) 的下行接 口处的设备; 对端设备为 PCI快速通道的端点设备 ( Endpoint )或 PCI快速通 道的交换机的上行接口处的设备。 PCI快速通道设备可用于执行上述 PCI快 速通道链路能量管理方法实施例的技术方案, 其工作原理及达到的技术效果 与方法实施例类似。 图 6为本发明 PCI快速通道链路能量管理系统实施例的结构示意图, 如图 6所示, 本实施例的 PCI快速通道链路能量管理系统包括彼此收发数 据的第一设备 50和第二设备 51。 其中, 第一设备 50为上述图 4或图 5 所示实施例的 PCI快速通道设备, 第二设备 51为 PCI快速通道的端点设备 或 PCI快速通道的交换机的上行接口处的设备。
本实施例可使用上述 PCI快速通道链路能量管理方法实施例的技术方 案, 其技术原理与达到的技术效果类似, 不再赘述。
图 7为本发明实施例应用于 PCI快速通道系统中的实例图, 如图 7所 示的 PCI快速通道系统中包括多种基于 PCI快速通道链路 60进行传输数 据的设备, 实际应用中, 上述本发明实施例中的第一设备或者 PCI快速通 道设备可以为图示中的根联合体设备 62, 也可以为 PCI快速通道交换机 63的下行接口处的设备,第二设备或者对端设备可以为以太网控制器等的 端点设备 61 , 也可以为 PCI快速通道交换机 63的上行接口处的设备。 在 PCI快速通道系统运行中,例如根联合体设备 62和端点设备 61之间的 PCI 快速通道链路 60采用本发明实施例的能量管理方法, 当 PCI快速通道链 路 60中业务流量较小时, 根联合体设备 62可以通过检测该业务流量生成 调整信息后, 首先根联合体设备 62停止向端点设备 61发送数据, 再通过 清除端点设备 61的主设备使能位使端点设备 61将当前数据发送完毕后暂 停向根联合体设备 62发送数据, 根联合体设备 62等待预定的时间后根据 调整信息对链路的速率和 /或位宽进行调整处理, 并与端点设备 62重新协 商, 使两端将收发数据的速率和 /或位宽调整到根联合体设备 62调整处理 后的速率和 /或位宽, 根联合体设备 62确认协商完成后恢复向端点设备 62 发送数据, 同时对端点设备 62 的主设备使能位重新置位, 使其能够重新 向根联合体设备 62发送数据。 上述调整处理之前, 由于根联合体设备 62 清除了端点设备的主设备使能位, 使其能在链路调整之前停止数据发送, 从而可避免链路中正在收发数据的丟失, 保证链路调整不影响链路的业务, 提高了链路能量管理过程中的数据传输的安全性。 另外, 若根联合体设备
62不具有位宽的调整功能,其还可以采用本发明上述实施例中介绍的通过 设置接口链路通道的方式实现链路的位宽调整, 以提高链路能量管理中对 链路调整的灵活性。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程 序代码的介质。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案而非对其 进行限制, 尽管参照较佳实施例对本发明进行了详细的说明, 本领域的普 通技术人员应当理解: 其依然可以对本发明的技术方案进行修改或者等同 替换, 而这些修改或者等同替换亦不能使修改后的技术方案脱离本发明技 术方案的精神和范围。

Claims

权 利 要 求
1、 一种 PCI快速通道链路能量管理方法, 其特征在于, 包括: 第一设备获取对 PCI快速通道链路当前的速率和 /或位宽进行调整处理的 调整信息;
所述第一设备停止数据发送, 并清除链路对端第二设备的配置空间命令 寄存器的主设备使能位, 以使所述第二设备在当前数据发送结束后停止数据 发送;
所述第一设备根据所述调整信息对链路的速率和 /或位宽进行调整处理; 所述第一设备恢复数据发送, 并重新对所述主设备使能位置位, 以使所 述第一设备和第二设备以调整处理后的速率和 /或位宽重新收发数据。
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一设备根据所述调 整信息对链路的位宽进行调整处理, 具体为:
所述第一设备根据所述调整信息通过设置通道禁止功能对链路当前的位 宽进行调整处理。
3、 根据权利要求 2所述的方法, 其特征在于, 所述第一设备根据所述调 整信息通过设置通道禁止功能对链路当前的位宽进行调整处理, 具体包括: 若所述调整信息为将链路当前的位宽降低到某一链路位宽, 则所述第一 设备通过关闭该链路位宽与该链路位宽的上一级链路位宽之间任意的接口链 路通道对链路当前的位宽进行调整处理;
若所述调整信息为将链路当前的位宽提高到某一链路位宽, 则所述第一 设备通过开启该链路位宽对应的所有接口链路通道对链路当前的位宽进行调 整处理。
4、 根据权利要求 1所述的方法, 其特征在于, 所述第一设备根据所述调 整信息对链路的位宽进行调整处理, 具体为:
若所述调整信息为将链路当前的位宽降低到或提高到某一链路位宽, 则 所述第一设备通过将链路当前的位宽设定到该链路位宽对链路当前的位宽进 行调整处理。
5、 根据权利要求 1所述的方法, 其特征在于, 所述第一设备根据所述调 整信息对链路的速率进行调整处理, 具体为:
若所述调整信息为将链路当前的速率降低到或者提高到某一链路速率 , 则所述第一设备将该链路速率写入链路控制第二寄存器;
当对链路当前的速率进行调整时, 所述第一设备根据所述链路控制第二 寄存器中写入的速率值对链路当前的速率进行调整处理。
6、 根据权利要求 1〜5中任一项所述的方法, 其特征在于, 所述第一设备 根据所述调整信息对链路的速率和 /或位宽进行调整处理之后, 还包括:
所述第一设备根据链路控制寄存器中的链路重新协商使能位启动重新协 商, 以使所述第一设备和第二设备将收发数据的速率和 /或位宽调整到所述第 一设备调整处理后的速率和 /或位宽;
根据链路状态寄存器中的链路协商状态值确认重新协商完成。
7、 根据权利要求 6所述的方法, 其特征在于, 所述第一设备获取对 PCI 快速通道链路当前的速率和 /或位宽进行调整处理的调整信息之前, 还包括: 所述第一设备从链路状态寄存器中读取链路当前的速率和位宽; 根据链路能够传输的速率和位宽以及链路当前的速率和位宽确定对链路 当前的速率和 /或位宽进行调整。
8、 根据权利要求 7所述的方法, 其特征在于, 所述第一设备根据所述调 整信息对链路的速率和 /或位宽进行调整处理之后, 还包括:
所述第一设备根据调整处理后的速率和位宽更新链路状态寄存器中的速 率和位宽;
相应地, 所述第一设备以调整处理后的速率和 /或位宽重新收发数据, 具 体为:
所述第一设备按照所述链路状态寄存器中更新后的速率和位宽重新收发 数据。
9、 根据权利要求 7所述的方法, 其特征在于, 所述第一设备根据链路能 够传输的速率和位宽以及链路当前的速率和位宽确定对链路当前的速率和 / 或位宽进行调整之后, 还包括:
所述第一设备获取链路当前的业务流量;
根据所述业务流量与预设的流量门限值的比较结果, 生成对 PCI快速通 道链路当前的速率和 /或位宽的调整信 , ¾。
10、 根据权利要求 9所述的方法, 其特征在于, 所述流量门限值为多个, 每个流量门限值与链路特定带宽的速率和位宽相对应,
相应地,根据所述业务流量与预设的流量门限值的比较结果,生成对 PCI 快速通道链路当前的速率和 /或位宽的调整信息, 具体为:
根据所述业务流量与预设的某个流量门限值的比较结果, 生成将链路当 前的速率和 /或位宽调整到与该流量门限值对应的速率和位宽的调整信息。
11、 根据权利要求 9所述的方法, 其特征在于, 所述第一设备获取链路 当前的业务流量, 具体为:
获取单位时间内通过所述链路收发的报文计数或中断次数;
根据所述报文计数或中断次数确定所述链路当前的业务流量。
12、 根据权利要求 1〜5中任一项所述的方法, 其特征在于, 所述第一设 备清除链路对端第二设备的配置空间命令寄存器的主设备使能位之后, 还包 括:
所述第一设备在清除链路对端第二设备的配置空间命令寄存器的主设备 使能位后等待预定的时间生成停止信息; 或者
在接收到所述第二设备发送的当前数据的结束标志后生成停止信息; 相应地, 所述第一设备根据所述调整信息对链路的速率和 /或位宽进行调 整处理, 具体为:
根据所述停止信息启动对链路的速率和 /或位宽进行调整处理。
13、 根据权利要求 1〜5中任一项所述的方法, 其特征在于, 所述第一设 备为 PCI快速通道的根联合体设备或 PCI快速通道的交换机的下行接口处的 设备; 所述第二设备为 PCI快速通道的端点设备或 PCI快速通道的交换机的 上行接口处的设备。
14、 一种 PCI快速通道设备, 其特征在于, 包括:
获取模块, 用于获取对 PCI快速通道链路当前的速率和 /或位宽进行调整 处理的调整信息;
控制模块, 用于停止所述 PCI快速通道设备的数据发送, 并清除链路对 端设备的配置空间命令寄存器的主设备使能位, 以使所述对端设备在当前数 据发送结束后停止数据发送; 还用于在链路的速率和 /或位宽调整处理之后恢 复所述 PCI快速通道设备的数据发送, 并重新对所述主设备使能位置位, 以 使所述 PCI快速通道设备和对端设备以调整处理后的速率和 /或位宽重新收发 数据;
处理模块, 用于根据所述调整信息对链路的速率和 /或位宽进行调整处 理。
15、 根据权利要求 14所述的设备, 其特征在于, 所述处理模块包括第一 处理单元,
所述第一处理单元, 用于若所述调整信息为将链路当前的位宽降低到某 一链路位宽, 则通过关闭该链路位宽与该链路位宽的上一级链路位宽之间任 意的接口链路通道对链路当前的位宽进行调整处理; 以及若所述调整信息为 将链路当前的位宽提高到某一链路位宽, 则通过开启该链路位宽对应的所有 接口链路通道对链路当前的位宽进行调整处理。
16、 根据权利要求 14所述的设备, 其特征在于, 所述处理模块包括第二 处理单元,
所述第二处理单元, 用于若所述调整信息为将链路当前的位宽降低到或 提高到某一链路位宽, 则通过将链路当前的位宽设定到该链路位宽对链路当 前的位宽进行调整处理。
17、 根据权利要求 14所述的设备, 其特征在于, 所述处理模块包括第三 处理单元,
所述第三处理单元, 用于若所述调整信息为将链路当前的速率降低到或 者提高到某一链路速率, 则将该链路速率写入链路控制第二寄存器; 当对链 路当前的速率进行调整时, 根据所述链路控制第二寄存器中写入的速率值对 链路当前的速率进行调整处理。
18、 根据权利要求 15〜17中任一项所述的设备, 其特征在于, 所述处理 模块还包括协商单元,
所述协商单元, 用于根据链路控制寄存器中的链路重新协商使能位启动 重新协商, 以使所述 PCI快速通道设备和对端设备将收发数据的速率和 /或位 宽调整到所述 PCI快速通道设备调整处理后的速率和 /或位宽; 并根据链路状 态寄存器中的链路协商状态值确认重新协商完成。
19、 根据权利要求 18所述的设备, 其特征在于, 所述获取模块, 还用于 从链路状态寄存器中读取链路当前的速率和位宽; 并根据链路能够传输的速 率和位宽以及当前的速率和位宽确定对链路当前的速率和 /或位宽进行调整; 以及用于获取单位时间内通过所述链路收发的报文计数或中断次数, 根据所 述报文计数或中断次数确定所述链路当前的业务流量; 并根据所述业务流量 与预设的流量门限值的比较结果, 生成对 PCI快速通道链路当前的速率和 /或 位宽的调整信息。
20、 根据权利要求 14〜17中任一项所述的设备, 其特征在于, 所述控制 模块, 还用于清除链路对端设备的配置空间命令寄存器的主设备使能位后等 待预定的时间生成停止信息; 或者, 所述 PCI快速通道设备接收到所述对端 设备发送的当前数据的结束标志后生成停止信息;
所述处理模块, 具体用于根据所述停止信息启动对链路的速率和 /或位宽 进行调整处理。
21、 根据权利要求 14〜17中任一项所述的设备, 其特征在于, 所述 PCI 快速通道设备为 PCI快速通道的根联合体设备或 PCI快速通道的交换机的下 行接口处的设备; 所述对端设备为 PCI快速通道的端点设备或 PCI快速通道 的交换机的上行接口处的设备。
22、 一种 PCI快速通道链路能量管理系统, 其特征在于, 包括: 彼此收 发数据的第一设备和第二设备, 所述第一设备为如权利要求 14〜21 中任一项 所述的 PCI快速通道设备, 所述第二设备为 PCI快速通道的端点设备或 PCI 快速通道的交换机的上行接口处的设备。
PCT/CN2011/077657 2011-07-27 2011-07-27 Pci快速通道设备、链路能量管理方法及系统 WO2012106934A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2011/077657 WO2012106934A1 (zh) 2011-07-27 2011-07-27 Pci快速通道设备、链路能量管理方法及系统
CN201180001310XA CN102439916B (zh) 2011-07-27 2011-07-27 Pci快速通道设备、链路能量管理方法及系统
EP11858152.9A EP2685760B1 (en) 2011-07-27 2011-07-27 Device, link energy management method and link energy management system for peripheral component interconnect (pci) express
US14/083,826 US9423864B2 (en) 2011-07-27 2013-11-19 PCI express device and link energy management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/077657 WO2012106934A1 (zh) 2011-07-27 2011-07-27 Pci快速通道设备、链路能量管理方法及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/083,826 Continuation US9423864B2 (en) 2011-07-27 2013-11-19 PCI express device and link energy management method and device

Publications (1)

Publication Number Publication Date
WO2012106934A1 true WO2012106934A1 (zh) 2012-08-16

Family

ID=45986269

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/077657 WO2012106934A1 (zh) 2011-07-27 2011-07-27 Pci快速通道设备、链路能量管理方法及系统

Country Status (4)

Country Link
US (1) US9423864B2 (zh)
EP (1) EP2685760B1 (zh)
CN (1) CN102439916B (zh)
WO (1) WO2012106934A1 (zh)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701711B (zh) * 2013-11-29 2017-11-24 华为技术有限公司 一种调整链路的方法及装置
CN103780429B (zh) * 2014-01-20 2017-12-08 浙江宇视科技有限公司 一种调整交换机接口工作速率的方法和装置
WO2015149293A1 (zh) * 2014-04-02 2015-10-08 华为技术有限公司 一种PCIe链路故障的处理方法、设备及系统
US9859974B2 (en) 2015-06-25 2018-01-02 International Business Machines Corporation Rerouting bus data signals from faulty signal carriers to existing healthy signal carriers
CN106027413B (zh) * 2015-08-05 2019-04-02 深圳市恒扬数据股份有限公司 报文缓存方法、装置及设备
CN105119376B (zh) * 2015-09-09 2017-08-22 许继集团有限公司 一种基于常规采样goose跳闸模式的采样实现方法及装置
CN107889133B (zh) * 2016-09-30 2021-06-08 华为技术有限公司 无线链路检测和处理方法及装置
CN108449160A (zh) * 2017-02-16 2018-08-24 中兴通讯股份有限公司 报文发送方法及装置
US10552340B2 (en) * 2017-02-28 2020-02-04 Oracle International Corporation Input/output direct memory access during live memory relocation
US20190158374A1 (en) * 2017-11-22 2019-05-23 Advanced Micro Devices, Inc. Dynamic fine grain link control
CN110543442B (zh) * 2018-05-29 2022-02-01 杭州海康机器人技术有限公司 一种数据传输断流恢复方法、装置及系统
CN109284172A (zh) * 2018-09-20 2019-01-29 贵州华芯通半导体技术有限公司 虚拟化环境下的通路资源管理方法、系统和虚拟机管理器
US11073894B2 (en) 2019-05-24 2021-07-27 Qualcomm Incorporated System power management for peripheral component interconnect express (PCIE)-based devices
CN110430601B (zh) * 2019-08-09 2023-05-09 西安科技大学 一种PCI Express链路速率管理系统和管理方法
US10754798B1 (en) * 2019-09-11 2020-08-25 International Business Machines Corporation Link speed recovery in a data storage system
TWI762828B (zh) * 2019-11-01 2022-05-01 緯穎科技服務股份有限公司 高速序列電腦匯流排的訊號調整方法及其相關電腦系統
US11863357B2 (en) * 2019-11-29 2024-01-02 Intel Corporation Communication link re-training
US20220100504A1 (en) * 2020-09-25 2022-03-31 Advanced Micro Devices, Inc. Shared data fabric processing client reset system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848707A (zh) * 2005-04-14 2006-10-18 华为技术有限公司 一种分组数据业务的自适应带宽调整方法
US20070288666A1 (en) * 2006-05-01 2007-12-13 Sysair Inc Apparatus of Computations and Communications Design on Cellular PC Modem
CN101335687A (zh) * 2007-06-27 2008-12-31 中兴通讯股份有限公司 无线通信系统保证用户服务质量的方法
CN101576865A (zh) * 2009-06-03 2009-11-11 福建星网锐捷网络有限公司 保证存储器读交易带宽的方法、装置和中央处理单元

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7426597B1 (en) * 2003-05-07 2008-09-16 Nvidia Corporation Apparatus, system, and method for bus link width optimization of a graphics system
US7136953B1 (en) 2003-05-07 2006-11-14 Nvidia Corporation Apparatus, system, and method for bus link width optimization
US7099969B2 (en) * 2003-11-06 2006-08-29 Dell Products L.P. Dynamic reconfiguration of PCI Express links
US7197591B2 (en) * 2004-06-30 2007-03-27 Intel Corporation Dynamic lane, voltage and frequency adjustment for serial interconnect
TWI311705B (en) 2005-05-23 2009-07-01 Via Tech Inc Peripheral component interconnect express and changing method of link power states thereof
US7757020B2 (en) * 2005-06-29 2010-07-13 Intel Corporation Point-to-point link negotiation method and apparatus
US7539809B2 (en) * 2005-08-19 2009-05-26 Dell Products L.P. System and method for dynamic adjustment of an information handling systems graphics bus
US20070233930A1 (en) * 2006-03-14 2007-10-04 International Business Machines Corporation System and method of resizing PCI Express bus widths on-demand
US7461195B1 (en) * 2006-03-17 2008-12-02 Qlogic, Corporation Method and system for dynamically adjusting data transfer rates in PCI-express devices
US7536490B2 (en) * 2006-07-20 2009-05-19 Via Technologies, Inc. Method for link bandwidth management
CN101123511B (zh) 2007-09-21 2010-06-02 杭州华三通信技术有限公司 一种pci快速总线系统及其能量管理方法
US7793030B2 (en) * 2007-10-22 2010-09-07 International Business Machines Corporation Association of multiple PCI express links with a single PCI express port
US7711886B2 (en) * 2007-12-13 2010-05-04 International Business Machines Corporation Dynamically allocating communication lanes for a plurality of input/output (‘I/O’) adapter sockets in a point-to-point, serial I/O expansion subsystem of a computing system
US7809869B2 (en) * 2007-12-20 2010-10-05 International Business Machines Corporation Throttling a point-to-point, serial input/output expansion subsystem within a computing system
US7747809B2 (en) * 2008-02-19 2010-06-29 International Business Machines Corporation Managing PCI express devices during recovery operations
US7852757B1 (en) * 2009-03-10 2010-12-14 Xilinx, Inc. Status based data flow control for chip systems
US8677180B2 (en) * 2010-06-23 2014-03-18 International Business Machines Corporation Switch failover control in a multiprocessor computer system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848707A (zh) * 2005-04-14 2006-10-18 华为技术有限公司 一种分组数据业务的自适应带宽调整方法
US20070288666A1 (en) * 2006-05-01 2007-12-13 Sysair Inc Apparatus of Computations and Communications Design on Cellular PC Modem
CN101335687A (zh) * 2007-06-27 2008-12-31 中兴通讯股份有限公司 无线通信系统保证用户服务质量的方法
CN101576865A (zh) * 2009-06-03 2009-11-11 福建星网锐捷网络有限公司 保证存储器读交易带宽的方法、装置和中央处理单元

Also Published As

Publication number Publication date
EP2685760A1 (en) 2014-01-15
US9423864B2 (en) 2016-08-23
EP2685760B1 (en) 2018-04-04
CN102439916A (zh) 2012-05-02
US20140082251A1 (en) 2014-03-20
EP2685760A4 (en) 2015-06-03
CN102439916B (zh) 2013-10-09

Similar Documents

Publication Publication Date Title
WO2012106934A1 (zh) Pci快速通道设备、链路能量管理方法及系统
US10552352B2 (en) Methods and apparatus for synchronizing uplink and downlink transactions on an inter-device communication link
US20110173352A1 (en) Power Reduction on Idle Communication Lanes
US10564703B2 (en) Systems and methods for facilitating low power on a network-on-chip
CN101409715B (zh) 一种利用InfiniBand网络进行通信的方法及系统
EP1280302B1 (en) Multiple virtual channels for use in network devices
US9424224B2 (en) PCIe tunneling through SAS
JP2019523582A5 (zh)
US9256564B2 (en) Techniques for improving throughput and performance of a distributed interconnect peripheral bus
CN114556814A (zh) 针对链路启动协商的延长的链路训练时间
CN106533970A (zh) 面向云计算数据中心网络的差分流传输控制方法及装置
WO2019129023A1 (zh) 基于nof的读取控制方法、装置及系统
WO2018113377A1 (zh) 一种具有触屏功能的双系统一体机及其通信方法
US8745296B2 (en) Serial storage protocol compatible frame conversion, at least in part being compatible with SATA and one packet being compatible with PCIe protocol
WO2018218957A1 (zh) 一种流量控制方法、设备及系统
CN113687770B (zh) 调节跨速率失配网络的NVMe-oF命令请求和数据流的系统和方法
EP4195760A1 (en) Roce network congestion control method and related apparatus
JPWO2005020523A1 (ja) セッション中継装置及び中継方法
TWI411264B (zh) 非阻塞式網路系統及其封包仲裁方法
KR20120122523A (ko) 혼잡 윈도우 크기 조절 방법 및 그에 따른 tcp 시스템
US20050213500A1 (en) Techniques to adaptively control flow thresholds
JP2010009472A (ja) ネットワークシステム、ネットワークシステムの制御方法および制御プログラム
TWI316665B (en) Method for link bandwidth management
WO2012130010A1 (zh) 流量控制方法及装置
CN107888508A (zh) 一种基于pc‑nc的数控系统及其aut抗干扰弱实时网络协议

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180001310.X

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11858152

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011858152

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE