A method, device and storage medium for controlling entry into PCI Express ASPM energy-saving state

By dynamically adjusting the time threshold of the state timer in PCI Express technology and adaptively adjusting based on historical or predicted data, the problem that fixed timers cannot adapt to different application scenarios is solved, and the optimal balance of performance and energy consumption is achieved.

CN113721756BActive Publication Date: 2025-03-11RONG MING MICROELECTRONICS (JINAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110986177.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-26
Publication Date
2025-03-11
Estimated Expiration
2041-08-26

AI Technical Summary

Technical Problem

In the prior art, fixed state timers cannot adapt to different application scenarios, resulting in the inability to optimize performance and energy consumption at the same time, which can easily lead to performance reduction or poor energy saving effect.

Method used

By setting the status timer time threshold and adjusting it based on the historical data or prediction data of the PCI Express link, the threshold is dynamically adjusted to adapt to different application scenarios and realize adaptive energy-saving state switching.

Benefits of technology

By dynamically adjusting the threshold, it can adapt dynamically in different application scenarios, eliminating the dependence on specific application scenarios, and achieving an optimized balance of performance and energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113721756B_ABST
    Figure CN113721756B_ABST
Patent Text Reader

Abstract

The present invention proposes a method, device and storage medium for controlling entry into a PCI Express ASPM energy-saving state. The method for controlling entry into a PCI Express ASPM energy-saving state includes: S100, setting a state timer time threshold; S200, adjusting the time threshold based on historical data or predicted data of a PCI Express link to obtain an adaptive threshold; S300, triggering the PCI Express link to enter a PCI Express ASPM energy-saving state when the PCI Express link exceeds the adaptive threshold and does not receive data. The present invention uses a dynamic state timer instead of a static timer to solve the problem of application scenario dependency. Since the static idle timer is optimized based on certain predetermined application scenarios, the static idle timer depends on a specific optimized application scenario and cannot be applied to a wide range of application scenarios. The dynamic idle timer proposed in the present invention will change its threshold according to different application scenarios, thereby dynamically adapting to the user's application scenario and eliminating the dependency on specific applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of PCI Express technology, and in particular to a method, device and computer storage medium for controlling entry into a PCI Express ASPM energy-saving state. Background Art

[0002] ASPM is an energy-saving feature of PCI Express that allows devices to request that the PCI-E link channel enter a low-power state (L0s or L1). The criteria for deciding to enter L0s or L1 depend on various specific implementations. The usual method (mentioned in the PCIExpress 4.0 specification) is to use a static idle timer. When a PCI Express device detects that the link is idle (no traffic) for more than the threshold specified in its idle timer (L0s and L1 can have separate timers), it will request to enter L0s or L1 to achieve energy saving. But when the device (or its link partner) needs to send data, it will wake up the link from L0s or L1 back to L0.

[0003] The above technical means have the following defects:

[0004] As mentioned above, the disadvantage of fixed state timers is that their triggering mechanism is static. This mechanism will not adapt to specific application scenarios, so it is not possible to optimize for both performance and energy consumption at the same time (only one of the two can be optimized). If the idle timer threshold is set too low and the link has intermittent communication, it will result in frequent requests to enter low-power states and often immediate wake-ups, resulting in reduced performance. The performance degradation is caused by the inherent exit (or wake-up) delay of the link from L0s (or L1) to L0. If the timer threshold is set too high, the energy saving effect will be poor because fewer requests will be made to enter low-power states. Summary of the invention

[0005] The technical problem to be solved by the present invention is how to adaptively adjust to enter the PCI Express ASPM energy-saving state. The present invention proposes a method, device and storage medium for controlling entering the PCI Express ASPM energy-saving state.

[0006] A method for controlling entry into a PCI Express ASPM energy-saving state according to an embodiment of the present invention includes:

[0007] Set the status timer time threshold;

[0008] Based on historical data or predicted data of the PCI Express link, the time threshold is adjusted to obtain an adaptive threshold;

[0009] When the PCI Express link exceeds the adaptive threshold and does not receive data, the PCI Express link is triggered to enter the PCI Express ASPM energy-saving state.

[0010] According to some embodiments of the present invention, adjusting the time threshold based on historical data of the PCI Express link to obtain an adaptive threshold includes:

[0011] Obtaining the PCI Express link historical data information;

[0012] Extracting data features from the historical data information;

[0013] Inputting the data features into a pre-trained prediction model for prediction calculation;

[0014] A predicted value is output, and the adaptive threshold is obtained based on the predicted value.

[0015] In some embodiments of the present invention, the extracted data features include: the number of data packets, the average time interval between adjacent data packets, the median time interval between adjacent data packets, the 75% quantile of the time interval between adjacent data packets, and the 25% quantile of the time interval between adjacent data packets.

[0016] According to some embodiments of the present invention, when the PCI Express link data stream is periodic, the extracted data features further include: feature extraction time.

[0017] In some embodiments of the present invention, the prediction model adopts a regression model or a classification model.

[0018] According to some embodiments of the present invention, the adjusting the time threshold based on the prediction data of the PCI Express link to obtain an adaptive threshold includes:

[0019] Set balancing parameters and adjustment step size;

[0020] Calculate the balance index based on the time interval of the previous cycle before entering the PCI Express ASPM energy-saving state and the balance parameter;

[0021] According to the calculation result of the balance index, the time threshold is increased or decreased by the adjustment step to obtain the adaptive threshold.

[0022] In some embodiments of the present invention, the method for calculating the balance index includes:

[0023] P = P + (TE-TS) - K;

[0024] Wherein, P is a balance index, K is a balance parameter, and (TE-TS) is a time interval before entering the PCI Express ASPM energy-saving state.

[0025] According to some embodiments of the present invention, the step of increasing or decreasing the time threshold by the adjustment step according to the calculation result of the balance indicator to obtain the adaptive threshold includes:

[0026] Set the adjustment steps D and I, and set the current time threshold to F;

[0027] When P>0, the adaptive threshold is adjusted to F=F+I; when P<0, the adaptive threshold is adjusted to: F=FD.

[0028] According to an embodiment of the present invention, a device for controlling entry into a PCI Express ASPM energy-saving state includes:

[0029] A threshold setting module, used to set a time threshold of a state timer;

[0030] A threshold adjustment module, used to adjust the time threshold based on historical data or predicted data of the PCI Express link to obtain an adaptive threshold;

[0031] The trigger module is used for triggering the PCI Express to enter the PCI Express ASPM energy-saving state when the PCI Express link exceeds the adaptive threshold and does not receive data.

[0032] According to the computer storage medium of the embodiment of the present invention, a computer program is stored on the computer storage medium, and when the computer program is executed by a processor, the steps of the method for entering the PCI Express ASPM energy-saving state as described above are implemented.

[0033] The method, device and storage medium for controlling entry into the PCI Express ASPM energy-saving state proposed in the present invention have the following beneficial effects:

[0034] The present invention uses a dynamic state timer instead of a static timer to solve the problem of application scenario dependency. Since the static idle timer is optimized based on certain predetermined application scenarios, the static idle timer depends on a specific optimized application scenario and cannot be applied to a wide range of application scenarios. The dynamic idle timer proposed in the present invention will change its threshold according to different application scenarios, thereby dynamically adapting to the user's application scenario and eliminating the dependency on specific applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A flow chart of a method for controlling entry into a PCI Express ASPM energy-saving state according to an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of a device for controlling entry into a PCI Express ASPM energy-saving state according to an embodiment of the present invention;

[0037] Figure 3 Schematic diagram of a method for controlling entry into a PCI Express ASPM energy-saving state according to an embodiment of the present invention.

[0038] Reference numerals:

[0039] The device 100,

[0040] A threshold setting module 10 , a threshold adjustment module 20 , and a triggering module 30 . DETAILED DESCRIPTION

[0041] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose, the present invention is described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0042] The description of the method flow in the specification of the present invention and the steps of the flowchart in the drawings of the specification of the present invention do not have to be strictly executed according to the step numbers, and the method steps can be executed in a different order. Moreover, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0043] like Figure 1 As shown, the method for controlling entry into the PCI Express ASPM energy-saving state according to an embodiment of the present invention includes:

[0044] S100, setting a time threshold of a status timer;

[0045] It should be noted that there is no specific limit to the size of the time threshold. For example, a time threshold can be preset according to actual application requirements.

[0046] S200, adjusting the time threshold based on historical data or predicted data of the PCI Express link to obtain an adaptive threshold;

[0047] That is, in the present invention, after the time threshold is set, the time threshold is not static and unchangeable, but can be adjusted according to the historical data or predicted data of the PCI Express link to obtain an adaptive threshold. Thus, an adaptive threshold that is more in line with the current data exchange state of the PCI Express link can be obtained.

[0048] S300: When the PCI Express link exceeds the adaptive threshold and does not receive data, the PCI Express link is triggered to enter the PCI Express ASPM energy saving state.

[0049] Combination Figure 3 As shown, when the idle (no traffic) time of the PCI Express link exceeds the adaptive threshold, the PCI Express link can be triggered to enter the PCI Express ASPM energy-saving state, that is, the PCI Express is allowed to enter a low power consumption state (L0s or L1).

[0050] According to some embodiments of the present invention, adjusting the time threshold based on historical data of the PCI Express link to obtain an adaptive threshold includes:

[0051] S211, obtaining PCI Express link historical data information;

[0052] S212, extracting data features from historical data information;

[0053] Optionally, the extracted data features may include: the number of data packets, the average time interval between adjacent data packets, the median time interval between adjacent data packets, the 75% quantile of the time interval between adjacent data packets, and the 25% quantile of the time interval between adjacent data packets.

