WO2022226936A1 - 一种限制功耗的方法和装置 - Google Patents

一种限制功耗的方法和装置 Download PDF

Info

Publication number
WO2022226936A1
WO2022226936A1 PCT/CN2021/091171 CN2021091171W WO2022226936A1 WO 2022226936 A1 WO2022226936 A1 WO 2022226936A1 CN 2021091171 W CN2021091171 W CN 2021091171W WO 2022226936 A1 WO2022226936 A1 WO 2022226936A1
Authority
WO
WIPO (PCT)
Prior art keywords
power consumption
module
data
electronic device
cache
Prior art date
Application number
PCT/CN2021/091171
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/CN2021/091171 priority Critical patent/WO2022226936A1/zh
Priority to CN202180087714.9A priority patent/CN116670622A/zh
Publication of WO2022226936A1 publication Critical patent/WO2022226936A1/zh

Links

Images

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
    • 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
    • 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 embodiments of the present application relate to the field of chip technologies, and in particular, to a method and apparatus for limiting power consumption.
  • Embodiments of the present application provide a method and apparatus for limiting power consumption, which can improve the energy consumption utilization rate and bandwidth processing capability of a data chip.
  • an embodiment of the present application provides an electronic device, the electronic device includes a cache, the cache includes a cache module and a cache control module, the cache module is used to store data, wherein: the cache control module is used to detect the function of the electronic device.
  • the power consumption hotspot information which is used to reflect the power consumption of the electronic device; the cache control module is also used to determine that when the power consumption hotspot information is greater than or equal to the first preset threshold, reduce the bandwidth for reading data from the cache module .
  • the bandwidth for reading data from the cache module may be reduced to a second preset threshold.
  • the cache control module can reduce the bandwidth for reading data from the cache module, thereby reducing the power consumption of the electronic device, To ensure that the business of electronic devices is not damaged.
  • the cache control module includes: a power consumption hotspot detection submodule for periodically detecting power consumption hotspot information of the electronic device, and sending the power consumption hotspot information to the overheating protection control submodule; the overheating protection control submodule a module, configured to send control information to the data scheduling sub-module when it is determined that the power consumption hotspot information is greater than or equal to the first preset threshold, where the control information is used to instruct the data scheduling sub-module to reduce the bandwidth for reading data from the cache module; data scheduling The sub-module is used to reduce the bandwidth of reading data from the cache module according to the control information.
  • the electronic device can be reduced in time.
  • the bandwidth of the device for reading data thereby reducing the power consumption of the electronic device, improving the energy consumption utilization rate and the processing capability of the data chip bandwidth.
  • the power consumption hotspot information includes the read/write access rate of the cache module, and the read/write access rate includes the sum of the number of read accesses and the number of write accesses performed on the cache module within a preset period.
  • the power consumption hotspot information includes a data processing inversion rate of the electronic device, and the data processing inversion rate includes the number of state inversions of a trigger used for data processing in the electronic device within a preset period.
  • the power consumption hotspot information includes temperature information of the electronic device, and the temperature information is the temperature of a temperature sampling point of the electronic device.
  • the power consumption of the electronic device is less than the maximum limit power consumption of the electronic device.
  • the buffer control module for reducing the bandwidth for reading data from the buffer module includes: the buffer control module for reducing the bandwidth for reading data from the buffer module through a plurality of bandwidth levels. That is to say, the bandwidth of the cache control module to reduce the read data bandwidth can be smoothly reduced sequentially through multiple bandwidth gears until it reduces to an appropriate read data bandwidth value. Set the threshold.
  • an embodiment of the present application provides a method for limiting power consumption.
  • the method is applied to an electronic device.
  • the method includes: detecting power consumption hotspot information of the electronic device, and the power consumption hotspot information is used to reflect the power consumption of the electronic device. size; when it is determined that the power consumption hotspot information is greater than or equal to the first preset threshold, the bandwidth for reading data from the cache module is reduced.
  • the bandwidth for reading data from the cache module may be reduced to a second preset threshold.
  • the power consumption hotspot information of the electronic device is periodically detected, and the power consumption hotspot information is sent to the overheat protection control sub-module; when it is determined that the power consumption hotspot information is greater than or equal to the first preset threshold, the data scheduling The sub-module sends control information, and the control information is used to instruct the data scheduling sub-module to reduce the bandwidth of reading data from the cache module; and reduce the bandwidth of reading data from the cache module according to the control information.
  • the power consumption hotspot information includes the read/write access rate of the cache module, and the read/write access rate includes the sum of the number of read accesses and the number of write accesses performed on the cache module within a preset period.
  • the power consumption hotspot information includes a data processing inversion rate of the electronic device, and the data processing inversion rate includes the number of state inversions of a trigger used for data processing in the electronic device within a preset period.
  • the power consumption hotspot information includes temperature information of the electronic device, and the temperature information is the temperature of a temperature sampling point of the electronic device.
  • the power consumption of the electronic device is less than the maximum limit power consumption of the electronic device.
  • reducing the bandwidth for reading data from the cache module includes: reducing the bandwidth for reading data from the cache module through multiple bandwidth gears.
  • FIG. 1 is a schematic diagram of the design architecture of a single board
  • FIG. 2 is a schematic diagram of an application scenario of a method for limiting power consumption provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for limiting power consumption provided by an embodiment of the present application
  • 5A is a schematic diagram of the relationship between power consumption and time of a method for limiting power consumption provided by an embodiment of the present application
  • 5B is a schematic diagram of the relationship between power consumption and time of a method for limiting power consumption provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of signal interaction of a method for limiting power consumption provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • the design architecture of a single board is shown in Figure 1, including a service chip (such as a data chip), a clock chip, and a fan.
  • a temperature detection unit in the service chip such as temperature sensor (temperature sensor, Tsensor) temperature detection.
  • the temperature detection unit can feed back the temperature value of the service chip.
  • the board The operating frequency of the service chip can be reduced by the clock chip, or the fan speed can be increased to achieve the effect of cooling the service chip.
  • the processing capability of the service chip can be restricted according to the power supply and heat dissipation capability of the board.
  • the processing bandwidth of the service chip can be reduced to reduce the processing capacity of the service chip.
  • specifications or when it is detected that the input bandwidth exceeds the processing bandwidth threshold of the service chip, some packets are directly discarded at the interface of the service chip, and only the packets within the bandwidth processing capacity, that is, the packets within the power consumption capacity, are transmitted. Discarding some packets is usually based on the tail of the packet input queue, for example, discarding part of the packets at the tail of the packet input queue at the Media Access Control (MAC) port of the service chip, or based on packet priority Tail discard, such as discarding some packets with lower priority.
  • MAC Media Access Control
  • the input bandwidth of the service chip will not exceed the limit processing capability of the chip processing bandwidth threshold for a long time.
  • the average packet length of the packets transmitted by the service chip is greater than 300 bytes (Byte , B), the average packet length of the message is less than 300B only in the short term, and because the smaller the average packet length of the message, the greater the turnover rate of the service chip processing the message, and the power consumption of the service chip is prone to occur. If the power consumption exceeds the power consumption threshold, the solution of discarding the packets exceeding the processing capability of the chip can be adopted, but this will reduce the user experience of using the product to which the service chip belongs.
  • this application proposes a method for limiting power consumption, which can be applied to an electronic device.
  • the electronic device in this application can be understood as a service chip, such as a data chip, and the data chip can be a chip in a data center. Its function can be used for the exchange of data center messages.
  • the present application can be applied to the scenario of monitoring the power consumption of data chips.
  • the power consumption hotspot information can be used to predict the overheating risk of the data chip and the heat dissipation risk of the single board according to the power consumption hotspot information, so as to prevent the power consumption of the data chip from being too high.
  • the method for limiting power consumption may include: by detecting power consumption hotspot information used to reflect the power consumption of the data chip, for example, performing local temperature detection, cache access rate detection, and data inversion rate detection on the data chip. At least one kind of detection, according to the detection result to determine whether the power consumption of the data chip is likely to reach the power consumption limit value, if the detection result reflects that the current power consumption of the data chip is too high, it may reach the power consumption limit value, for example, the power consumption hotspot information has reached the power consumption limit value.
  • the threshold is preset, the bandwidth for reading data in the cache of the data chip can be adjusted, so as to read and output the data in the cache according to the adjusted bandwidth.
  • a scheme for reducing power consumption can be taken in advance before the power consumption of the data chip is about to reach the power consumption limit, which can avoid the drawbacks of service damage caused by the packet loss strategy adopted in the prior art, and the present application can improve the user experience.
  • the method for limiting power consumption provided by the present application can be applied to data center equipment, for example, the data center equipment can be applied to the scenario of communication between the data center equipment 201 and the data center server 202 , such as Internet information synchronization, data Backup and move the scene.
  • the data center device may also be applied to a scenario of communication between the data center device 201 and the computing network server 203, such as a scenario of software computing signaling.
  • the data center device in this application may be a switch, and the switch includes the data chip in this application.
  • the electronic device may be a data chip in a data center, a data chip exemplified by chip 300 in FIG. 3 .
  • the chip 300 may include a processor 301, a cache 302, a chip interface 303, and the like.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the chip 300 .
  • the chip 300 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the cache 302 may include a cache control module 3021 and a cache module 3022 .
  • the cache module 3022 can be used to store data, which is equivalent to a data storage unit of a data chip, and the cache control module 3021 can be used to perform read access or write access to the cache module 3022 .
  • the cache control module 3021 can be used to perform read access or write access to the cache module 3022 .
  • the cache control module 3021 can request from the cache module 3022 to schedule and output the packet to the processor 301 to continue processing, so as to output the processed packet from the output MAC port of the data chip.
  • the present application improves the function of the cache control module 3021, that is, the cache control module 3021 can be used to detect the power consumption hotspot information of the data chip, and control the bandwidth of data read to the cache module 3022 according to the power consumption hotspot information.
  • the processor 301 may include one or more processing units, and the processing units are used to edit and process the data read from the cache module 3022. For example, when the data is understood as a message, the message can be identified and processed according to the message header information. Generate message editing commands according to message forwarding behavior, and develop instructions for message identification and message editing, such as querying ternary content addressable memory (TCAM), querying Hash table (Hash table), etc.
  • chip 300 may also include one or more processors 301, including processors dedicated to data processing of data chips.
  • the processor 301 can be understood as the nerve center and command center of the chip 300 .
  • the operation control signal can be generated according to the instruction operation code and the timing signal to complete the control of fetching and executing the instruction.
  • the processor 301 can be used to edit and process the data read from the cache module 3022 .
  • the chip interface 303 may include one or more chip interfaces for communicating with external devices of the chip, such as communicating with a server smart network card and a router in a data center device connected to an external network, or communicating with a data center switch outside the data center device .
  • an embodiment of the present application provides a method for limiting power consumption, and the method includes:
  • Step 401 the electronic device detects power consumption hotspot information of the electronic device.
  • the power consumption hotspot information is used to reflect the power consumption of the electronic device.
  • the power consumption hotspot information may include The read/write access rate of the cache module 3022.
  • the read/write access rate of the cache module 3022 may include the sum of the number of read accesses and the number of write accesses performed on the cache module 3022 within a preset period, that is, the cache control module 3021 in the data chip has an effect on the cache module 3022 The sum of the number of read accesses and the number of write accesses performed in the preset cycle. That is, when the cache control module 3021 accesses the cache module 3022, the data chip will generate power consumption.
  • the power consumption hotspot information may include a data processing toggle rate of the electronic device.
  • the data processing inversion rate may include the number of state inversions of a flip-flop used for data processing in the electronic device within a preset period.
  • the flip-flop can be understood as a memory cell circuit that can only operate when a clock signal is triggered.
  • the change of the state value of the flip-flop from “0" to “1” can be understood as a state reversal
  • the change of the state value of the flip-flop from "1" to "0” can be understood as a state reversal.
  • the previous state value of the flip-flop is "1", and the next state value is also "1", which can be understood as the state of the flip-flop has not flipped.
  • the data processed by the data chip may be understood as a message.
  • the state inversion of the flip-flop can be used for the state inversion of the flip-flop when the data chip performs message identification, message registration, message editing and other processing in message processing. That is to say, when the data chip performs processing such as identifying, registering, and editing the message, the data chip will generate power consumption.
  • the power consumption hotspot information may include temperature information of the electronic device.
  • the temperature information can be understood as the temperature of the temperature sampling point of the electronic device.
  • the temperature sampling point can be understood as a sampling point in the data chip that can reflect the power consumption of the chip. There are many ways to detect temperature here, such as using Tsensor temperature detection.
  • the temperature information can also be acquired periodically by the cache control module 3021, for example, the cache control module 3021 detects the temperature of the temperature sampling point once per unit time.
  • the power consumption hotspot information in this application is not limited to information such as read/write access rate, data processing turnover rate, and temperature information, and may also include other information that can reflect power consumption, which is not limited in this application.
  • the operations that generate power consumption include operations such as message input, message storage, message output, and message processing (including the above-mentioned message identification, message storage, and message editing), etc.
  • the power consumption of these operations occupies most of the power consumption of the data chip.
  • Step 402 when the electronic device determines that the power consumption hotspot information is greater than or equal to the first preset threshold, reduce the bandwidth for reading data from the cache module 3022 .
  • the cache control module 3021 performs a write operation to the cache module 3022, it is equivalent to writing data into the cache module 3022, and the write operation will generate power consumption.
  • the cache control module 3021 performs a read operation to the cache module 3022, it is equivalent to writing Data is read from the cache module 3022, and the read operation also generates power consumption.
  • the smooth peak flow can be considered from the flow, that is, the cache
  • the control module 3021 controls the flow of data read from the cache module 3022, or reduces the bandwidth of the data read from the cache module 3022 by the cache control module 3021, or reduces the amount of data the cache control module 3021 reads from the cache module 3022. In this way, the access rate of the cache module 3022 is reduced, and the power consumption of the output side of the electronic device is correspondingly alleviated.
  • the power consumption of the electronic device can be reduced by reducing the read/write access rate of the cache module 3022 per unit time.
  • the cache control module 3022 can reduce the rate of reading packets from the cache module 3022 to reduce the processing rate of the output side of the data chip and reduce the power consumption of the data chip. get relief.
  • the cache control module 3021 stores a first preset threshold.
  • the cache control module 3021 can compare the power consumption hotspot information with the first preset threshold.
  • the cache control module 3021 can reduce the bandwidth for reading data from the cache module 3022, for example, can reduce the bandwidth for reading data from the cache module 3022 to the second preset threshold.
  • the first preset threshold can be understood as a threshold of power consumption hotspot information of the data chip
  • the second preset threshold is corresponding to the first preset threshold for the cache control module 3021 to read data from the cache module 3022 bandwidth value.
  • the first preset threshold may be understood as the read/write access rate threshold.
  • the cache control module 3021 reduces the bandwidth for reading data from the cache module 3022 .
  • the first preset threshold may be understood as the data processing inversion rate threshold.
  • the cache control module 3021 reduces the bandwidth for reading data from the cache module 3022 .
  • the first preset threshold may be understood as a temperature information threshold.
  • the cache control module 3021 reduces the bandwidth for reading data from the cache module 3022 .
  • the power consumption of the electronic device when the power consumption hotspot information is equal to the first preset threshold, the power consumption of the electronic device is less than the maximum limit power consumption of the electronic device. In other words, the power consumption value corresponding to the first preset threshold value is less than the maximum limit power consumption of the data chip.
  • the cache control module 3021 controls the bandwidth for reading data from the cache module 3022 to be reduced to a second preset threshold, the second preset threshold is less than the maximum bandwidth that can read data from the cache module 3022 . It can be understood that once the power consumption of the data chip is greater than the maximum power consumption limit that the data chip can withstand, the single board will have the problem of insufficient power supply and heat dissipation processing capability for the data chip.
  • the first preset threshold is set to a value smaller than the maximum power consumption limit of the data chip.
  • the purpose of this is to reduce the read data bandwidth of the data chip in advance when the power consumption of the data chip is too high, so that the power consumption of the data chip can be reduced.
  • the power consumption hotspot information of the data chip is less than the power consumption hotspot information threshold, that is, the current power consumption of the data chip is less than the maximum limit power consumption that the data chip can bear, Therefore, the power consumption of the data chip is within the maximum limit power consumption range that the data chip can bear.
  • FIG. 5A it is a relationship diagram between power consumption and time of the data chip of the present application.
  • the relationship between the power consumption of the data chip in actual work and time is shown in the curve 1 in Figure 5A. It may occur that the power consumption of the data chip is at the maximum limit power consumption of the data chip, that is, the power consumption peak A in Figure 5A. There will be a situation where the power consumption is very small, that is, the power consumption valley B in Figure 5A.
  • the input bandwidth of the data chip exceeds the chip processing bandwidth threshold, in the prior art, there may be a scenario in which the power consumption of the data chip exceeds the maximum limit power consumption during the period from t1 to t2 in FIG. 5A .
  • the cache control module 3021 monitors the power consumption hotspot information of the data chip in real time, and can, before time t1, for example, at point C in FIG. 5A, when the power consumption hotspot information is greater than or equal to the th When a preset threshold is reached, it is determined that the data chip has the risk of excessive power consumption, and the method of reducing the bandwidth of reading data from the cache module 3022 is adopted, so that part of the data that should be read within the time t1 to t2 is delayed in Read after time t2.
  • the present application can make the curve 1 become as shown in Figure 5B
  • the curve 2 shown that is, the power consumption of the data chip can be smoothed to the power consumption valley B, which limits the power consumption of the data chip, ensures that the power consumption of the data chip does not exceed the maximum limit power consumption, and alleviates the heat dissipation of the data chip. Power supply problem.
  • the power consumption hotspot information is taken as an example of one of the read/write access rate of the cache module 3022, the data processing turnover rate of the electronic device, or the temperature information of the electronic device. of. It can be understood that the power consumption hotspot information of the present application may also include at least two of the read/write access rate of the cache module 3022, the data processing turnover rate of the electronic device, and the temperature information of the electronic device. Combining the at least two power consumption hotspots The information is synthesized to determine whether the power consumption hotspot information is greater than or equal to the corresponding preset threshold.
  • the cache control module 3021 stores three kinds of preset thresholds: the preset threshold value corresponding to the read/write access rate.
  • a threshold value, a preset threshold value corresponding to the data processing turnover rate, and a preset threshold value corresponding to the temperature information are set.
  • the cache control module 3021 determines that the read/write access rate is greater than the threshold of the read/write access rate, the data processing inversion rate is greater than the threshold of the data processing inversion rate, and the temperature information is greater than the threshold of the temperature information, the cache control module 3021 reduces the The bandwidth of read data in module 3022.
  • the implementation manner of comprehensively judging whether the power consumption hotspot information is greater than or equal to the corresponding preset threshold value in combination with the three kinds of power consumption hotspot information may be: judging the read/write access rate of the cache module 3022 and the data processing turnover rate of the electronic device. and whether at least one power consumption hotspot information in the temperature information of the electronic device is greater than or equal to its corresponding preset threshold.
  • the implementation manner of comprehensively judging whether the power consumption hotspot information is greater than or equal to the corresponding preset threshold in combination with the three kinds of power consumption hotspot information may be, the weight calculation may be performed on the read/write access rate, the data processing turnover rate and the temperature information. Then, an integrated value is obtained, and the integrated value is compared with the first preset threshold to determine whether the integrated value is greater than or equal to the first preset threshold.
  • the first preset threshold can be understood as a weight threshold.
  • the cache control module 3021 when the cache control module 3021 reduces the bandwidth for reading data from the cache module 3022, it can reduce the bandwidth for reading data from the cache module 3022 through multiple bandwidth levels. It can also be understood that there are multiple bandwidth levels stored in the cache control module 3021, and each bandwidth level can be understood as a bandwidth value. For example, when the cache control module 3021 controls the bandwidth for reading data from the cache module 3022 to be reduced to a second preset threshold, the second preset threshold is the lowest bandwidth value among the multiple bandwidth values.
  • Setting the bandwidth gear is to consider that the power consumption hotspot information of the data chip may be only slightly larger than the first preset threshold. In this case, the bandwidth for reading data only needs to be reduced by a small value to enable the power consumption hotspot information. is less than the first preset threshold, so that the power consumption of the data chip will not reach the maximum power consumption limit that the data chip can withstand, so there is no need to continue to reduce the bandwidth of reading data, and avoid reducing the bandwidth of reading data at one time. Too much, causing the data chip to process the data for too long.
  • setting the bandwidth level can also smooth the power consumption of the data chip, so that the difference between the power consumption peak of the data chip and the power consumption of the power consumption valley is not too large.
  • the present application can determine the possible power supply and heat dissipation risks of the data chip in advance by monitoring the power consumption hotspot information of the data chip, so as to actively smooth the peak flow and alleviate the problem of insufficient power supply and heat dissipation capacity of the single board,
  • the maximum processing capacity of the chip is achieved in terms of the maximum power supply and heat dissipation capacity of the single board.
  • the cache control module 3021 stores 5 bandwidth grades, which are grade 0, grade 1, grade 2, grade 3, grade 4, and grade 0 indicates that data is not read, that is, the bandwidth for reading data is 0.
  • Level 1 means that the bandwidth for reading data is 1/4 of the bandwidth threshold for reading data. The higher the gear level, the greater the bandwidth value of the read data.
  • Level 4 indicates that when the power consumption hotspot information is less than the first preset threshold, the cache control module 3021 normally reads the data from the cache module 3022 The bandwidth threshold. That is, the default bandwidth for reading data is 4th gear. When the power consumption hotspot information is less than the first preset threshold, the bandwidth of the cache control module 3021 for reading data from the cache module 3022 is kept at 4th gear.
  • the cache control module 3021 determines that the power consumption hotspot information is greater than or equal to the first preset threshold, the cache control module 3021 reduces the bandwidth for reading data from the cache module 3022 through multiple bandwidth levels. For example, when the cache control module 3021 determines that the power consumption hotspot information is greater than or equal to the first preset threshold, and the cache control module 3021 controls the bandwidth for reading data from the cache module 3022 to decrease to the second preset threshold, it can control the reading The bandwidth of the data is reduced from the 4th grade to the 3rd grade and then to the 2nd grade of the bandwidth value.
  • the second preset threshold can be understood as the 2nd grade of the bandwidth value.
  • the method for limiting power consumption can be applied to an electronic device, such as a data chip.
  • the power consumption hotspot information of the electronic device is detected by the cache control module 3021.
  • the power consumption hotspot information is greater than or equal to the first preset threshold, it indicates that there may be a risk that the power consumption is too high and thus exceeds the maximum limit power consumption, which can reduce the amount of power consumption from the cache.
  • the bandwidth of reading data in the module 3022 when the bandwidth of reading data is reduced, correspondingly, the access rate of the cache module 3022 is reduced, and the data processing turnover rate of the data chip is also reduced, so that the output bandwidth of the entire data chip will not be reduced.
  • the power consumption will not be too large, so as to avoid the problem that the heat dissipation capacity of the data chip reaches the bottleneck and cannot continue to dissipate heat during peak business.
  • the bandwidth of the read cache module 3022 in the present application is reduced and the data output rate is reduced, the present application does not discard data when the power consumption is too high, and the data received by the data chip is still cached in the cache module 3022 according to the input bandwidth. , only the output bandwidth is reduced, and there will be no data loss in a short period of time (for example, the cache module 3022 will not drop the message within the time that the storage capacity of the message can be tolerated, and the dropped message may occur when the storage capacity of the message is exceeded.
  • the present application reduces the ratio of packet loss, improves the utilization rate of energy consumption, improves the bandwidth processing capability of data chips, and also achieves In order to achieve the maximum processing capacity of the chip on the maximum power supply and heat dissipation capacity of the single board, and alleviate the heat dissipation and power supply problems of the data chip.
  • the present application provides a schematic diagram of the hardware structure of an electronic device.
  • the data chip in the center the data chip exemplified by chip 600 in FIG. 6 .
  • the chip 600 includes a processor 601 , a cache 602 , and a chip interface 603 .
  • the cache 602 includes a cache control module 6021 and a cache module 6022.
  • the cache control module 6021 is similar to the cache control module 3021 above, and the cache module 6022 is similar to the cache control module 3022 above.
  • the cache control module 6021 includes a power consumption hotspot detection sub-module, an overheat protection control sub-module and a data scheduling sub-module.
  • the power consumption hotspot detection sub-module is used to periodically detect the power consumption hotspot information of the electronic device, and send the power consumption hotspot information to the overheat protection control submodule.
  • the power consumption hot spot detection sub-module may include at least one of a data inversion rate detection unit, a read/write access rate detection unit, and a local temperature detection unit.
  • the overheat protection control sub-module is used to determine that when the power consumption hotspot information received from the power consumption hotspot detection sub-module is greater than or equal to the first preset threshold, send control information to the data scheduling sub-module, and the control information is used to instruct the data scheduling sub-module Reduce the bandwidth for reading data from the cache module.
  • the data scheduling sub-module is configured to reduce the bandwidth of reading data from the buffer module 6022 according to the control information.
  • the workflow of the chip 600 may include: data outside the chip 600 may be input through the chip interface 603 and stored in the cache module 6022 , and the processor 601 may be configured to read data from the cache module 6022 through the cache control module 6021 and process deal with.
  • the data is understood as a message
  • the processor 601 wants to read the message in the cache module 6022, it can read the message from the cache module 6022 through the cache control module 6021, and the processor 601 can then read the message from the read message.
  • the message performs identification and editing of the message, and sends the edited message to other hardware structures connected to the chip 600 through the chip interface 603 .
  • the overheat protection control sub-module in the cache control module 6021 can detect the data inversion rate detection unit, the read/write access rate detection unit and the local temperature detection unit according to the detection At least one of the results determines the bandwidth of the packet read by the cache control module 6021 from the cache module 6022 to control the power consumption of the data chip 600 .
  • the data inversion rate detection unit may be used to detect the data inversion rate of the data chip, and send the detected data inversion rate value to the overheat protection control sub-module .
  • the read/write access rate detection unit may be used to detect the read/write access rate of the cache module 6022, and send the detected read/write access rate value to the overheat protection control sub-module.
  • the local temperature detection unit can be used to detect the temperature information of the electronic device, and send the value of the detected temperature information to the overheat protection control sub-module.
  • the power consumption hot spot detection sub-module performs power consumption detection in combination with the data inversion rate detection unit, the read/write access rate detection unit and the local temperature detection unit. As shown in FIG. 7 , this is the cache control module 6021 in the data chip of the application.
  • the local temperature detection unit, the read/write access rate detection unit and the data inversion rate detection unit in the power consumption hotspot detection submodule send the power consumption hotspot information of the respective detected chips to the overheat protection control submodule.
  • the overheat protection control sub-module compares the power consumption hotspot information with the first preset threshold, and determines whether the bandwidth of the current read data needs to be adjusted.
  • the overheat protection control sub-module can send control information to the data scheduling sub-module.
  • the control information is used to instruct the data scheduling sub-module to reduce the bandwidth for reading data from the cache module.
  • the data scheduling sub-module reduces the bandwidth for reading data from the cache module 6022 according to the control information.
  • the overheat protection control sub-module may encapsulate the second preset threshold of the bandwidth in transmission control information and send it to the data scheduling sub-module,
  • the data scheduling sub-module controls the bandwidth for reading data from the cache module 6022 to be reduced to the second preset threshold according to the second preset threshold carried in the control information.
  • the read/write access rate detection unit may send the read/write access rate value to the overheat protection control sub-module, and may also send the indication information corresponding to the read/write access rate value.
  • the data inversion rate detection unit may send the value of the data inversion rate to the overheat protection control sub-module, and may also transmit the indication information corresponding to the value of the data inversion rate.
  • the local temperature detection unit may send the value of the temperature information to the overheat protection control sub-module, or may send the indication information corresponding to the value of the temperature information.
  • the indication information is the gear identification of the bandwidth of the read data.
  • the read/write access rate detection unit and the data inversion rate detection unit of the present application may be implemented in digital circuits, that is, the cache control module 6021 may be added to detect the read/write access rate and data of the electronic device. Toggle rate for digital circuits.
  • the local temperature detection unit may be implemented by an analog circuit or an analog intellectual property (IP), that is, one or more analog IPs are embedded in the cache control module 6021 to implement temperature detection of the electronic device.
  • IP analog intellectual property
  • the above-mentioned digital circuit and analog IP may be located in the cache control module 6021 , or may be located in the circuit between the cache module 6022 and the cache control module 6021 .
  • the overheat protection control sub-module determines that the power consumption hotspot information is greater than or equal to the first preset threshold, it is determined that the read data will be read.
  • the data bandwidth is reduced to 3rd gear. For example, it is determined that the second preset threshold corresponding to the first preset threshold is the 3rd gear, and the control information sent by the overheat protection control sub-module to the data scheduling submodule includes the 3rd gear identifier.
  • the overheat protection control sub-module can independently judge the current power consumption of the electronic device according to the read/write access rate.
  • the overheat protection control sub-module can send control information to the data scheduling sub-module, and the control information is used to instruct the data scheduling sub-module to reduce the bandwidth for reading data from the cache module. for instructing the data scheduling sub-module to reduce the bandwidth for reading data to a second preset threshold.
  • the overheat protection control sub-module can also independently judge the current power consumption of the electronic device according to the data processing turnover rate or temperature information.
  • the overheat protection control sub-module when the overheat protection control sub-module receives the read/write access rate, the data processing inversion rate and the temperature information, the overheat protection control sub-module can synthesize the read/write access rate, the data processing inversion rate and the temperature information according to the Determine the current power consumption of the electronic device.
  • the overheat protection control sub-module can synthesize the read/write access rate, the data processing inversion rate and the temperature information according to the Determine the current power consumption of the electronic device.
  • the specific judgment method please refer to the description in the above step 402.
  • the data scheduling sub-module is configured to reduce the bandwidth of reading data from the buffer module 6022 when the control information is received.
  • the data scheduling sub-module when the data scheduling sub-module reduces the bandwidth for reading data from the cache module 6022, it may reduce the bandwidth for reading data through multiple bandwidth levels. For a specific implementation manner, refer to the description in the foregoing step 402 .
  • the overheat protection control sub-module determines that the control information sent to the data scheduling sub-module may include a 0-level identifier.
  • 0 file means not to read data, which is equivalent to controlling the data scheduling sub-module to set back pressure.
  • the power consumption of the data chip decreases, that is, when the power consumption hotspot information currently received by the overheat protection control sub-module is smaller than the first preset threshold Giving the gear to the data scheduling sub-module is equivalent to controlling the data scheduling sub-module to cancel the back pressure.
  • the cache read/write access rate of the large buffer is It can be understood that when the read/write access rate of the cache module 6022 in the present application reaches the first preset threshold, the overheat protection control sub-module can configure the read/write access rate within the cycle according to the software, that is, the first preset threshold.
  • the overheat protection control sub-module sends the back-pressure information (equivalent to the control information above) to the data scheduling sub-module in this cycle ), thereby reducing the read access rate of the cache module 3022, or reducing the bandwidth for reading data, to ensure that the power consumption of the data chip is within 1500W.
  • this application can ensure that the message service is not damaged to the greatest extent. That is, when the power consumption of the data chip suddenly rises, the data scheduling sub-module is used for back pressure at intervals, and the back pressure does not affect the write capability of the cache module 3022 in a short period of time.
  • the data chip implements a large buffer, but the output bandwidth is reduced, or the output message The rate is reduced, thereby ensuring that the incoming and outgoing message services are not damaged, and achieving the maximum processing capacity of the chip in terms of the maximum power supply and heat dissipation capacity of the single board.
  • the electronic device provided in the embodiment of the present application, such as a data chip, can detect the power consumption hotspot information of the electronic device through the power consumption hotspot detection sub-module, and send the detected power consumption hotspot information to the overheat protection control sub-module, and the The overheating protection control sub-module determines the relationship between the power consumption hotspot information and the first preset threshold, and when the power consumption hotspot information is greater than or equal to the first preset threshold, the overheating protection control submodule sends control information to the data scheduling submodule, wherein The control information is used to instruct the data scheduling sub-module to reduce the bandwidth of reading data from the cache module, and the data scheduling sub-module reduces the bandwidth of reading data from the cache module 6022 according to the control information, thereby reducing the power consumption of the data chip.
  • the interface of the service chip is reduced. Quantity, to reduce the processing bandwidth of the service chip to reduce the processing specifications of the service chip, or when it is detected that the input bandwidth exceeds the processing bandwidth threshold of the service chip, the heat dissipation method of directly discarding some packets at the interface of the service chip, this application reduces the number of The ratio of packet loss, the energy consumption utilization rate, and the bandwidth processing capability of the data chip are improved, and the maximum processing capacity of the chip is achieved in terms of the maximum power supply and heat dissipation capability of the single board. Processing specifications have also been improved to reduce processing requirements in one place (e.g. high bandwidth input to the cache module) when processing requirements are high in another (e.g. lower bandwidth to read data from the cache module) .
  • the above-mentioned electronic device includes corresponding hardware structures and/or software modules for executing each function.
  • the embodiments of the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.
  • the electronic device may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the embodiment of the present application discloses an electronic device 800 , and the electronic device 800 may be the data chip in the above-mentioned embodiment.
  • the electronic device 800 may include a processing module, a storage module, and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device 800, for example, may be used to support the electronic device 800 to perform the above steps 401 and 402.
  • the storage module may be used to support the electronic device 800 to store program codes, data, and the like.
  • the storage module includes the cache module 3022 and the cache control module 3021 in this application.
  • the communication module can be used to support the communication between the electronic device 800 and other devices, such as communication with external devices.
  • the communication module may include the chip interface 303 in this application.
  • the unit modules in the above electronic device 800 include but are not limited to the above processing module, storage module and communication module.
  • the electronic device 800 may further include a power module and the like.
  • the power module is used to supply power to the electronic device 800 .
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device such as a chip interface that interacts with other external devices.
  • the processing module may be the processor 801 (the processor 301 shown in FIG. 3 ), the storage module may be the memory 802 (the cache 302 shown in FIG. 3 ), and the communication module may be called the communication interface 803 (as shown in FIG. 3 ) shown chip interface 303).
  • the electronic device 800 provided in this embodiment of the present application may be the chip 300 shown in FIG. 3 .
  • the above-mentioned processors, memories, communication interfaces, etc. can be connected together, for example, connected by a bus.
  • Embodiments of the present application further provide an electronic device, including one or more processors and one or more memories.
  • the one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to execute
  • the above related method steps implement the method for limiting power consumption in the above embodiment.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer program codes are stored in the computer-readable storage medium.
  • the processor executes the computer program codes
  • the electronic device executes the method for limiting power consumption in the foregoing embodiments.
  • Embodiments of the present application also provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to implement the method for limiting power consumption performed by the electronic device in the above-mentioned embodiment.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved may refer to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本申请实施例提供一种限制功耗的方法和装置,涉及芯片技术领域。电子装置检测电子装置的功耗热点信息;确定功耗热点信息大于或等于第一预设阈值时,降低从缓存模块中读取数据的带宽。上述方法应用于数据中心的数据芯片中,这样,当数据芯片的功耗热点信息大于或等于第一预设阈值时,可以通过降低读取数据的带宽来降低数据芯片的功耗,提前预判数据芯片的供电和散热风险,主动平滑功耗,减少数据芯片的业务损失,缓解单板的供电和散热压力,从而提高用户的使用体验。