[0054] According to some embodiments of the present invention, when the PCI Express link data stream is periodic, the extracted data features further include: feature extraction time.

[0055] S213, inputting data features into a pre-trained prediction model for prediction calculation;

[0056] In some embodiments of the present invention, the prediction model adopts a regression model or a classification model.

[0057] S214, output the predicted value, and obtain an adaptive threshold based on the predicted value.

[0058] According to some embodiments of the present invention, adjusting the time threshold based on the prediction data of the PCI Express link to obtain an adaptive threshold includes:

[0059] S221, setting balance parameters and adjusting step length;

[0060] S222, calculating a balance index based on a time interval of a previous cycle before entering the PCI Express ASPM energy-saving state and a balance parameter;

[0061] In some embodiments of the present invention, a method for calculating a balance index includes:

[0062] P = P + (TE-TS) - K;

[0063] Wherein, P is a balance index, K is a balance parameter, and (TE-TS) is a time interval before entering the PCI Express ASPM energy-saving state.

[0064] S223, according to the calculation result of the balance index, the time threshold is increased or decreased by adjusting the step size to obtain an adaptive threshold.

[0065] According to some embodiments of the present invention, according to the calculation result of the balance index, the time threshold is increased or decreased by adjusting the step size to obtain an adaptive threshold, including:

[0066] Set the adjustment steps D and I, and set the current time threshold to F;

[0067] When P>0, the adaptive threshold is adjusted to F=F+I; when P<0, the adaptive threshold is adjusted to: F=FD.

[0068] like Figure 2 As shown, the device for controlling entry into the PCI Express ASPM energy-saving state according to an embodiment of the present invention includes: a threshold setting module, a threshold adjustment module and a trigger module.

[0069] Wherein, the threshold setting module is used to set the state timer time threshold;

[0070] The threshold adjustment module is used to adjust the time threshold based on the historical data or predicted data of the PCI Express link to obtain an adaptive threshold;

[0071] The trigger module is used to trigger PCI Express to enter the PCI Express ASPM energy-saving state when the PCI Express link exceeds the adaptive threshold and does not receive data.

[0072] According to the computer storage medium of the embodiment of the present invention, a computer program is stored on the computer storage medium, and when the computer program is executed by the processor, the steps of the method for entering the PCI Express ASPM energy-saving state as described above are implemented, specifically including:

[0073] S100, setting a time threshold of a status timer;

[0074] S200, adjusting the time threshold based on historical data or predicted data of the PCI Express link to obtain an adaptive threshold;