Description

一种限制功耗的方法和装置 技术领域
本申请实施例涉及芯片技术领域,尤其涉及一种限制功耗的方法和装置。
背景技术
随着芯片工艺的升级,芯片面积接近物理实现上限,给芯片供电和散热逐渐成为单板设计的瓶颈。随着服务器虚拟化技术的广泛部署,数据中心的计算密度以及流量日益增多,极大增加了数据中心的功耗以及耗电量。对于数据中心中的数据芯片,当数据芯片以最大处理带宽运行时,芯片的功耗可能会超过当前单板供电和散热的处理能力,从而导致芯片被损坏。
这是由于数据中心的业务需求量大,因而不按照数据芯片的峰值功耗设计供电和散热的话,当数据中心中的数据芯片功耗达到峰值时就会出现供电和散热能力不足的问题。对于传统的数据芯片,当检测到数据芯片温度升高时可提升风扇转速加快散热,满足数据芯片的散热需求。但是由于风扇本身也需要耗电,整个数据芯片不能继续将风扇规格做大、转速提高,因此通过风扇加快散热已经达到瓶颈,无法满足数据芯片高功耗的散热需求。此外,对于消费类芯片,例如中央处理器(Central Process ing Uni t,CPU),当检测到消费类芯片温度升高时通过降低消费类芯片的工作主频,满足散热需求,但此方法并不适用于数据芯片报文处理。这是由于CPU降低主频只会导致处理速度降低,但数据芯片降低主频会导致大量的报文不能写入缓存被丢弃,或者数据芯片内部逻辑配合错误导致报文输出错误,因此数据芯片在数据处理时不会采用降频以降低功耗的散热方案。
发明内容
本申请实施例提供一种限制功耗的方法和装置,能够提高数据芯片的能耗利用率以及带宽处理能力。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供了一种电子装置,该电子装置包括缓存,缓存包括缓存模块和缓存控制模块,缓存模块用于存储数据,其中:缓存控制模块,用于检测电子装置的功耗热点信息,功耗热点信息用于反映电子装置的功耗大小;缓存控制模块,还用于确定功耗热点信息大于或等于第一预设阈值时,降低从缓存模块中读取数据的带宽。示例性的,可以将从缓存模块中读取数据的带宽降低至第二预设阈值。
由此,在电子装置中,当电子装置的功耗热点信息大于或等于第一预设阈值时,缓存控制模块能够降低从缓存模块中读取数据的带宽降低,从而降低电子装置的功耗,保证电子装置的业务不受损。
在一种可能的设计中,缓存控制模块包括:功耗热点检测子模块,用于周期性检测电子装置的功耗热点信息,并向过热保护控制子模块发送功耗热点信息;过热保护控制子模块,用于确定功耗热点信息大于或等于第一预设阈值时,向数据调度子模块发送控制信息,控制信息用于指示数据调度子模块降低从缓存模块中读取数据的带宽; 数据调度子模块,用于根据控制信息降低从缓存模块中读取数据的带宽。
由此,通过在缓存控制模块中设置功耗热点检测子模块、过热保护控制子模块和数据调度子模块,能够在电子装置的功耗热点信息大于或等于第一预设阈值时,及时降低电子装置的读取数据的带宽,从而降低电子装置的功耗,提高能耗利用率以及数据芯片带宽的处理能力。
在一种可能的设计中,功耗热点信息包括缓存模块的读/写访问率,读/写访问率包括预设周期内,对缓存模块执行读访问的次数以及写访问的次数之和。通过对缓存模块的读/写访问率的检测,确定电子装置的功耗热点信息大于或等于第一预设阈值时,降低读取数据的带宽,从而降低电子装置的功耗。
在一种可能的设计中,功耗热点信息包括电子装置的数据处理翻转率,数据处理翻转率包括预设周期内,电子装置中用于数据处理的触发器的状态翻转次数。通过对电子装置的数据处理翻转率的检测,确定电子装置的功耗热点信息大于或等于第一预设阈值时,降低读取数据的带宽,从而降低通信装置的功耗。
在一种可能的设计中,功耗热点信息包括电子装置的温度信息,温度信息为电子装置的温度采样点的温度。通过对电子装置的温度的检测,确定电子装置的功耗热点信息大于或等于第一预设阈值时,降低读取数据的带宽,从而降低电子装置的功耗。
在一种可能的设计中,当功耗热点信息等于第一预设阈值时,电子装置的功耗小于电子装置的最大限制功耗。
在一种可能的设计中,缓存控制模块用于降低从缓存模块中读取数据的带宽包括:缓存控制模块用于经过多个带宽档位降低从缓存模块中读取数据的带宽。也就是说,缓存控制模块降低读取数据的带宽可以经过多个带宽档位依次平滑降低,直到降低到合适的读取数据的带宽值,例如经过多个带宽档位依次平滑降低至第二预设阈值。
第二方面,本申请实施例提供了一种限制功耗的方法,该方法应用于电子装置,该方法包括:检测电子装置的功耗热点信息,功耗热点信息用于反映电子装置的功耗大小;确定功耗热点信息大于或等于第一预设阈值时,降低从缓存模块中读取数据的带宽。示例性的,可以将从缓存模块中读取数据的带宽降低至第二预设阈值。第二方面所达到的有益效果可以参见第一方面中有益效果。
在一种可能的设计中,周期性检测电子装置的功耗热点信息,并向过热保护控制子模块发送功耗热点信息;确定功耗热点信息大于或等于第一预设阈值时,向数据调度子模块发送控制信息,控制信息用于指示数据调度子模块降低从缓存模块中读取数据的带宽;根据控制信息降低从缓存模块中读取数据的带宽。
在一种可能的设计中,功耗热点信息包括缓存模块的读/写访问率,读/写访问率包括预设周期内,对缓存模块执行读访问的次数以及写访问的次数之和。
在一种可能的设计中,功耗热点信息包括电子装置的数据处理翻转率,数据处理翻转率包括预设周期内,电子装置中用于数据处理的触发器的状态翻转次数。
在一种可能的设计中,功耗热点信息包括电子装置的温度信息,温度信息为电子装置的温度采样点的温度。
在一种可能的设计中,当功耗热点信息等于第一预设阈值时,电子装置的功耗小于电子装置的最大限制功耗。
在一种可能的设计中,降低从缓存模块中读取数据的带宽包括:经过多个带宽档位降低从缓存模块中读取数据的带宽。
上述其他方面对应的有益效果,可以参见关于方法方面的有益效果的描述,此处不予赘述。
附图说明
图1为一种单板的设计架构示意图;
图2为本申请实施例提供的一种限制功耗的方法的应用场景示意图;
图3为本申请实施例提供的一种电子装置的硬件结构示意图;
图4为本申请实施例提供的一种限制功耗的方法的流程示意图;
图5A为本申请实施例提供的一种限制功耗的方法的功耗和时间的关系示意图;
图5B为本申请实施例提供的一种限制功耗的方法的功耗和时间的关系示意图;
图6为本申请实施例提供的一种电子装置的硬件结构示意图;
图7为本申请实施例提供的一种限制功耗的方法的信号交互示意图;
图8为本申请实施例提供的一种电子装置的结构组成示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
目前,单板的设计架构如图1所示,包括业务芯片(例如数据芯片)、时钟芯片和风扇等。在业务芯片中存在温度检测单元,例如温度传感器(temperature sensor,Tsensor)温度检测,温度检测单元可以反馈业务芯片的温度值,当温度检测单元反馈的业务芯片的温度值升高时,该单板可以通过时钟芯片降低业务芯片的工作频率,或者提高风扇转速来达到给业务芯片散热的效果。当供电和散热成为单板设计瓶颈时,可以按照单板供电和散热的能力来约束业务芯片的处理能力,例如通过减少业务芯片的接口数量,以降低业务芯片的处理带宽来降低业务芯片的处理规格,或者当检测到输入带宽超过业务芯片处理带宽阈值时,直接在业务芯片的接口处丢弃部分报文,只传送带宽处理能力范围内的报文,即功耗承受能力范围内的报文。丢弃部分报文通常是基于报文输入队列的尾丢弃,例如丢弃业务芯片的媒体访问控制(Media Access Control,MAC)端口处报文输入队列尾部的部分报文,或者是基于报文优先级的尾丢弃,例如丢弃优先级较低的部分报文。
但是在实际业务中,业务芯片不会长时间出现输入带宽超过芯片处理带宽阈值这种极限处理能力的情况,例如,正常情况下,业务芯片传输的报文的平均包长大于300字节(Byte,B),只有短期会出现报文的平均包长小于300B的情况,而由于报文平 均包长越小,业务芯片对报文处理的翻转率越大,这时容易出现业务芯片的功耗过高超过功耗阈值的情况,可以采用丢弃超出芯片处理能力的报文的方案,但这会使用户对业务芯片所属的产品的使用体验降低。
因此,本申请提出一种限制功耗的方法,该方法可以应用于一种电子装置,本申请中的电子装置可以理解为业务芯片,例如数据芯片,该数据芯片可以为数据中心中的芯片,其功能可以是用于数据中心报文的交换。考虑到现有技术中数据芯片的功耗过高采用丢弃报文的方案带来的业务受损的问题,本申请可以应用于对数据芯片的功耗监控的场景中,通过监控数据芯片内部关键的功耗热点信息,以根据功耗热点信息预判数据芯片过热风险和单板散热风险,防止数据芯片的功耗过高。
对此,本申请提供的限制功耗的方法可以包括:通过检测用于反映数据芯片功耗的功耗热点信息,例如对数据芯片进行局部温度检测、缓存访问率检测以及数据翻转率检测中的至少一种检测,根据检测结果判断数据芯片的功耗是否有可能达到功耗限制值,如果检测结果反映出数据芯片当前的功耗过高可能达到功耗限制值,例如功耗热点信息达到了预设阈值时,可以对数据芯片的缓存中读取数据的带宽进行调整,以根据调整后的带宽读取缓存中的数据并输出。通过该方法,能够在数据芯片的功耗即将达到功耗限制之前,提前采取降低功耗的方案,可以避免现有技术中采用的丢包策略带来的业务受损的弊端,本申请可以提高用户体验。
如图2所示,本申请提供的限制功耗的方法可以应用于数据中心设备,例如数据中心设备可以应用于数据中心设备201与数据中心服务器202之间通信的场景,例如上网信息同步、数据备份搬移的场景。再例如,数据中心设备还可以应用于数据中心设备201与计算网络服务器203之间通信的场景,例如软件运算信令的场景。本申请中的数据中心设备可以为交换机,交换机包括本申请中的数据芯片。
在一种示例中,如图3所示,其示出了一种电子装置的硬件结构示意图,该电子装置可以为数据中心中的数据芯片,图3中以芯片300示例的数据芯片。芯片300可包括处理器301、缓存302以及芯片接口303等。
可以理解的是,本申请实施例示意的结构并不构成对芯片300的具体限定。在本申请另一些实施例中,芯片300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
其中,缓存302可以包括缓存控制模块3021和缓存模块3022。缓存模块3022可以用于存储数据,相当于数据芯片的数据存储单元,缓存控制模块3021可以用于对缓存模块3022执行读访问或写访问。以数据为报文为例,当通过数据芯片的输入MAC端口(芯片接口303)接收到报文,进行报文识别和输出MAC端口(芯片接口303)识别后,报文可被输出至数据芯片的缓存模块3022中,缓存控制模块3021可以从缓存模块3022请求将报文调度输出至处理器301继续处理,以便将处理后的报文从数据芯片的输出MAC端口输出。本申请实施例中,为了检测数据芯片的功耗热点信息,并根据功耗热点信息对缓存模块3022的数据读取带宽进行控制,本申请对缓存控制模块3021的功能进行改进,即缓存控制模块3021可以用于检测数据芯片的功耗热点信息,并根据功耗热点信息控制对缓存模块3022的数据读取的带宽。
处理器301可以包括一个或多个处理单元,处理单元用于对从缓存模块3022中读取的数据进行编辑和处理,例如数据理解为报文时,可以根据报文头信息进行报文识别、根据报文转发行为生成报文编辑命令、针对报文识别和报文编辑开发指令,例如查询三态内容寻址存储器(ternary content addressable memory,TCAM)、查询Hash表(哈希表)等。在一些实施例中,芯片300也可以包括一个或多个处理器301,包括数据芯片数据处理专用的处理器。
其中,处理器301可以理解为是芯片300的神经中枢和指挥中心。可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在数据芯片中,处理器301可以用于对从缓存模块3022中读取的数据进行编辑和处理。
芯片接口303可以包括一个或多个芯片接口,用于与芯片的外部装置进行通信,例如与数据中心设备中的服务器智能网卡、路由器接外网通信,或者与数据中心设备外的数据中心交换机通信。
应用上述本申请提供的数据芯片,下面结合附图对本申请针对数据芯片所提出的限制功耗的方法中,在电子装置,例如数据芯片的功耗热点信息达到预设阈值时,通过降低数据芯片中数据从缓存中读取的带宽来降低数据芯片功耗的过程进行介绍。
如图4所示,本申请实施例提供一种限制功耗的方法,该方法包括:
步骤401、电子装置检测电子装置的功耗热点信息。
其中,功耗热点信息用于反映电子装置的功耗大小。
可以理解,当电子装置为数据芯片时,用于反映数据芯片当前功耗的功耗热点信息可以有多种,例如,在一些实施例中,参考图3,功耗热点信息可以包括电子装置的缓存模块3022的读/写访问率。其中,缓存模块3022的读/写访问率可以包括预设周期内,对缓存模块3022执行读访问的次数以及写访问的次数之和,也即,数据芯片中的缓存控制模块3021对缓存模块3022在预设周期内执行读访问的次数以及写访问的次数之和。也就是说,当缓存控制模块3021访问缓存模块3022时,数据芯片会产生功耗。
在一些实施例中,功耗热点信息可以包括电子装置的数据处理翻转率。其中,数据处理翻转率可以包括预设周期内,电子装置中用于数据处理的触发器的状态翻转次数。其中,触发器可以理解为在时钟信号触发时才能动作的存储单元电路。例如触发器的状态值由“0”变为“1”可以理解为一次状态翻转,触发器的状态值由“1”变为“0”可以理解为一次状态翻转。触发器上一次的状态值为“1”,下一次的状态值也为“1”,可以理解为触发器的状态未发生翻转。
本申请实施例中,数据芯片处理的数据可以理解为报文。触发器的状态翻转可以用于数据芯片在报文处理中,进行报文的识别、报文的寄存、报文的编辑等处理时触发器的状态翻转。也就是说,当数据芯片在对报文进行识别、寄存和编辑等处理时,数据芯片会产生功耗。
在一些实施例中,功耗热点信息可以包括电子装置的温度信息。其中,温度信息可以理解为电子装置的温度采样点的温度。该温度采样点可以理解为数据芯片中能反映芯片功耗的采样点。这里检测温度的方式可以有多种,例如采用Tsensor温度检测。
可以理解,温度信息也可以是缓存控制模块3021周期性获取的,例如缓存控制模 块3021每单位时间检测一次温度采样点的温度。
当然,本申请的功耗热点信息不局限于读/写访问率、数据处理翻转率、以及温度信息等信息,还可以包括其他能反映功耗的信息,本申请不进行限定。
可以理解,在数据芯片中,产生功耗的操作包括报文输入、报文存储、报文输出以及报文处理(包括上述报文的识别、报文的寄存和报文的编辑)等操作,这些操作的功耗占据了数据芯片的大部分功耗。
步骤402、电子装置确定功耗热点信息大于或等于第一预设阈值时,降低从缓存模块3022中读取数据的带宽。
可以理解,缓存控制模块3021对缓存模块3022执行写操作时,相当于将数据写入缓存模块3022,写操作会产生功耗,当缓存控制模块3021对缓存模块3022执行读操作时,相当于将数据从缓存模块3022中读出,读操作也会产生功耗。本申请为了达到单板最大供电和散热能力上做到电子装置的最大处理能力,当电子装置确定功耗热点信息大于或等于第一预设阈值时,可以从流量上考虑平滑峰值流量,即缓存控制模块3021控制从缓存模块3022中读出数据的流量,或者说降低缓存控制模块3021从缓存模块3022中读出数据的带宽,也可以说降低缓存控制模块3021从缓存模块3022种读出数据的速率,这样一来,缓存模块3022的访问率降低,电子装置输出侧的功耗也相应地得到缓解。
在一些实施例中,可以通过降低单位时间内缓存模块3022的读/写访问率来降低电子装置的功耗。
在一些实施例中,以数据为报文为例,缓存控制模块3022可以降低从缓存模块3022读取报文的速率,以降低数据芯片输出侧报文输出的处理速率,使得数据芯片的功耗得到缓解。
示例性的,缓存控制模块3021存储有第一预设阈值,当缓存控制模块3021周期性的得到功耗热点信息时,可以将功耗热点信息与第一预设阈值进行比对,当功耗热点信息大于或等于第一预设阈值时,缓存控制模块3021可以降低从缓存模块3022中读取数据的带宽,例如可以将从缓存模块3022中读取数据的带宽降低至第二预设阈值。可以理解,第一预设阈值可以理解为是数据芯片的功耗热点信息的阈值,第二预设阈值是与第一预设阈值对应的用于缓存控制模块3021从缓存模块3022中读取数据的带宽值。
示例性的,当功耗热点信息为缓存模块3022的读/写访问率时,第一预设阈值可以理解为读/写访问率阈值。当功耗热点信息大于或等于读/写访问率阈值时,缓存控制模块3021降低从缓存模块3022中读取数据的带宽。
当功耗热点信息为电子装置的数据处理翻转率时,第一预设阈值可以理解为数据处理翻转率阈值。当功耗热点信息大于或等于数据处理翻转率阈值时,缓存控制模块3021降低从缓存模块3022中读取数据的带宽。
当功耗热点信息为电子装置的温度信息时,第一预设阈值可以理解为温度信息阈值。当功耗热点信息大于或等于温度信息阈值时,缓存控制模块3021降低从缓存模块3022中读取数据的带宽。
本申请实施例中,当功耗热点信息等于第一预设阈值时,电子装置的功耗小于电 子装置的最大限制功耗。或者说,第一预设阈值对应的功耗值小于数据芯片的最大限制功耗。当缓存控制模块3021控制从缓存模块3022中读取数据的带宽降低至第二预设阈值时,第二预设阈值为小于可从缓存模块3022中读取数据的最大带宽。可以理解为,一旦数据芯片功耗大于数据芯片所能够承受的最大限制功耗,单板就会出现对数据芯片供电和散热处理能力不足的问题。
将第一预设阈值设置为小于数据芯片的最大限制功耗的值,这么做的目的是能够在数据芯片功耗过高时提前降低数据芯片的读取数据带宽,使得数据芯片的功耗还未达到数据芯片的最大限制功耗时就采取降功耗的措施。即通过实时监控数据芯片内部关键的功耗热点信息,提前预判数据芯片功耗过高的场景,从而提前采取降低数据芯片功耗的方法,使得在数据芯片的使用过程中不会出现功耗大于最大限制功耗的场景,减少数据芯片业务受损的同时还能平滑峰值流量。
也可以理解为,功耗热点信息等于第一预设阈值时,数据芯片的功耗热点信息小于功耗热点信息阈值,即数据芯片当前的功耗小于数据芯片所能够承受的最大限制功耗,因此数据芯片的功耗在数据芯片所能承受的最大限制功耗范围内。
如图5A所示,为本申请数据芯片的功耗和时间的关系图。实际工作中的数据芯片的功耗随时间的关系为图5A中曲线1所示,可能出现数据芯片的功耗处于数据芯片的最大限制功耗,即图5A中功耗波峰A的情况,也会出现功耗很小,即图5A中功耗波谷B的情况。当数据芯片的输入带宽超过芯片处理带宽阈值时,现有技术中会出现图5A中t1到t2时间内数据芯片功耗超过最大限制功耗的场景,这种情况下,可能会造成单板对数据芯片的供电和散热能力不足,从而造成数据芯片损坏。通过本申请实施例提供的限制功耗的方法,缓存控制模块3021实时监控数据芯片的功耗热点信息,能够在t1时刻之前,例如图5A中C点处,当功耗热点信息大于或等于第一预设阈值时就判断出数据芯片存在功耗过高的风险,从而采取降低从缓存模块3022中读取数据的带宽的方法,使本应该在t1到t2时间内读取的部分数据延缓在t2时间之后读取。因此可以避免现有技术中出现的t1到t2时间内可能超出最大限制功耗的功耗,即t1到t2时间内横虚线之上的功耗,本申请可使得曲线1变为如图5B所示的曲线2,即数据芯片的功耗可以平滑到功耗波谷B处,从而限制了数据芯片的功耗大小,保证数据芯片的功耗不会超过最大限制功耗,缓解了数据芯片散热和供电问题。
需要说明的是,上述实施例中,是以功耗热点信息为缓存模块3022的读/写访问率、或电子装置的数据处理翻转率,或电子装置的温度信息中的一种为例进行说明的。可以理解,本申请的功耗热点信息还可以包括缓存模块3022的读/写访问率、电子装置的数据处理翻转率以及电子装置的温度信息中的至少两种,结合这至少两种功耗热点信息综合判断功耗热点信息是否大于或等于相应的预设阈值。
例如,结合这三种功耗热点信息综合判断功耗热点信息是否大于或等于相应的预设阈值,其中,缓存控制模块3021中存储有3种预设阈值:与读/写访问率对应的预设阈值、与数据处理翻转率对应的预设阈值和与温度信息对应的预设阈值。当缓存控制模块3021确定读/写访问率大于读/写访问率的阈值,且数据处理翻转率大于数据处理翻转率的阈值,以及温度信息大于温度信息的阈值时,缓存控制模块3021降低从缓存模块3022中读取数据的带宽。
还例如,结合这三种功耗热点信息综合判断功耗热点信息是否大于或等于相应的预设阈值的实现方式可以为,判断缓存模块3022的读/写访问率、电子装置的数据处理翻转率以及电子装置的温度信息中的至少一种功耗热点信息是否大于或等于其对应的预设阈值。
再例如,结合这三种功耗热点信息综合判断功耗热点信息是否大于或等于相应的预设阈值的实现方式可以为,可以对读/写访问率、数据处理翻转率以及温度信息进行权重计算后得到一个综合值,并将该综合值与第一预设阈值进行比较,确定该综合值是否大于或等于第一预设阈值。这种情况下,第一预设阈值可以理解为一个权重值阈值。
在一些实施例中,缓存控制模块3021在降低从缓存模块3022中读取数据的带宽时,可以经过多个带宽档位降低从缓存模块3022中读取数据的带宽。也可以理解为,缓存控制模块3021中存储有多个带宽档位,每个带宽档位可以理解为一个带宽值。例如当缓存控制模块3021控制从缓存模块3022中读取数据的带宽降低至第二预设阈值时,第二预设阈值是多个带宽值中的最低带宽值。
设置带宽档位是考虑到数据芯片的功耗热点信息可能只是略微大于第一预设阈值,在这种情况下,读取数据的带宽只需要降低一个较小的值即可以使功耗热点信息小于第一预设阈值,从而使数据芯片的功耗不至于达到数据芯片所能够承受的最大限制功耗,便不需要再继续降低读取数据的带宽,避免一次性将读取数据的带宽降低过多,导致数据芯片处理数据的时间过长。此外,设置带宽档位还可以平滑数据芯片的功耗,使数据芯片的功耗波峰与功耗波谷的功耗的差值不至于过大,从流量角度上考虑,也是为了平滑输出流量值。结合上述步骤401与步骤402,本申请能够通过监控数据芯片的功耗热点信息,提前判断数据芯片可能出现的供电和散热风险,从而主动平滑峰值流量,缓解单板供电与散热能力不足的问题,在单板最大供电和散热能力上做到芯片最大处理能力。
示例性的,缓存控制模块3021存储有5个带宽档位,分别为0档、1档、2档、3档、4档,0档表示不读取数据,即读取数据的带宽为0,1档表示读取数据的带宽为读取数据的带宽阈值的1/4。档位越高,读取数据的带宽值越大,4档表示功耗热点信息小于第一预设阈值时,缓存控制模块3021从缓存模块3022中正常读取数据的带宽阈值。即默认读取数据的带宽为4档,在功耗热点信息小于第一预设阈值时,缓存控制模块3021从缓存模块3022中读取数据的带宽保持在4档。
当缓存控制模块3021确定功耗热点信息大于或等于第一预设阈值时,缓存控制模块3021经过多个带宽档位降低从缓存模块3022中读取数据的带宽。例如,当缓存控制模块3021确定功耗热点信息大于或等于第一预设阈值时,缓存控制模块3021控制从缓存模块3022中读取数据的带宽降低至第二预设阈值时,可以控制读取数据的带宽从4档降至3档再降到2档的带宽值,在此例子中,第二预设阈值可以理解为2档的带宽值。
由此,本申请实施例提供的一种限制功耗的方法,可以应用于通电子装置,例如数据芯片当中。通过缓存控制模块3021检测电子装置的功耗热点信息,当功耗热点信息大于或等于第一预设阈值时,预示着可能存在功耗过高从而大于最大限制功耗的风 险,可以降低从缓存模块3022中读取数据的带宽,当读取数据的带宽降低时,相应地,缓存模块3022的访问率降低,数据芯片的数据处理翻转率也会降低,可使得整个数据芯片的输出带宽不会过大,功耗也不会过大,从而避免数据芯片在峰值业务时散热能力到达瓶颈无法继续散热的问题。而且,虽然本申请读取缓存模块3022的带宽降低,数据输出的速率降低,但是本申请并未在功耗过高时丢弃数据,数据芯片接收到的数据依然按照输入带宽缓存在缓存模块3022中,只是输出带宽降低,在短时间内不会出现数据丢失的现象(例如在缓存模块3022能够容忍存储报文容量的时间内不丢弃报文,超过此存储报文容量的时间可能会出现丢弃报文的现象),因此相对于现有技术通过丢包或降频降低数据芯片功耗的方式,本申请减少了丢包比例、提高了能耗利用率,提升了数据芯片带宽处理能力,也实现了在单板最大供电和散热能力上达到芯片最大处理能力,同时缓解了数据芯片散热和供电问题。
与上述图4提供的限制功耗的方法对应,在图3所示的电子装置的结构基础上,如图6所示,本申请提供一种电子装置的硬件结构示意图,该电子装置可以是数据中心中的数据芯片,图6中以芯片600示例的数据芯片。该芯片600包括处理器601、缓存602、芯片接口603。其中,缓存602包括缓存控制模块6021和缓存模块6022,缓存控制模块6021与上文中的缓存控制模块3021的实现方式类似,缓存模块6022与上文中的缓存控制模块3022的实现方式类似。
在一些实施例中,缓存控制模块6021包括功耗热点检测子模块、过热保护控制子模块和数据调度子模块。其中,功耗热点检测子模块用于周期性检测电子装置的功耗热点信息,并向过热保护控制子模块发送功耗热点信息。功耗热点检测子模块可以包括数据翻转率检测单元、读/写访问率检测单元和局部温度检测单元中的至少一种。过热保护控制子模块用于确定从功耗热点检测子模块接收到的功耗热点信息大于或等于第一预设阈值时,向数据调度子模块发送控制信息,控制信息用于指示数据调度子模块降低从缓存模块中读取数据的带宽。数据调度子模块用于根据控制信息降低从缓存模块6022中读取数据的带宽。
基于此,芯片600的工作流程可以包括:芯片600外部的数据可以通过芯片接口603输入并存入缓存模块6022,处理器601可以用于通过缓存控制模块6021从缓存模块6022中读取数据并进行处理。例如,当数据理解为报文时,处理器601要读取缓存模块6022中的报文时,可以通过缓存控制模块6021从缓存模块6022中读取报文,处理器601再对读取的报文执行报文的识别和编辑等,并将编辑后的报文通过芯片接口603发送给与芯片600连接的其他硬件结构。当缓存控制模块6021在从缓存模块6022中读取报文时,缓存控制模块6021中的过热保护控制子模块可以根据数据翻转率检测单元、读/写访问率检测单元和局部温度检测单元的检测结果的至少一种确定缓存控制模块6021从缓存模块6022中读取报文的带宽,以控制数据芯片600的功耗。
应用图4提供的限制功耗的方法,在一些实施例中,数据翻转率检测单元可以用于检测数据芯片的数据翻转率,并将检测得到的数据翻转率的值发送给过热保护控制子模块。读/写访问率检测单元可以用于检测缓存模块6022的读/写访问率,并将检测得到的读/写访问率的值发送给过热保护控制子模块。局部温度检测单元可以用于检测电子装置的温度信息,并将检测得到的温度信息的值发送给过热保护控制子模块。
假设功耗热点检测子模块是结合数据翻转率检测单元、读/写访问率检测单元和局部温度检测单元执行功耗检测的,如图7所示,为本申请数据芯片内的缓存控制模块6021中的信号交互图。由功耗热点检测子模块中的局部温度检测单元、读/写访问率检测单元以及数据翻转率检测单元将各自检测的芯片的功耗热点信息发送给过热保护控制子模块。过热保护控制子模块将功耗热点信息与第一预设阈值进行比较,判断当前读取数据的带宽是否需要调整,若确定需要调整,过热保护控制子模块可以发送控制信息给数据调度子模块,控制信息用于指示数据调度子模块降低从缓存模块中读取数据的带宽。数据调度子模块根据控制信息降低从缓存模块6022中读取数据的带宽。示例性的,当降低从缓存模块中读取数据的带宽至第二预设阈值时,过热保护控制子模块可以将带宽的第二预设阈值封装在发送控制信息中发送给数据调度子模块,数据调度子模块根据控制信息中携带第二预设阈值控制从缓存模块6022中读取数据的带宽降低至第二预设阈值。
可以理解,读/写访问率检测单元可以向过热保护控制子模块发送的读/写访问率的值,也可以发送的是读/写访问率的值对应的指示信息。类似的,数据翻转率检测单元可以向过热保护控制子模块发送的是数据翻转率的值,也可以发送的是数据翻转率的值对应的指示信息。局部温度检测单元可以向过热保护控制子模块发送的是温度信息的值,也可以发送的是温度信息的值对应的指示信息。其中,指示信息为读取数据的带宽的档位标识。
示例性的,本申请的读/写访问率检测单元以及数据翻转率检测单元可以是以数字电路实现的,即可以在缓存控制模块6021中增加用以检测电子装置的读/写访问率以及数据翻转率的数字电路。局部温度检测单元可以是以模拟电路或模拟知识产权(intellectual property,IP)实现的,即在缓存控制模块6021中嵌入一个或多个模拟IP用以实现电子装置的温度检测。
需要说明的是,上述数字电路以及模拟IP可以位于缓存控制模块6021中,也可以位于缓存模块6022与缓存控制模块6021之间的电路中。
示例性的,结合上文中提到的使用多个带宽档位降低读取数据的带宽的阐述,当过热保护控制子模块确定功耗热点信息大于或等于第一预设阈值时,确定将读取数据的带宽降低至3档,例如确定与第一预设阈值对应的第二预设阈值的档位为3档,则过热保护控制子模块向数据调度子模块发送的控制信息包括3档标识。
假设过热保护控制子模块接收到读/写访问率时,过热保护控制子模块可以根据读/写访问率单独判断电子装置当前的功耗情况,当判断结果为读/写访问率的值大于或等于读/写访问率对应的预设阈值时,过热保护控制子模块可以向数据调度子模块发送控制信息,控制信息用于指示数据调度子模块降低从缓存模块中读取数据的带宽,例如用于指示数据调度子模块将读取数据的带宽降低到第二预设阈值。类似的,过热保护控制子模块还可以根据数据处理翻转率或温度信息单独判断电子装置当前的功耗情况。
在一些实施例中,当过热保护控制子模块接收到读/写访问率、数据处理翻转率以及温度信息时,过热保护控制子模块可以根据读/写访问率、数据处理翻转率以及温度信息综合判断电子装置当前的功耗情况。具体的判断方式可以参见上述步骤402中的 说明。
数据调度子模块,用于当接收到控制信息时,降低从缓存模块6022中读取数据的带宽。
在一些实施例中,数据调度子模块降低从缓存模块6022中读取数据的带宽时,可以经过多个带宽档位降低读取数据的带宽。具体实现方式可以参见上述步骤402中的说明。
在一些实施例中,当数据中心中的数据芯片处于功耗接近最大限制功耗的场景时,过热保护控制子模块确定向数据调度子模块发送的控制信息可以包括0档标识。其中,0档表示不读取数据,相当于控制数据调度子模块置起反压。当数据芯片的功耗有所下降时,即过热保护控制子模块当前接收到的功耗热点信息小于第一预设阈值时过热保护控制子模块可以根据当前的功耗热点信息确定不再发送带宽档位给数据调度子模块,相当于控制数据调度子模块撤销反压。
示例性的,当数据芯片在四DIE(4个裸片)场景下达到了1500W散热瓶颈,即数据芯片实现大Buffer(缓存)的缓存读/写访问率时,大Buffer的缓存读/写访问率可以理解为本申请中的缓存模块6022此时的读/写访问率达到第一预设阈值时,过热保护控制子模块可以根据软件配置周期内的读/写访问率,即第一预设阈值判断缓存模块3022的读/写访问率此时超过第一预设阈值,则过热保护控制子模块向数据调度子模块在该周期发送置起反压的反压信息(相当于上文中的控制信息),从而降低缓存模块3022的读访问率,或者说降低读取数据的带宽,确保数据芯片的功耗在1500W以内。以数据为报文为例,本申请可以最大程度上保证报文业务不受损。即,在数据芯片功耗突升时通过数据调度子模块间隔反压,短时间内反压不影响缓存模块3022的写能力,数据芯片实现了大Buffer,只是输出带宽降低,或者说输出报文的速率降低,进而保证了输入输出的报文业务不受损,实现了在单板最大供电和散热能力上做到芯片最大处理能力。
由此,本申请实施例提供的电子装置,例如数据芯片,可以通过功耗热点检测子模块检测电子装置的功耗热点信息,将检测到的功耗热点信息发给过热保护控制子模块,由过热保护控制子模块判断功耗热点信息与第一预设阈值的大小关系,当功耗热点信息大于或等于第一预设阈值时,过热保护控制子模块发送控制信息给数据调度子模块,其中控制信息用于指示数据调度子模块降低从缓存模块中读取数据的带宽,数据调度子模块根据控制信息降低从缓存模块6022中读取数据的带宽,从而降低数据芯片功耗。由于数据芯片接收到的数据按照正常的输入带宽缓存在缓存模块6022中,指示输出带宽降低,在短时间内不会出现数据丢失的现象,因此相对于现有技术中采用的减少业务芯片的接口数量,以降低业务芯片的处理带宽来降低业务芯片的处理规格,或者当检测到输入带宽超过业务芯片处理带宽阈值时,直接在业务芯片的接口处丢弃部分报文的散热方式,本申请减少了丢包比例、提高了能耗利用率、提升了数据芯片带宽处理能力,也实现了在单板最大供电和散热能力上达到芯片最大处理能力,同时缓解了数据芯片散热和供电问题,数据芯片的处理规格也得到了提升,能够在某一处的处理需求很高(例如向缓存模块输入数据的带宽较高)时降低另一处的处理需求(例如降低从缓存模块中读取数据的带宽)。
可以理解的是,上述电子装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用集成的单元的情况下,如图8所示,本申请实施例公开了一种电子装置800,该电子装置800可以为上述实施例中数据芯片。电子装置800可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子装置800的动作进行控制管理,例如,可以用于支持电子装置800执行上述步骤401和步骤402。存储模块可以用于支持电子装置800存储程序代码和数据等。例如存储模块包括本申请中的缓存模块3022和缓存控制模块3021。通信模块,可以用于支持电子装置800与其他设备的通信,例如与外部设备的通信。该通信模块可以包括本申请中的芯片接口303。
当然,上述电子装置800中的单元模块包括但不限于上述处理模块、存储模块和通信模块。例如,电子装置800中还可以包括电源模块等。电源模块用于对电子装置800供电。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为芯片接口等与其他外部设备交互的设备。
例如,处理模块为处理器801(如图3所示的处理器301),存储模块可以为存储器802(如图3所示的缓存302),通信模块可以称为通信接口803(如图3所示的芯片接口303)。本申请实施例所提供的电子装置800可以为图3所示的芯片300。其中,上述处理器、存储器、通信接口等可以连接在一起,例如通过总线连接。
本申请实施例还提供一种电子装置,包括一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子装置执行上述相关方法步骤实现上述实施例中的限制功耗的方法。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序代码,当处理器执行该计算机程序代码时,电子装置执行上述实施例中限制功耗的方法。
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中电子装置执行的限制功 耗的方法。
其中,本实施例提供的电子装置、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (16)

  1. 一种电子装置,其特征在于,所述电子装置包括缓存,所述缓存包括缓存模块和缓存控制模块,所述缓存模块用于存储数据,其中:
    所述缓存控制模块,用于检测所述电子装置的功耗热点信息,所述功耗热点信息用于反映所述电子装置的功耗大小;
    所述缓存控制模块,还用于确定所述功耗热点信息大于或等于第一预设阈值时,降低从所述缓存模块中读取数据的带宽。
  2. 根据权利要求1所述的电子装置,其特征在于,所述缓存控制模块包括:
    功耗热点检测子模块,用于周期性检测所述电子装置的功耗热点信息,并向过热保护控制子模块发送所述功耗热点信息;
    所述过热保护控制子模块,用于确定所述功耗热点信息大于或等于所述第一预设阈值时,向数据调度子模块发送控制信息,所述控制信息用于指示所述数据调度子模块降低从所述缓存模块中读取数据的带宽;
    所述数据调度子模块,用于根据所述控制信息降低从所述缓存模块中读取数据的带宽。
  3. 根据权利要求1或2所述的电子装置,其特征在于,所述功耗热点信息包括所述缓存模块的读/写访问率,所述读/写访问率包括预设周期内,对所述缓存模块执行读访问的次数以及写访问的次数之和。
  4. 根据权利要求1或2所述的电子装置,其特征在于,所述功耗热点信息包括所述电子装置的数据处理翻转率,所述数据处理翻转率包括预设周期内,所述电子装置中用于数据处理的触发器的状态翻转次数。
  5. 根据权利要求1或2所述的电子装置,其特征在于,所述功耗热点信息包括所述电子装置的温度信息,所述温度信息为所述电子装置的温度采样点的温度。
  6. 根据权利要求1-5任一项所述的电子装置,其特征在于,当所述功耗热点信息等于所述第一预设阈值时,所述电子装置的功耗小于所述电子装置的最大限制功耗。
  7. 根据权利要求1-6任一项所述的电子装置,其特征在于,所述缓存控制模块用于降低从所述缓存模块中读取数据的带宽包括:
    所述缓存控制模块用于经过多个带宽档位降低从所述缓存模块中读取数据的带宽。
  8. 一种限制功耗的方法,所述方法用于电子装置,其特征在于,所述方法包括:
    检测所述电子装置的功耗热点信息,所述功耗热点信息用于反映所述电子装置的功耗大小;
    确定所述功耗热点信息大于或等于第一预设阈值时,降低从所述缓存模块中读取数据的带宽。
  9. 根据权利要求8所述的方法,其特征在于,
    周期性检测所述电子装置的功耗热点信息,并向过热保护控制子模块发送所述功耗热点信息;
    确定所述功耗热点信息大于或等于所述第一预设阈值时,向数据调度子模块发送控制信息,所述控制信息用于指示所述数据调度子模块降低从所述缓存模块中读取数据的带宽;
    根据所述控制信息降低从所述缓存模块中读取数据的带宽。
  10. 根据权利要求8或9所述的方法,其特征在于,
    所述功耗热点信息包括所述缓存模块的读/写访问率,所述读/写访问率包括预设周期内,对所述缓存模块执行读访问的次数以及写访问的次数之和。
  11. 根据权利要求8或9所述的方法,其特征在于,所述功耗热点信息包括所述电子装置的数据处理翻转率,所述数据处理翻转率包括预设周期内,所述电子装置中用于数据处理的触发器的状态翻转次数。
  12. 根据权利要求8或9所述的方法,其特征在于,所述功耗热点信息包括所述电子装置的温度信息,所述温度信息为所述电子装置的温度采样点的温度。
  13. 根据权利要求8-12任一项所述的方法,其特征在于,当所述功耗热点信息等于所述第一预设阈值时,所述电子装置的功耗小于所述电子装置的最大限制功耗。
  14. 根据权利要求8-13任一项所述的方法,其特征在于,所述降低从所述缓存模块中读取数据的带宽包括:
    经过多个带宽档位降低从所述缓存模块中读取数据的带宽。
  15. 一种计算机可读存储介质,其特征在于,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述权利要求8-14中的任一项所述的方法。
  16. 一种计算机程序产品,其特征在于,当计算机程序产品在计算机上运行时,使得电子设备执行上述权利要求8-14中的任一项所述的方法。