[0075] S300: When the PCI Express link exceeds the adaptive threshold and does not receive data, the PCI Express link is triggered to enter the PCI Express ASPM energy saving state.

[0076] The method, device and computer storage medium for controlling entry into the PCI Express ASPM energy-saving state proposed in the present invention have the following beneficial effects:

[0077] The present invention uses a dynamic state timer instead of a static timer to solve the problem of application scenario dependency. Since the static idle timer is optimized based on certain predetermined application scenarios, the static idle timer depends on a specific optimized application scenario and cannot be applied to a wide range of application scenarios. The dynamic idle timer proposed in the present invention will change its threshold according to different application scenarios, thereby dynamically adapting to the user's application scenario and eliminating the dependency on specific applications.

[0078] The method for controlling entry into the PCI Express ASPM energy-saving state according to the present invention is described in detail below with reference to the accompanying drawings. It is worth noting that the following description is merely an exemplary description and should not be construed as a specific limitation on the present invention.

[0079] The present invention adopts a dynamic and adaptive time threshold in the state timer, and balances the performance and power consumption of the PCI-E link in a certain time period according to the state of the PCI-E link in the actual operation process, so as to achieve the purpose of not affecting the performance and reducing the energy consumption at the same time.

[0080] The method of implementing dynamic, adaptive thresholding can be model-based or model-free.

[0081] The model-based implementation is to predict the threshold value that should be used at some point in the future through modeling and historical data. For example, in order to predict the threshold value that should be used in time period T, the bus data information of time periods T-1, T-2, and T-3 can be monitored and converted into features:

[0082] Total number of packets;

[0083] The average value of the time interval between adjacent data packets (mean);

[0084] The median of the time interval between adjacent data packets;

[0085] 75% quantile of the time interval between adjacent packets;

[0086] The 25% quantile of the time interval between adjacent packets.

[0087] If the data traffic has obvious periodicity (for example, the usage rate is very low in a certain time period from 9:00PM to 5:00AM), time can also be used as a feature. The threshold used in time period T is predicted by the prediction model trained offline. The model can be a regression model, such as linear regression and Gaussian linear regression. It can also be a classification model, such as decision tree and decision forest.

[0088] The non-model-based implementation uses the information feedback obtained by the state timer during the real-time operation of the system to regularly / irregularly adjust the currently used threshold. Its purpose is to reduce power consumption without affecting performance as much as possible. An example of its implementation method is as follows:

[0089] The current threshold is F;

[0090] Define the power consumption and performance balance parameter K according to customer performance requirements;

[0091] Define the threshold increase / decrease step size I, D.

[0092] During system operation, the threshold is updated regularly. At the beginning of each cycle, the balance index P is defined as 0. Whenever entering the ASPM energy-saving state (exceeding the threshold F), the current time TS is recorded. Whenever exiting the ASPM energy-saving state (time is TE), it indicates that the system has the potential to increase performance. Through the power consumption and performance balance parameter K, the performance can be converted into power consumption. At the same time, the power consumption savings can be calculated as TE–TS. Update the balance index P=P+(TE-TS)–K. At the end of the cycle, if P is greater than 0, it means that the energy saving is greater than the performance loss, so the threshold can be increased to F=F+I, otherwise it means that the performance loss is too large, and the updated threshold is F=F–D. Then enter the next optimization cycle immediately, or wait for the start of the next optimization cycle.

[0093] It is worth emphasizing that the present invention is not limited to a specific standard or algorithm. The implementation method mentioned is only an example to help understand the content of this patent.

[0094] In summary, the present invention solves the problem of application scenario dependency by using a dynamic state timer instead of a static timer. Since static idle timers are optimized based on certain predetermined application scenarios, they can never be applied to a wide range of application scenarios. Therefore, static idle timers rely on specific optimized application scenarios. However, the dynamic idle timer will change its threshold according to different application scenarios, thereby dynamically adapting to the user's application scenario and eliminating the dependency on specific applications. Factors affecting the threshold include historical PCI-E bus data volume, prediction of future bus data volume, and the like. The present invention is not limited to a specific standard or algorithm.