PCT/CN2021/091171 2021-04-29 2021-04-29 一种限制功耗的方法和装置 WO2022226936A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/091171 WO2022226936A1 (zh) 2021-04-29 2021-04-29 一种限制功耗的方法和装置
CN202180087714.9A CN116670622A (zh) 2021-04-29 2021-04-29 一种限制功耗的方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/091171 WO2022226936A1 (zh) 2021-04-29 2021-04-29 一种限制功耗的方法和装置

Publications (1)

Publication Number Publication Date
WO2022226936A1 true WO2022226936A1 (zh) 2022-11-03

Family

ID=83846605

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091171 WO2022226936A1 (zh) 2021-04-29 2021-04-29 一种限制功耗的方法和装置

Country Status (2)

Country Link
CN (1) CN116670622A (zh)
WO (1) WO2022226936A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116225200A (zh) * 2023-02-02 2023-06-06 海光信息技术股份有限公司 芯片及其功耗管理方法、电子装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957654A (zh) * 2010-09-10 2011-01-26 浪潮电子信息产业股份有限公司 一种降低系统能耗的方法
US20150277531A1 (en) * 2014-03-31 2015-10-01 Fujitsu Limited Apparatus and method for controlling power consumption of devices performing communications between a processor and i/o devices
US20170075611A1 (en) * 2015-09-11 2017-03-16 Samsung Electronics Co., Ltd. METHOD AND APPARATUS OF DYNAMIC PARALLELISM FOR CONTROLLING POWER CONSUMPTION OF SSDs
CN110245366A (zh) * 2018-03-08 2019-09-17 华为技术有限公司 动态功耗估计方法、装置及系统
CN110704274A (zh) * 2019-09-06 2020-01-17 苏州浪潮智能科技有限公司 一种固态硬盘的温度控制方法、装置及设备
CN112672405A (zh) * 2020-12-15 2021-04-16 Oppo广东移动通信有限公司 功耗计算方法、装置、存储介质、电子设备以及服务器

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957654A (zh) * 2010-09-10 2011-01-26 浪潮电子信息产业股份有限公司 一种降低系统能耗的方法
US20150277531A1 (en) * 2014-03-31 2015-10-01 Fujitsu Limited Apparatus and method for controlling power consumption of devices performing communications between a processor and i/o devices
US20170075611A1 (en) * 2015-09-11 2017-03-16 Samsung Electronics Co., Ltd. METHOD AND APPARATUS OF DYNAMIC PARALLELISM FOR CONTROLLING POWER CONSUMPTION OF SSDs
CN110245366A (zh) * 2018-03-08 2019-09-17 华为技术有限公司 动态功耗估计方法、装置及系统
CN110704274A (zh) * 2019-09-06 2020-01-17 苏州浪潮智能科技有限公司 一种固态硬盘的温度控制方法、装置及设备
CN112672405A (zh) * 2020-12-15 2021-04-16 Oppo广东移动通信有限公司 功耗计算方法、装置、存储介质、电子设备以及服务器

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116225200A (zh) * 2023-02-02 2023-06-06 海光信息技术股份有限公司 芯片及其功耗管理方法、电子装置