[0095] Through the description of the specific implementation methods, a deeper and more specific understanding of the technical means and effects adopted by the present invention to achieve the predetermined purpose should be obtained. However, the accompanying drawings are only for reference and illustration purposes and are not intended to limit the present invention.

Claims

1. A method for controlling entry into a PCI Express ASPM energy-saving state, characterized in that: include: Set the status timer time threshold; Based on historical data or predicted data of the PCI Express link, the time threshold is adjusted to obtain an adaptive threshold; When the PCI Express link exceeds the adaptive threshold and does not receive data, triggering the PCI Express link to enter a PCI Express ASPM energy-saving state; The step of adjusting the time threshold based on the prediction data of the PCI Express link to obtain an adaptive threshold comprises: Set balancing parameters and adjustment step size; The balance index is calculated based on the time interval of the previous cycle before entering the PCI Express ASPM energy-saving state and the balance parameter, wherein the calculation method of the balance index includes: P = P + (TE-TS) - K; Wherein, P is the balance index, P on the left side of the equation is the balance index after the current calculation update, the right side of the equation is the current balance index before the current calculation update, K is the balance parameter, (TE-TS) is the time interval of the previous cycle before entering the PCI Express ASPM energy-saving state; According to the calculation result of the balance index, the time threshold is increased or decreased by the adjustment step to obtain the adaptive threshold, which specifically includes: Set the adjustment steps D and I, and set the current time threshold to F; When P>0, the adaptive threshold is adjusted to F=F+I; when P<0, the adaptive threshold is adjusted to: F=FD.

2. The method for controlling entry into the PCI Express ASPM energy-saving state according to claim 1, characterized in that: The adjusting the time threshold based on the historical data of the PCI Express link to obtain an adaptive threshold includes: Obtaining the PCI Express link historical data information; Extracting data features from the historical data information; Inputting the data features into a pre-trained prediction model for prediction calculation; A predicted value is output, and the adaptive threshold is obtained based on the predicted value.

3. The method for controlling entry into the PCI Express ASPM energy-saving state according to claim 2, characterized in that: The extracted data features include: the number of data packets, the average value of the time interval between adjacent data packets, the median of the time interval between adjacent data packets, the 75% quantile of the time interval between adjacent data packets, and the 25% quantile of the time interval between adjacent data packets.

4. The method for controlling entry into the PCI Express ASPM energy saving state according to claim 3, characterized in that: When the PCI Express link data stream is periodic, the extracted data features further include: feature extraction time.

5. The method for controlling entry into the PCI Express ASPM energy-saving state according to claim 2, characterized in that: The prediction model adopts a regression model or a classification model.

6. A device for controlling entry into a PCI Express ASPM energy-saving state, characterized in that: include: A threshold setting module, used to set a time threshold of a state timer; A threshold adjustment module, used to adjust the time threshold based on historical data or predicted data of the PCI Express link to obtain an adaptive threshold; A trigger module, configured to trigger the PCI Express to enter a PCI Express ASPM energy-saving state when the PCI Express link exceeds the adaptive threshold and does not receive data; The step of adjusting the time threshold based on the prediction data of the PCI Express link to obtain an adaptive threshold comprises: Set balancing parameters and adjustment step size; The balance index is calculated based on the time interval of the previous cycle before entering the PCI Express ASPM energy-saving state and the balance parameter, wherein the calculation method of the balance index includes: P = P + (TE-TS) - K; Wherein, P is the balance index, P on the left side of the equation is the balance index after the current calculation update, the right side of the equation is the current balance index before the current calculation update, K is the balance parameter, (TE-TS) is the time interval of the previous cycle before entering the PCI Express ASPM energy-saving state; According to the calculation result of the balance index, the time threshold is increased or decreased by the adjustment step to obtain the adaptive threshold, which specifically includes: Set the adjustment steps D and I, and set the current time threshold to F; When P>0, the adaptive threshold is adjusted to F=F+I; when P<0, the adaptive threshold is adjusted to: F=FD.

7. A computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for entering the PCI Express ASPM energy saving state as claimed in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Adaptive peripheral component interconnect express link substate initiation for optimal performance and power savings

    CN108713197A

  • Alarm threshold determination method and device, computer equipment and storage medium

    CN110489306A