Also Published As

Publication number Publication date
CN116670622A (zh) 2023-08-29

Similar Documents

Publication Publication Date Title
US9800513B2 (en) Mapped FIFO buffering
US7430211B2 (en) System and method for receive queue provisioning
US10291542B2 (en) Generating, at least in part, and/or receiving, at least in part, at least one request
US20230164078A1 (en) Congestion Control Method and Apparatus
WO2019169556A1 (zh) 一种报文发送的方法、装置和存储设备
US20190391940A1 (en) Technologies for interrupt disassociated queuing for multi-queue i/o devices
WO2022089175A1 (zh) 网络拥塞控制方法及装置
WO2022226936A1 (zh) 一种限制功耗的方法和装置
US11372586B2 (en) System and method for regulating NVMe-oF command requests and data flow across a network with mismatched rates
WO2013078799A1 (zh) 控制通信接口传输速率的方法和网络设备
US20210174883A1 (en) Power Shaping And Peak Power Reduction By Data Transfer Throttling
US20240089214A1 (en) Data processing method and related device
US20150103641A1 (en) Load sharing method and apparatus, and board
EP3588310A1 (en) Technologies for demoting cache lines to shared cache
CN112433596B (zh) 链路宽度调节方法、装置、设备和存储介质
WO2021143139A1 (zh) 一种提高交换机性能的方法、系统、设备及介质
CN114020677B (zh) 一种stp连接管理方法和装置
CN115118668A (zh) 流控制技术
CN104052683A (zh) 处理分组交换的网络处理器及方法、网络交换系统
US9083617B2 (en) Reducing latency of at least one stream that is associated with at least one bandwidth reservation
WO2012109932A1 (zh) 带宽调整方法、发送芯片及系统
US11277357B2 (en) Multi-port queue group system
US20200412563A1 (en) Technologies for sharing packet replication resources in a switching system
US20220166721A1 (en) Traffic balancing method, network device, and electronic device
US8634291B2 (en) Energy efficient management of datalinks

Legal Events

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

Ref document number: 21938415

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180087714.9

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21938415

Country of ref document: EP

Kind code of ref document: A1