Correctable error threshold setting method and apparatus, electronic device, and storage medium
By dynamically updating the error threshold in the computer system, the problems of high downtime and performance impact caused by improper threshold setting in the prior art are solved, and the stability and performance improvement of the system are achieved.
Patent Information
- Application Number
- PCT/CN2024/095323
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-29
- Filing Date
- 2024-05-24
- Publication Date
- 2025-03-06
AI Technical Summary
In computer systems, the prior art cannot dynamically adjust the correctable error threshold, resulting in high downtime or performance impact when the threshold setting is too high or too low.
By obtaining the initial values of the maximum interrupt stay duration, the running cycle and the correctable error thresholds for different hardware types, the threshold is dynamically updated, and the threshold is adjusted to ensure system performance and stability based on the cumulative interrupt stay duration and time difference.
It realizes that according to the cumulative duration of interrupt stay, dynamically sets the corrected error threshold, reduces downtime, and ensures system performance.
Smart Images

Figure CN2024095323_06032025_PF_FP_ABST
Abstract
Description
Correctable error threshold setting method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on August 29, 2023, with application number 202311095394.9 and application name “Correctable error threshold setting method, device, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for setting a correctable error threshold. Background Art
[0004] In computer systems, especially server systems, correctable errors and uncorrectable errors are two key concepts in error classification. They describe the types of errors that occur during data processing and storage, and the ability to correct them. Correctable errors are errors that the server can automatically detect and correct, while uncorrectable errors are errors that the server cannot automatically correct. There is a certain relationship between correctable and uncorrectable errors. Generally, correctable errors are a subset of uncorrectable errors. The server's error correction mechanism can detect and correct errors to a certain extent, but in some cases, errors may exceed the error correction capability and become uncorrectable. Therefore, when correctable errors occur, they should be properly analyzed. Correctable errors that may evolve into uncorrectable errors should be promptly isolated or repaired to improve system stability and reduce system downtime.
[0005] Currently, in computer systems, high-speed serial bus devices (Peripheral Component Interconnect Express, PCIE devices), memory, and CPUs each have a corresponding correctable error threshold (a threshold for the number of correctable errors). When the number of correctable errors reaches this threshold, an interrupt is generated to correct each error. Furthermore, once the correctable error threshold is set, it cannot be modified during the server's lifecycle. If the correctable error threshold is too high, the system cannot handle errors promptly, resulting in high downtime. If the threshold is too low, while downtime is reduced, frequent error handling interrupts may occur, impacting system performance.
[0006] Summary of the Invention
[0007] This application provides a method for setting a correctable error threshold, comprising:
[0008] Get the initial values of the maximum interrupt duration, operation cycle, and correctable error thresholds for different hardware types, and use the initial values as the current thresholds.
[0009] Interruption detection: In response to detecting that the current interruption is a correctable error interruption, the interruption dwell time is accumulated in the current interruption to obtain the interruption dwell accumulated time;
[0010] Threshold update: based on the operation cycle, or the combination of the maximum duration of the interruption and the cumulative duration of the interruption, determine the threshold update condition, and in response to the threshold update condition being met, determine a new threshold based on the current threshold of at least one hardware type, so that in the current threshold update cycle, when the cumulative duration of the interruption is greater than the maximum duration of the interruption, the new threshold is greater than the current threshold; or in response to the operation cycle being greater than the time difference, the new threshold is greater than the current threshold, the time difference being the time difference between the time when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the start time, the start time being the time when the correctable error interruption is first detected in each threshold update cycle, update the correctable error threshold of at least one hardware type to the new threshold, and reset the cumulative duration of the interruption; and
[0011] The interrupt detection and threshold update steps are performed cyclically to dynamically set the correctable error threshold.
[0012] According to a correctable error threshold setting method provided by this application, the threshold updating step includes:
[0013] In response to a preset timer timing reaching an operating cycle, determining that a threshold update condition is reached, and entering a timer interrupt, wherein the timer is set and starts timing when a correctable error interrupt is first detected in each operating cycle;
[0014] Determine a new threshold based on the maximum duration of interruption stay, the cumulative duration of interruption stay, and the current threshold of at least one hardware type, and update the correctable error threshold of at least one hardware type to the new threshold; and
[0015] Reset the cumulative interrupt duration and exit the timer interrupt.
[0016] According to a correctable error threshold setting method provided by the present application, a new threshold is determined based on the maximum duration of an interruption, the cumulative duration of an interruption, and the current threshold of at least one hardware type, including:
[0017] A new threshold is determined according to a ratio of the cumulative duration of the interruption to the longest duration of the interruption and a current threshold of at least one hardware type.
[0018] According to a correctable error threshold setting method provided by the present application, a new threshold is determined based on the ratio of the cumulative duration of the interruption to the maximum duration of the interruption, and the current threshold of at least one hardware type, including: determining the new threshold N' according to the following formula:
[0019] Among them, N represents the current threshold, DT represents the cumulative duration of the interruption, and BST represents the maximum duration of the interruption. Indicates a round-up operation.
[0020] According to a correctable error threshold setting method provided by this application, the threshold updating step includes:
[0021] During the current interruption, compare the cumulative duration of the interruption with the longest duration of the interruption;
[0022] In response to the interruption dwell cumulative duration being greater than or equal to the interruption dwell maximum duration, determining that the threshold update condition is met, executing the following steps, otherwise, exiting the current interruption;
[0023] determining the time difference between the current time and the start time, the start time being the time when the correctable error interrupt is first detected within each threshold update period;
[0024] determining a new threshold based on the time difference, the operating cycle, and a current threshold of at least one hardware type, and updating a correctable error threshold of at least one hardware type to the new threshold; and
[0025] Reset the cumulative duration of the interruption and exit the current interruption.
[0026] According to a correctable error threshold setting method provided by the present application, a new threshold is determined based on a time difference, an operating cycle, and a current threshold of at least one hardware type, including:
[0027] A new threshold is determined based on a ratio of the operating period to the time difference and a current threshold for at least one hardware type.
[0028] According to a correctable error threshold setting method provided by the present application, a new threshold is determined based on the ratio of the operating cycle to the time difference and the current threshold of at least one hardware type, including: determining the new threshold N' according to the following formula:
[0029] Where N represents the current threshold, TT represents the operating cycle, and ΔT represents the time difference. Indicates a round-up operation.
[0030] According to a correctable error threshold setting method provided by the present application, in response to a new threshold exceeding a preset upper threshold value, correctable error interruption is stopped.
[0031] According to a correctable error threshold setting method provided by the present application, correctable errors include at least two hardware types of correctable errors;
[0032] The interrupt detection step further includes: counting correctable error interrupts in the current interrupt according to the hardware type to which they belong, to obtain error interrupt counts for each type of hardware;
[0033] The steps for threshold update include:
[0034] In response to a preset timer timing reaching an operating cycle, determining that a threshold update condition is reached, and entering a timer interrupt, wherein the timer is set and starts timing when a correctable error interrupt is first detected in each operating cycle;
[0035] Compare the cumulative duration of interrupted stays with the longest duration of interrupted stays;
[0036] In response to the cumulative duration of the interruption being greater than or equal to the maximum duration of the interruption, the correctable error threshold corresponding to the hardware type with the largest error interruption count is selected as the target current threshold, a target new threshold is determined based on the maximum duration of the interruption, the cumulative duration of the interruption, and the target current threshold, and the target current threshold is updated as the target new threshold;
[0037] In response to the cumulative duration of the interruption being less than the maximum duration of the interruption, screening out the correctable error threshold corresponding to the hardware type having the smallest error interruption count as the target current threshold, determining a target new threshold based on the maximum duration of the interruption, the cumulative duration of the interruption, and the target current threshold, and updating the target current threshold as the target new threshold; and
[0038] Reset the cumulative interrupt dwell time and the error interrupt counts of various hardware types, and exit the timer interrupt.
[0039] According to a correctable error threshold setting method provided by the present application, a target new threshold is determined based on the maximum duration of the interruption, the cumulative duration of the interruption, and the target current threshold, including:
[0040] The new target threshold is determined based on the ratio of the cumulative duration of the interruption to the longest duration of the interruption, as well as the current target threshold.
[0041] According to a correctable error threshold setting method provided by the present application, a target new threshold is determined according to the ratio of the cumulative interruption dwell time to the maximum interruption dwell time, and the target current threshold, including: determining the target new threshold N'' according to the following formula:
[0042] Among them, N" represents the current target threshold, DT represents the cumulative duration of interruption and stay, and BST represents the maximum duration of interruption and stay. Indicates a round-up operation.
[0043] According to a correctable error threshold setting method provided by the present application, correctable errors include at least two hardware types of correctable errors;
[0044] The interrupt detection step further includes: counting correctable error interrupts in the current interrupt according to the hardware type to which they belong, to obtain error interrupt counts for each type of hardware;
[0045] The steps for threshold update include:
[0046] During the current interruption, compare the cumulative duration of the interruption with the longest duration of the interruption;
[0047] When the accumulated duration of the interruption stay is greater than or equal to the maximum duration of the interruption stay, it is determined that the threshold update condition is met and the following steps are performed; otherwise, the current interruption is exited;
[0048] determining the time difference between the current time and the start time, the start time being the time when the correctable error interrupt is first detected within each threshold update period;
[0049] Compare operating cycles and time differences;
[0050] In response to the operating cycle being greater than or equal to the time difference, screening out a correctable error threshold corresponding to the hardware type having the largest error interrupt count as the target current threshold, determining a target new threshold based on the time difference, the operating cycle, and the target current threshold, and updating the target current threshold as the target new threshold;
[0051] When the operating cycle is less than the time difference, the correctable error threshold corresponding to the hardware type with the smallest error interrupt count is selected as the target current threshold, a target new threshold is determined based on the time difference, the operating cycle, and the target current threshold, and the target current threshold is updated as the target new threshold; and
[0052] Resets the cumulative interrupt duration and error interrupt counts of various hardware types, and exits the current interrupt.
[0053] According to a correctable error threshold setting method provided by the present application, a target new threshold is determined based on a time difference, an operating cycle, and a target current threshold, including:
[0054] The target new threshold is determined based on the ratio of the operating period to the time difference and the target current threshold.
[0055] According to a correctable error threshold setting method provided by the present application, a target new threshold is determined based on the ratio of the operating cycle to the time difference and the target current threshold, including: determining the target new threshold N'' according to the following formula:
[0056] Where N" represents the current threshold of the target, TT represents the operation cycle, and ΔT represents the time difference. Indicates a round-up operation.
[0057] According to a correctable error threshold setting method provided by the present application, when a target new threshold exceeds a preset threshold upper limit, a hardware type correctable error interrupt corresponding to the target new threshold is stopped.
[0058] According to a correctable error threshold setting method provided by the present application, the initial value of the correctable error threshold is 1-10.
[0059] According to a correctable error threshold setting method provided by the present application, in the steps of cyclically executing interruption detection and threshold updating, it also includes: receiving a user's modified value for at least one of the maximum interruption duration and the operation cycle.
[0060] The present application also provides a device for setting a correctable error threshold, comprising:
[0061] A parameter acquisition module is used to obtain the initial values of the maximum interrupt duration, the operation cycle, and the correctable error thresholds of different hardware types, and use the initial values as the current thresholds;
[0062] an interruption detection module, configured to, in response to detecting that the current interruption is a correctable error interruption, accumulate the interruption dwell time in the current interruption to obtain the interruption dwell accumulated time; and
[0063] A threshold update module is used to determine a threshold update condition based on an operation cycle, or a combination of the maximum duration of an interruption and the cumulative duration of an interruption, and in response to the threshold update condition being reached, determine a new threshold based on the current threshold of at least one hardware type, and make the new threshold greater than the current threshold when the cumulative duration of an interruption is greater than the maximum duration of an interruption within the current threshold update cycle; or in response to the operation cycle being greater than the time difference, the new threshold is greater than the current threshold, the time difference being the time difference between the moment when the cumulative duration of an interruption is greater than or equal to the maximum duration of an interruption and the starting moment, the starting moment being the moment when a correctable error interruption is first detected within each threshold update cycle, update the correctable error threshold of at least one hardware type to the new threshold, and reset the cumulative duration of an interruption.
[0064] The present application also provides an electronic device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, any of the above-described methods for setting a correctable error threshold is implemented.
[0065] The present application also provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, any of the above-mentioned methods for setting a correctable error threshold is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0067] FIG1 is a flow chart of a method for setting a correctable error threshold according to one or more embodiments of the present application;
[0068] FIG2 is a second flow chart of a method for setting a correctable error threshold according to one or more embodiments of the present application;
[0069] FIG3 is a third flow chart of a method for setting a correctable error threshold according to one or more embodiments of the present application;
[0070] FIG4 is a fourth flow chart of a method for setting a correctable error threshold according to one or more embodiments of the present application;
[0071] FIG5 is a fifth flow chart of a method for setting a correctable error threshold according to one or more embodiments of the present application;
[0072] FIG6 is a schematic diagram of an application scenario of a method for setting a correctable error threshold in a server according to one or more embodiments of the present application;
[0073] FIG7 is a schematic diagram of the structure of a device for setting a correctable error threshold according to one or more embodiments of the present application;
[0074] FIG8 is a schematic structural diagram of an electronic device provided by one or more embodiments of the present application. DETAILED DESCRIPTION
[0075] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0076] The correctable error threshold setting method according to an embodiment of the present application, as shown in FIG1 , includes:
[0077] Step S110: Obtain the initial values of the maximum interrupt stay time (Break Stay Time, BST), the operation cycle (Total Time, TT), and the correctable error thresholds of different hardware types, and use the initial values as the current threshold N. The operation cycle is greater than the maximum interrupt stay time. In this step, the maximum interrupt stay time, the operation cycle, and the initial values of the correctable error thresholds of different hardware types are all pre-set parameters related to the server BIOS (Basic Input Output System) and can be set by the user. Among them, the maximum interrupt stay time represents the maximum interrupt stay time allowed in the operation cycle. Therefore, the maximum interrupt stay time should be less than the operation cycle and greater than the stay time within a correctable error interrupt. Specifically, the user can set it according to the actual situation of the server's business operation, for example: set the operation cycle to 1 hour and the maximum interruption duration to 10 seconds, which means that the user can tolerate the total duration of all correctable error interruptions of the server within 1 hour not exceeding 10 seconds. If it exceeds 10 seconds, it means that the number of correctable error interruptions of the hardware has increased, and it is necessary to dynamically adjust the correctable error threshold of the hardware according to the method in the following steps S120 and S130.
[0078] Step S120: Interrupt detection. When it is detected that the current interrupt is a correctable error interrupt, the interrupt dwell time is accumulated in the current interrupt to obtain the interrupt dwell accumulated time DT. In the server system, different types (at least one type) of hardware will generate different types of correctable error interrupts. The accumulated interrupt dwell time is the accumulated dwell time within the correctable error interrupts generated by all types of hardware. During the operation of the server system, as long as there is a correctable error generated by the hardware, the BIOS system will determine whether to generate a correctable error interrupt based on the set correctable error threshold. When the number of correctable errors of a certain hardware type reaches the corresponding correctable error threshold, a correctable error interrupt is generated, and repair and isolation operations are performed on the error within the correctable error interrupt. In this step, each time a correctable error interrupt is detected, the interrupt dwell accumulated time DT is accumulated.
[0079] Step S130: Threshold update, based on the operation cycle, or the combination of the maximum duration of the interruption and the cumulative duration of the interruption, determine the threshold update condition, and when the threshold update condition is met, determine a new threshold based on the current threshold of at least one hardware type, and make sure that in the current threshold update cycle, when the cumulative duration of the interruption is greater than the maximum duration of the interruption, the new threshold is greater than the current threshold; or when the operation cycle is greater than the time difference, the new threshold is greater than the current threshold, and the time difference is the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the starting moment, and the starting moment is the moment when a correctable error interruption is first detected in each threshold update cycle, update the correctable error threshold of at least one hardware type to the new threshold, and reset the cumulative duration of the interruption.
[0080] When the threshold update condition is reached, it means that the current threshold setting corresponding to at least one hardware type is too large or too small. When it is too large, more correctable errors cannot be repaired and may be converted into uncorrectable errors, which will cause more downtime situations; when it is too small, correctable error interruptions are frequently generated, affecting the performance of the server system. In this step, a new threshold is determined based on the current threshold of at least one hardware type, and when the cumulative duration of the interruption is greater than the longest duration of the interruption in the current threshold update cycle, the new threshold is greater than the current threshold; or when the operating cycle is greater than the time difference, the new threshold is greater than the current threshold. The frequency of correctable error interruptions in the next threshold update cycle is controlled according to the size of the new threshold to alleviate the situation where the current threshold is set too large or too small, ensuring that correctable errors are repaired and isolated in time without affecting system performance, thereby reducing the downtime rate. Among them, after updating the threshold, it is necessary to reset the cumulative duration of the interruption, that is, set it to 0, so that in the next threshold update cycle, the cumulative duration of the interruption is re-accumulated and the correctable error threshold is dynamically adjusted again.
[0081] The interruption detection and threshold update steps are executed cyclically to dynamically set the correctable error threshold. It should be noted that the correctable error threshold setting method of this embodiment begins after the server system is started, and continuously executes the interruption detection and threshold update steps to dynamically set the correctable error threshold. The loop is only exited when the server system is shut down or crashes.
[0082] In the correctable error threshold setting method of this embodiment, two parameters, a maximum interrupt duration and an operating cycle, are set, along with initial values for the correctable error threshold for different hardware types. The initial value is used as the current threshold, and the operating cycle is greater than the maximum interrupt duration. The interrupt detection and threshold update steps are performed cyclically. During the cyclic process, the interrupt duration is accumulated to obtain the cumulative interrupt duration. A threshold update condition is determined based on the operating cycle, or a combination of the maximum interrupt duration and the cumulative interrupt duration. When the threshold update condition is met, a new threshold is determined based on the current threshold, and the correctable error threshold is updated to the new threshold. The new threshold is set to be greater than the current threshold if the cumulative interrupt duration is greater than the maximum interrupt duration within the current threshold update cycle, or greater than the operating cycle time difference. The new threshold is set to be greater than the current threshold if the operating cycle is greater than the time difference. The frequency of correctable error interrupts within the next threshold update cycle is controlled based on the new threshold, thereby dynamically setting the correctable error threshold based on the cumulative interrupt duration. This ensures that faults are repaired and isolated in a timely manner without affecting system performance, thereby reducing downtime.
[0083] In some embodiments, step S130, the threshold updating step, as shown in FIG2 , includes:
[0084] Step S210: When the preset timer reaches its operating cycle, it is determined that the threshold update condition has been met, and a timer interrupt is initiated. The timer is set and begins timing when the first correctable error interrupt is detected within each operating cycle. This operating cycle is the threshold update cycle. Each time the timer reaches its operating cycle, a timer interrupt is triggered, and steps S220 and S230 are executed within the timer interrupt.
[0085] Step S220: Determine a new threshold based on the maximum duration of the interruption, the cumulative duration of the interruption, and the current threshold of at least one hardware type, and update the correctable error threshold of at least one hardware type to the new threshold, that is, use the new threshold as the current threshold, and adjust the frequency of correctable error interruptions with the new threshold in the next threshold update cycle. Specifically, determine the new threshold based on the maximum duration of the interruption, the cumulative duration of the interruption, and the current threshold of at least one hardware type, so that when the cumulative duration of the interruption is greater than the maximum duration of the interruption, the new threshold is greater than the current threshold, so as to reduce the frequency of correctable error interruptions in the next threshold update cycle. When the cumulative duration of the interruption is less than the maximum duration of the interruption, the new threshold is less than the current threshold, so as to increase the frequency of correctable error interruptions in the next threshold update cycle.
[0086] Step S230: Reset the cumulative duration of the interruption so that the cumulative duration of the interruption can be re-accumulated in the next threshold update cycle and the correctable error threshold can be dynamically adjusted again. After the cumulative duration of the interruption is reset, the timer interrupt is exited.
[0087] In this embodiment, determining a new threshold based on the maximum duration of an interruption, the cumulative duration of an interruption, and a current threshold of at least one hardware type includes:
[0088] A new threshold value N' is determined based on the ratio of the cumulative duration of the interruption to the longest duration of the interruption, and the current threshold value of at least one hardware type. Specifically, the new threshold value N' is determined according to the following formula:
[0089] Among them, N represents the current threshold, DT represents the cumulative duration of the interruption, and BST represents the maximum duration of the interruption. Indicates a round-up operation.
[0090] In the current operation cycle, the longer the cumulative interruption dwell time DT, the more frequent the correctable error interruptions are in the current operation cycle. When the cumulative interruption dwell time DT exceeds the maximum interruption dwell time BST, it means that the cumulative dwell time of the correctable error interruptions in the current operation cycle exceeds the expected range set by the user. At this time, the item (DT / BST) is greater than 1, and the new threshold N' is greater than the current threshold N, that is, in the next operation cycle, the correctable error interruptions are performed based on the new threshold N^'. Since the new threshold N' becomes larger, the frequency of correctable error interruptions is reduced in the next operation cycle. The server system reduces the number of times it enters the correctable error interruption, reduces the cumulative interruption dwell time DT, and ensures the performance of the server system.
[0091] In the current operation cycle, the shorter the cumulative interruption dwell time DT, the lower the frequency of correctable error interruptions in the current operation cycle. When the cumulative interruption dwell time DT does not exceed the maximum interruption dwell time BST, it means that the cumulative dwell time of correctable error interruptions in the current operation cycle does not exceed the expected range set by the user. At this time, the item (DT / BST) is less than 1, and the new threshold N' is less than the current threshold N, that is, in the next operation cycle, the correctable error interruption is performed based on the new threshold N'. Since the new threshold N' becomes smaller, the frequency of correctable error interruptions is increased in the next operation cycle, the server system increases the number of times it enters the correctable error interruption, and the cumulative interruption dwell time DT is increased. Since the cumulative interrupt duration DT in the current operation cycle has not reached the maximum interrupt duration BST, the server system has sufficient performance margin to repair more correctable errors. Therefore, in the next operation cycle, the frequency of correctable error interrupts is increased based on the adjusted new threshold N', so that the cumulative interrupt duration DT approaches (but does not exceed) the maximum interrupt duration BST. This ensures that as many correctable error interrupts as possible are generated and repaired without affecting system performance, thus reducing downtime. Of course, when (DT / BST) is equal to 1, the correctable error thresholds in the two operation cycles are equal.
[0092] In the previous embodiment, a timer is added to calculate whether the duration has reached an operating cycle. The timer itself requires additional system resources, and after the timer reaches the operating cycle, a timer interrupt will be generated, which will also affect system performance to a certain extent. Therefore, in some embodiments, step S130, the threshold update step is shown in Figure 3, including:
[0093] Step S310: During the current interruption, compare the cumulative duration of the interruption with the maximum duration of the interruption, that is, compare the sizes of DT and BST.
[0094] Step S320: If the cumulative interruption duration DT is greater than or equal to the maximum interruption duration BST, it is determined that the threshold update condition has been met, and the following steps S330 to S350 are executed. Otherwise, the current interruption is exited. In this embodiment, the threshold update period is demarcated at the point where the cumulative interruption duration DT is greater than or equal to the maximum interruption duration BST, and the correctable error threshold is updated within a correctable error interruption.
[0095] Step S330: determining the time difference between the current time and the start time, where the start time is the time when a correctable error interrupt is first detected within each threshold update period.
[0096] Step S340: Determine a new threshold based on the time difference, the operating cycle, and the current threshold of at least one hardware type, and update the correctable error threshold of at least one hardware type to the new threshold. Specifically, the new threshold is determined based on the time difference, the operating cycle, and the current threshold of at least one hardware type, such that if the operating cycle is greater than the time difference, the new threshold is greater than the current threshold, thereby reducing the frequency of correctable error interrupts in the next threshold update cycle. If the operating cycle is less than the time difference, the new threshold is less than the current threshold, thereby increasing the frequency of correctable error interrupts in the next threshold update cycle.
[0097] Step S350: Reset the cumulative interruption dwell time and exit the current interruption. Reset the cumulative interruption dwell time so that, during the next threshold update cycle, the cumulative interruption dwell time can be re-accumulated and the correctable error threshold can be dynamically adjusted again. After resetting the cumulative interruption dwell time, exit the current interruption.
[0098] In this embodiment, determining a new threshold based on the time difference, the operation cycle, and the current threshold of at least one hardware type includes:
[0099] The new threshold value N' is determined based on the ratio of the operating cycle to the time difference and the current threshold value of at least one hardware type. Specifically, the new threshold value N' is determined according to the following formula:
[0100] Where N represents the current threshold, TT represents the operating cycle, and ΔT represents the time difference. Indicates a round-up operation.
[0101] In the current threshold update cycle, the shorter the time difference ΔT, the faster the cumulative interruption duration DT in the current threshold update cycle is accumulated, and the more frequent the correctable error interruptions are. When the time difference ΔT is less than the operating cycle TT, it means that the cumulative duration of the correctable error interruption in the current threshold update cycle exceeds the expected range set by the user. At this time, the item (TT / ΔT) is greater than 1, and the new threshold N' is greater than the current threshold N, that is, the correctable error interruption is performed based on the new threshold N' in the next threshold update cycle. Since the new threshold N' becomes larger, the frequency of the correctable error interruption is reduced in the next threshold update cycle. The server system reduces the number of times it enters the correctable error interruption, reduces the cumulative interruption duration DT, and reduces the accumulation speed of the cumulative interruption duration DT, thereby ensuring the performance of the server system.
[0102] In the current threshold update cycle, the longer the time difference ΔT is, the slower the accumulation speed of the cumulative interruption stay time DT in the current threshold update cycle, and the smaller the frequency of correctable error interruption. When the time difference ΔT is greater than the operating cycle TT, it means that the cumulative stay time of the correctable error interruption in the current threshold update cycle does not exceed the expected range set by the user. At this time, the item (TT / ΔT) is less than 1, and the new threshold N' is less than the current threshold N, that is, in the next threshold update cycle, the correctable error interruption is performed based on the new threshold N'. Since the new threshold N' becomes smaller, the frequency of correctable error interruption is increased in the next threshold update cycle, the server system increases the number of times it enters the correctable error interruption, increases the cumulative interruption stay time DT, and increases the accumulation speed of the cumulative interruption stay time DT. Since the time difference ΔT within the current threshold update cycle does not exceed the operating cycle TT, the server system has sufficient performance margin to repair more correctable errors. Therefore, in the next threshold update cycle, the frequency of correctable error interrupts is increased based on the adjusted new threshold N'. This maximizes the generation and repair of correctable error interrupts without affecting system performance, thus reducing downtime. Of course, if (TT / ΔT) equals 1, the correctable error thresholds for the two operating cycles are equal.
[0103] In this embodiment, the moment when the cumulative interruption duration DT is greater than or equal to the maximum interruption duration BST is used as the dividing point of the threshold update period. The threshold is updated within a correctable error interruption. There is no need to set an additional timer, which saves server system resources. Moreover, under the same frequency of correctable error interruptions, one timer interrupt is reduced in each threshold update period, which has better system performance to a certain extent.
[0104] In some embodiments, if the new threshold exceeds a preset upper threshold, correctable error interrupts are disabled to ensure server system performance. The preset upper threshold is related to the number of bits in the register storing the correctable error threshold. For example, if the register has 15 bits, the preset upper threshold is 2 to the power of 15.
[0105] In each of the above embodiments, when a threshold update condition is met, a new threshold is determined based on the current threshold of at least one hardware type. If multiple hardware types have correctable errors, theoretically, when the threshold update condition is met, a new threshold can be determined and updated for the correctable error threshold of any one hardware type, or new thresholds can be determined and updated for each of the multiple hardware types. Whether determining and updating the correctable error thresholds of one or more hardware types, while it is possible to adjust the frequency of correctable error interrupts within the next threshold update cycle to a certain extent, it is impossible to accurately identify the correctable error interrupt corresponding to the hardware type that has the greatest impact on the cumulative interrupt dwell time DT (a significant increase or decrease in the number of correctable error interrupts) within the current threshold update cycle. Therefore, the above embodiments are only suitable for dynamically setting the correctable error threshold for a single hardware type. Currently, in server systems, hardware types generally include three types: CPU, memory, and PCIE devices. Each of these hardware types has its own correctable errors and correctable error thresholds.
[0106] In the case where multiple hardware types of correctable errors occur simultaneously, in order to better maintain system stability and reduce downtime, in some embodiments, the correctable errors include correctable errors of at least two hardware types. On this basis, step S120, i.e., the interrupt detection step, further includes: in the current interrupt, counting the correctable error interrupts according to the hardware type to which they belong, to obtain error interrupt counts for each type of hardware. For example, the CPU error interrupt count is CpuErrorCount, the memory error interrupt count is MemErrorCount, and the PCIE device error interrupt count is PcieErrorCount. Each time a CPU correctable error interrupt is detected, CpuErrorCount++ is counted; each time a memory correctable error interrupt is detected, MemErrorCount++ is counted; each time a PCIE device correctable error interrupt is detected, PcieErrorCount++ is counted, thereby achieving error interrupt counts for each type of hardware.
[0107] On this basis, step S130, i.e., the step of updating the threshold, as shown in FIG4 , includes:
[0108] Step S410: When the preset timer reaches its operating cycle, it is determined that the threshold update condition has been met, and a timer interrupt is initiated. The timer is set and begins timing when the first correctable error interrupt is detected within each operating cycle. This operating cycle is the threshold update cycle. Each time the timer reaches its operating cycle, a timer interrupt is triggered, and steps S420 to S450 are executed within the timer interrupt.
[0109] Step S420: Compare the cumulative duration of the interruption stay with the maximum duration of the interruption stay, that is, compare the sizes of DT and BST.
[0110] Step S430: When the cumulative interruption dwell time DT is greater than or equal to the maximum interruption dwell time BST, the correctable error threshold corresponding to the hardware type with the largest error interruption count is selected as the target current threshold, and the target new threshold is determined based on the maximum interruption dwell time, the cumulative interruption dwell time, and the target current threshold, and the target current threshold is updated to the target new threshold. When the cumulative interruption dwell time DT is greater than or equal to the maximum interruption dwell time BST, it indicates that the total number of correctable error interrupts of each hardware type is relatively large during the current threshold update cycle. Obviously, the correctable error interrupt corresponding to the hardware type with the largest error interruption count has the greatest impact on the cumulative interruption dwell time DT. Therefore, the hardware type with the largest error interruption count should be found, and the correctable error threshold of this hardware type should be used as the target current threshold.
[0111] Step S440: When the cumulative duration of the interruption is less than the maximum duration of the interruption, the correctable error threshold corresponding to the hardware type with the smallest error interruption count is selected as the target current threshold. The target new threshold is determined based on the maximum duration of the interruption, the cumulative duration of the interruption, and the target current threshold, and the target current threshold is updated to the target new threshold. When the cumulative duration of the interruption DT is less than the maximum duration of the interruption BST, it means that the total number of correctable error interrupts of each hardware type is small during the current threshold update cycle. Obviously, the correctable error interrupt corresponding to the hardware type with the smallest error interruption count has the greatest impact on the cumulative duration of the interruption DT. Therefore, the hardware type with the smallest error interruption count should be found and the correctable error threshold of this hardware type should be used as the target current threshold.
[0112] Step S450: Reset the cumulative interrupt dwell time and the error interrupt counts for each hardware type, and exit the timer interrupt. The cumulative interrupt dwell time and the error interrupt counts for each hardware type are reset so that, during the next threshold update cycle, the cumulative interrupt dwell time and the error interrupt counts for each hardware type can be re-accumulated, and the correctable error threshold can be dynamically adjusted again. After the cumulative interrupt dwell time and the error interrupt counts for each hardware type are reset, exit the timer interrupt.
[0113] In this embodiment, the new target threshold is determined based on the maximum duration of the interruption, the cumulative duration of the interruption, and the current target threshold, including:
[0114] The new target threshold is determined based on the ratio of the cumulative duration of the interruption to the longest duration of the interruption, as well as the current target threshold. Specifically, the new target threshold N'' is determined according to the following formula:
[0115] Among them, N" represents the current target threshold, DT represents the cumulative duration of interruption and stay, and BST represents the maximum duration of interruption and stay. Indicates a round-up operation.
[0116] In the current operation cycle, the longer the cumulative interrupt dwell time DT, the more frequent the correctable error interruptions are in the current operation cycle. When the cumulative interrupt dwell time DT exceeds the maximum interrupt dwell time BST, it means that the cumulative dwell time of the correctable error interruptions in the current operation cycle exceeds the expected range set by the user. The correctable error threshold corresponding to the hardware with the largest error interruption count is prioritized as the target current threshold N". At this time, (DT / BST) is greater than 1, and the target new threshold N'' is greater than the target current threshold N'', that is, in the next operation cycle, the correctable error interruption is performed based on the target new threshold N''. Since the target new threshold N'' becomes larger, the frequency of the correctable error interruption of the hardware type with the largest error interruption count is reduced in the next operation cycle. The server system reduces the number of correctable error interruptions of the hardware type with the largest error interruption count, reduces the cumulative interrupt dwell time DT, and ensures the performance of the server system.
[0117] In the current operation cycle, the shorter the cumulative interrupt dwell time DT is, the lower the frequency of correctable error interruptions is in the current operation cycle. When the cumulative interrupt dwell time DT does not exceed the maximum interrupt dwell time BST, it means that the cumulative dwell time of correctable error interruptions in the current operation cycle does not exceed the expected range set by the user. The correctable error threshold corresponding to the hardware with the smallest error interrupt count is prioritized as the target current threshold N". At this time, (DT / BST) is less than 1, and the target new threshold N'' is less than the target current threshold N'', that is, in the next operation cycle, the correctable error interruption is performed based on the target new threshold N''. Since the target new threshold N'' becomes smaller, the hardware with the smallest error interrupt count is increased in the next operation cycle. The server system increases the frequency of correctable error interrupts for hardware types with different error interrupt counts, increasing the number of correctable error interrupts it enters, thereby increasing the cumulative interrupt dwell time DT. Since the cumulative interrupt dwell time DT in the current operating cycle has not yet reached the maximum interrupt dwell time BST, this indicates that the server system has a certain performance margin to repair more correctable errors. Therefore, in the next operating cycle, based on the adjusted new threshold N'', the frequency of correctable error interrupts for hardware types with the smallest error interrupt counts is increased, so that the cumulative interrupt dwell time DT approaches (does not exceed) the maximum interrupt dwell time BST. Without affecting system performance, as many correctable error interrupts for hardware types with the smallest error interrupt counts as possible are generated, correctable errors are repaired, and the downtime rate is reduced.
[0118] For example: within the current operation cycle, the error interruption count CpuErrorCount of the CPU increases sharply, resulting in the cumulative interruption residence duration DT exceeding the maximum interruption residence duration BST. Taking the current threshold N” of the correctable error threshold of the CPU as the target, according to the above formula calculate the target new threshold N”' of the CPU. Since N”'>N”, within the next operation cycle, the frequency of the correctable error interruptions of the CPU will decrease, thereby reducing the cumulative interruption residence duration DT. If within the current operation cycle, the error interruption counts of the CPU, memory, and PCIE device all increase sharply and the total numbers are not much different, then within the next three operation cycles, the target new thresholds N”' will be increased in sequence, and the frequencies of the respective correctable error interruptions will be decreased in sequence, so as to control the cumulative interruption residence duration DT within the maximum interruption residence duration BST after three operation cycles.
[0119] On the contrary, within the current operation cycle, the error interruption count CpuErrorCount of the CPU decreases sharply, resulting in the cumulative interruption residence duration DT being less than the maximum interruption residence duration BST. Taking the current threshold N” of the correctable error threshold of the CPU as the target, according to the above formula calculate the target new threshold N”' of the CPU. Since N”'<N”, within the next operation cycle, the frequency of the correctable error interruptions of the CPU will increase to perform more correctable error interruptions of the CPU to repair errors, and the cumulative interruption residence duration DT will increase and approach (not exceed) the maximum interruption residence duration BST. If within the current operation cycle, the error interruption counts of the CPU, memory, and PCIE device all decrease sharply and the total numbers are not much different, then within the next three operation cycles, the target new thresholds N”' will be decreased in sequence, and the frequencies of the respective correctable error interruptions will be increased in sequence, so as to process more correctable errors of the CPU, memory, and PCIE device respectively within three operation cycles and control the cumulative interruption residence duration DT within the maximum interruption residence duration BST.
[0120] In some embodiments, the correctable errors include correctable errors of at least two hardware types. On this basis, step S120, that is, the step of interruption detection, further includes: within the current interruption, counting the correctable error interruptions according to the hardware types to obtain the error interruption counts of various hardware types.
[0121] Step S130, the step of threshold update is shown in FIG. 5 and includes:
[0122] Step S510: within the current interruption, compare the cumulative interruption residence duration with the maximum interruption residence duration, that is, compare the sizes of DT and BST.
[0123] Step S520: If the cumulative interruption duration DT is greater than or equal to the maximum interruption duration, it is determined that the threshold update condition has been met and the following steps S330 to S370 are executed. Otherwise, the current interruption is exited. In this embodiment, the threshold update period is defined as the point at which the cumulative interruption duration DT is greater than or equal to the maximum interruption duration BST, and the correctable error threshold is updated within a correctable error interruption.
[0124] Step S530: Determine the time difference between the current time and the start time, where the start time is the time when a correctable error interrupt is first detected within each threshold update period.
[0125] Step S540: Compare the operation cycle and the time difference.
[0126] Step S550: If the operating cycle is greater than or equal to the time difference, the correctable error threshold corresponding to the hardware type with the largest error interrupt count is selected as the target current threshold, a target new threshold is determined based on the time difference, the operating cycle, and the target current threshold, and the target current threshold is updated to be the target new threshold. Specifically, the new threshold is determined based on the time difference, the operating cycle, and the target current threshold such that, if the operating cycle is greater than the time difference, the target new threshold is greater than the target current threshold, thereby reducing the frequency of correctable error interrupts for the hardware type with the largest error interrupt count in the next threshold update cycle.
[0127] Step S560: If the operating cycle is less than the time difference, the correctable error threshold corresponding to the hardware type with the smallest error interrupt count is selected as the target current threshold, a target new threshold is determined based on the time difference, the operating cycle, and the target current threshold, and the target current threshold is updated to the target new threshold. Specifically, the new threshold is determined based on the time difference, the operating cycle, and the target current threshold such that, if the operating cycle is less than the time difference, the target new threshold is less than the target current threshold, thereby increasing the frequency of correctable error interrupts for the hardware type with the smallest error interrupt count in the next threshold update cycle.
[0128] Step S570: Reset the cumulative interrupt dwell time and the error interrupt counts for each hardware type, and exit the current interrupt. The cumulative interrupt dwell time and the error interrupt counts for each hardware type are reset so that, during the next threshold update cycle, the cumulative interrupt dwell time and the error interrupt counts for each hardware type can be re-accumulated, and the correctable error threshold can be dynamically adjusted again. After the cumulative interrupt dwell time and the error interrupt counts for each hardware type are reset, exit the current interrupt.
[0129] In this embodiment, determining the new target threshold based on the time difference, the operation cycle, and the current target threshold includes:
[0130] The target new threshold is determined based on the ratio of the operating cycle to the time difference and the target current threshold. Specifically, the target new threshold N'' is determined according to the following formula:
[0131] Where N" represents the current threshold of the target, TT represents the operation cycle, and ΔT represents the time difference. Indicates a round-up operation.
[0132] In the current threshold update cycle, the shorter the time difference ΔT, the faster the cumulative interrupt dwell time DT in the current threshold update cycle accumulates, and the more frequent the correctable error interruptions. When the time difference ΔT is less than the operating cycle TT, it means that the cumulative dwell time of the correctable error interruption in the current threshold update cycle exceeds the expected range set by the user. The correctable error threshold corresponding to the hardware with the largest error interruption count is prioritized as the target current threshold N". At this time, (TT / ΔT) is greater than 1, and the target new threshold N'' is greater than the target current threshold N'', that is, in the next threshold update cycle, the correctable error interruption is performed based on the target new threshold N''. Since the target new threshold N'' becomes larger, the frequency of the correctable error interruption of the hardware type with the largest error interruption count is reduced in the next threshold update cycle. The server system reduces the number of correctable error interruptions of the hardware type with the largest error interruption count, reduces the cumulative interrupt dwell time DT, and reduces the accumulation speed of the cumulative interrupt dwell time DT, thereby ensuring the performance of the server system.
[0133] In the current threshold update cycle, the longer the time difference ΔT is, the slower the cumulative speed of the interruption dwell time DT in the current threshold update cycle is, and the smaller the frequency of the correctable error interruption is. When the time difference ΔT is greater than the operation cycle TT, it means that the cumulative dwell time of the correctable error interruption in the current threshold update cycle does not exceed the expected range set by the user. The correctable error threshold corresponding to the hardware type with the smallest error interruption count is preferentially set as the target current threshold value N". At this time, (TT / ΔT) is less than 1, and the target new threshold value N'' is less than the target current threshold value N", that is, the correctable error interruption is performed based on the target new threshold value N'' in the next threshold update cycle. Since the target new threshold value N'' becomes smaller, the correctable error interruption in the next threshold update cycle is performed based on the target new threshold value N''. During this period, the frequency of correctable error interrupts for the hardware type with the smallest error interrupt count is increased. The server system increases the number of correctable error interrupts for the hardware type with the smallest error interrupt count, increases the cumulative interrupt dwell time DT, and increases the rate at which the cumulative interrupt dwell time DT accumulates. Since the time difference ΔT within the current threshold update cycle does not exceed the operating cycle TT, this indicates that the server system has a certain performance margin to repair more correctable errors. Therefore, during the next threshold update cycle, based on the adjusted target new threshold N'', the frequency of correctable error interrupts for the hardware type with the smallest error interrupt count is increased. Without affecting system performance, as many correctable error interrupts as possible are generated and repaired, thereby reducing downtime. Of course, when the term (TT / ΔT) is equal to 1, the correctable error thresholds for the two operating cycles are equal.
[0134] In this embodiment, the moment when the cumulative interruption duration DT is greater than or equal to the maximum interruption duration BST is used as the dividing point of the threshold update period. The threshold is updated within a correctable error interruption. There is no need to set an additional timer, which saves server system resources. Moreover, under the same frequency of correctable error interruptions, one timer interrupt is reduced in each threshold update period, which has better system performance to a certain extent.
[0135] In some embodiments, if the target new threshold exceeds a preset upper threshold, correctable error interrupts are stopped to ensure server system performance. The preset upper threshold is related to the number of bits in the register storing the correctable error threshold. For example, if the register has 15 bits, the preset upper threshold is 2 to the power of 15.
[0136] In some embodiments, the initial value of the correctable error threshold is 1-10, preferably 1, that is, when the server system starts up and there are fewer correctable errors in the hardware, each correctable error can be interrupted and repaired.
[0137] In some embodiments, the steps of cyclically performing interruption detection and threshold updating further include receiving a user-defined modification of at least one of the maximum interruption duration and the operating cycle. During operation of the server system, the user can adjust the settings of the maximum interruption duration and the operating cycle according to actual needs, so that the newly determined thresholds based on these two parameters better meet actual needs.
[0138] The correctable error threshold setting methods in the above-described embodiments can be executed in a computer system, particularly in a server computer system. FIG6 illustrates an application scenario of the correctable error threshold setting methods in the above-described embodiments in a server. The server hardware 610 primarily includes memory 611, a CPU 612, and a PCIE device 613. Each of the memory 611, CPU 612, and PCIE device 613 generates correctable errors. Each of the memory 611, CPU 612, and PCIE device 613 has a corresponding counter register 620 and threshold register 630. The counter register 620 is used to count correctable errors generated by the corresponding hardware, while the threshold register 630 is used to store the correctable error threshold for the corresponding hardware. For example, the correctable error threshold for the memory 611 is N1, the correctable error threshold for the CPU 612 is N2, and the correctable error threshold for the PCIE device 613 is N3. For each type of hardware 610, the corresponding counting register 620 counts the correctable errors generated by it and compares them with the correctable error threshold stored in the corresponding threshold register 630. If the count reaches the correctable error threshold, an interrupt is generated. For example, if the count in the counting register 620 of memory 611 reaches N1, a memory interrupt is generated. This comparison is a hardware behavior of the counting register 620 and the corresponding threshold register 630. The counting register 620 automatically performs an automatic comparison for each count. After the interrupt is generated, the BIOS interrupt processing function module 640 is entered. The correctable error threshold setting methods of each of the above embodiments can all be implemented in the BIOS interrupt processing function module 640. The BIOS interrupt processing function module 640 not only repairs the correctable error corresponding to the current interrupt, but also executes the correctable error threshold setting methods of each of the above embodiments to update the correctable error threshold of at least one hardware type and feeds the updated correctable error threshold back to the corresponding threshold register 630, thereby achieving dynamic setting of the correctable error threshold.
[0139] The correctable error threshold setting device provided in the present application is described below. The correctable error threshold setting device described below and the correctable error threshold setting method described above can refer to each other.
[0140] The correctable error threshold setting device of the present application, as shown in FIG7 , includes:
[0141] The parameter acquisition module 710 is used to obtain the initial values of the maximum interruption dwell time, the operation cycle and the correctable error threshold of different hardware types, and use the initial value as the current threshold. The operation cycle is greater than the maximum interruption dwell time.
[0142] The interruption detection module 720 is configured to accumulate the interruption dwell time in the current interruption to obtain the interruption dwell accumulated time when detecting that the current interruption is a correctable error interruption.
[0143] The threshold update module 730 is used to determine the threshold update condition based on the operation cycle, or the combination of the maximum duration of the interruption and the cumulative duration of the interruption, and when the threshold update condition is met, determine a new threshold based on the current threshold of at least one hardware type, and make the new threshold greater than the current threshold when the cumulative duration of the interruption is greater than the maximum duration of the interruption within the current threshold update cycle; or make the new threshold greater than the current threshold when the operation cycle is greater than the time difference, and the time difference is the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the starting moment, and the starting moment is the moment when a correctable error interruption is first detected within each threshold update cycle, update the correctable error threshold of at least one hardware type to the new threshold, and reset the cumulative duration of the interruption.
[0144] In the correctable error threshold setting device of the present application, two parameters, a maximum interrupt duration and an operating cycle, are set, along with initial values for correctable error thresholds for different hardware types. The initial value is used as the current threshold, and the operating cycle is greater than the maximum interrupt duration. The interrupt detection and threshold update steps are cyclically executed. During the cyclic process, the interrupt duration is accumulated to obtain the cumulative interrupt duration. A threshold update condition is determined based on the operating cycle, or a combination of the maximum interrupt duration and the cumulative interrupt duration. When the threshold update condition is met, a new threshold is determined based on the current threshold, and the correctable error threshold is updated to the new threshold. The new threshold is set to be greater than the current threshold if the cumulative interrupt duration is greater than the maximum interrupt duration within the current threshold update cycle, or greater than the operating cycle if the time difference is greater than the time difference. The new threshold is then set to be greater than the current threshold if the operating cycle is greater than the time difference. The frequency of correctable error interrupts within the next threshold update cycle is controlled based on the new threshold, thereby dynamically setting the correctable error threshold based on the cumulative interrupt duration. This ensures that faults can be repaired and isolated in a timely manner without affecting system performance, thereby reducing downtime.
[0145] Optionally, the threshold updating module 730 includes:
[0146] The condition determination module is used to determine that the threshold update condition is reached when the preset timer reaches the operating cycle, and enter the timer interrupt, wherein the timer is set and starts timing when a correctable error interrupt is detected for the first time in each operating cycle.
[0147] The new threshold determination module is used to determine a new threshold based on the maximum interruption dwell time, the cumulative interruption dwell time and the current threshold of at least one hardware type, and update the correctable error threshold of at least one hardware type to the new threshold.
[0148] The parameter reset module is used to reset the cumulative interrupt duration and exit the timer interrupt.
[0149] Optionally, the new threshold determination module is specifically configured to determine the new threshold according to a ratio of the cumulative duration of the interruption stay to the longest duration of the interruption stay and a current threshold of at least one hardware type.
[0150] Optionally, the new threshold determination module is specifically configured to determine the new threshold N' according to the following formula:
[0151] Among them, N represents the current threshold, DT represents the cumulative duration of the interruption, and BST represents the maximum duration of the interruption. Indicates a round-up operation.
[0152] Optionally, the threshold updating module 730 includes:
[0153] The duration comparison module is used to compare the cumulative duration of the interruption and the maximum duration of the interruption in the current interruption.
[0154] The condition determination module is used to determine that the threshold update condition is met when the cumulative interruption stay time is greater than or equal to the maximum interruption stay time, and execute the following steps; otherwise, exit the current interruption.
[0155] The time difference determination module is used to determine the time difference between the current moment and the starting moment, where the starting moment is the moment when a correctable error interrupt is first detected within each threshold update cycle.
[0156] The new threshold determination module is configured to determine a new threshold based on the time difference, the operation cycle, and the current threshold of at least one hardware type, and update the correctable error threshold of at least one hardware type to the new threshold.
[0157] The parameter reset module is used to reset the cumulative duration of the interruption and exit the current interruption.
[0158] Optionally, the new threshold determination module is specifically configured to determine the new threshold based on a ratio of the operating cycle to the time difference and a current threshold of at least one hardware type.
[0159] Optionally, the new threshold determination module is specifically configured to determine the new threshold N' according to the following formula:
[0160] Where N represents the current threshold, TT represents the operating cycle, and ΔT represents the time difference. Indicates a round-up operation.
[0161] Optionally, the correctable error threshold setting device of the present application further includes: an error interrupt stopping module, configured to stop the correctable error interrupt when the new threshold exceeds a preset upper threshold value.
[0162] Optionally, the correctable errors include at least two hardware types of correctable errors;
[0163] The interrupt detection module 720 is further configured to count correctable error interrupts in the current interrupt according to the hardware type to which they belong, and obtain error interrupt counts for each type of hardware.
[0164] The threshold updating module 730 includes:
[0165] The condition determination module is used to determine that the threshold update condition is reached when the preset timer reaches the operating cycle, and enter the timer interrupt, wherein the timer is set and starts timing when a correctable error interrupt is detected for the first time in each operating cycle.
[0166] The duration comparison module is used to compare the cumulative duration of the interruption and the maximum duration of the interruption.
[0167] The target new threshold determination module is used to, when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption, screen out the correctable error threshold corresponding to the hardware type with the largest error interruption count as the target current threshold, determine the target new threshold based on the maximum duration of the interruption, the cumulative duration of the interruption and the target current threshold, and update the target current threshold to the target new threshold; when the cumulative duration of the interruption is less than the maximum duration of the interruption, screen out the correctable error threshold corresponding to the hardware type with the smallest error interruption count as the target current threshold, determine the target new threshold based on the maximum duration of the interruption, the cumulative duration of the interruption and the target current threshold, and update the target current threshold to the target new threshold.
[0168] The parameter reset module is used to reset the cumulative interrupt dwell time and the error interrupt counts of various hardware types, and exit the timer interrupt.
[0169] Optionally, the target new threshold determination module is specifically configured to determine the target new threshold according to a ratio of the cumulative duration of the interrupted stay to the longest duration of the interrupted stay and the target current threshold.
[0170] Optionally, the target new threshold value determination module is specifically configured to determine the target new threshold value N'' according to the following formula:
[0171] Among them, N" represents the current target threshold, DT represents the cumulative duration of interruption and stay, and BST represents the maximum duration of interruption and stay. Indicates a round-up operation.
[0172] Optionally, the correctable errors include at least two hardware types of correctable errors;
[0173] The interrupt detection module 720 is further configured to count correctable error interrupts in the current interrupt according to the hardware type to which they belong, and obtain error interrupt counts for each type of hardware.
[0174] The threshold updating module 730 includes:
[0175] The duration comparison module is used to compare the cumulative duration of the interruption and the maximum duration of the interruption in the current interruption.
[0176] The condition determination module is used to determine that the threshold update condition is met when the cumulative interruption stay time is greater than or equal to the maximum interruption stay time, and execute the following steps; otherwise, exit the current interruption.
[0177] The time difference determination module is used to determine the time difference between the current moment and the starting moment, where the starting moment is the moment when a correctable error interrupt is first detected within each threshold update cycle.
[0178] The cycle and time difference comparison module is used to compare the operation cycle and time difference.
[0179] The target new threshold determination module is used to, when the operating cycle is greater than or equal to the time difference, screen out the correctable error threshold corresponding to the hardware type with the largest error interruption count as the target current threshold, determine the target new threshold based on the time difference, the operating cycle and the target current threshold, and update the target current threshold to the target new threshold; when the operating cycle is less than the time difference, screen out the correctable error threshold corresponding to the hardware type with the smallest error interruption count as the target current threshold, determine the target new threshold based on the time difference, the operating cycle and the target current threshold, and update the target current threshold to the target new threshold.
[0180] The parameter reset module is used to reset the cumulative interrupt duration and the error interrupt counts of various hardware types, and exit the current interrupt.
[0181] Optionally, the target new threshold determination module is specifically configured to determine the target new threshold based on a ratio of the operation cycle to the time difference and the target current threshold.
[0182] Optionally, the target new threshold value determination module is specifically configured to determine the target new threshold value N'' according to the following formula:
[0183] Where N" represents the current threshold of the target, TT represents the operation cycle, and ΔT represents the time difference. Indicates a round-up operation.
[0184] Optionally, the correctable error threshold setting device of the present application further includes: an error interrupt stopping module, configured to stop the correctable error interrupt of the hardware type corresponding to the target new threshold when the target new threshold exceeds a preset threshold upper limit.
[0185] Optionally, the initial value of the correctable error threshold is 1-10.
[0186] Optionally, the parameter acquisition module 710 is further configured to receive a user's modified value for at least one of the maximum duration of the interruption and the operation cycle.
[0187] FIG8 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG8 , the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840. The processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may invoke logic instructions in the memory 830 to execute a method for setting a correctable error threshold, which includes:
[0188] Get the initial values of the maximum interrupt duration, operation cycle, and correctable error thresholds for different hardware types. Use the initial values as the current thresholds, and ensure that the operation cycle is greater than the maximum interrupt duration.
[0189] Interruption detection: When it is detected that the current interruption is a correctable error interruption, the interruption dwell time is accumulated in the current interruption to obtain the interruption dwell accumulated time.
[0190] Threshold update: Based on the operation cycle, or the combination of the maximum duration of the interruption and the cumulative duration of the interruption, the threshold update condition is determined, and when the threshold update condition is met, a new threshold is determined based on the current threshold of at least one hardware type, and when the cumulative duration of the interruption is greater than the maximum duration of the interruption within the current threshold update cycle, the new threshold is greater than the current threshold; or when the operation cycle is greater than the time difference, the new threshold is greater than the current threshold, and the time difference is the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the starting moment, and the starting moment is the moment when a correctable error interruption is first detected within each threshold update cycle, the correctable error threshold of at least one hardware type is updated to the new threshold, and the cumulative duration of the interruption is reset.
[0191] The interrupt detection and threshold update steps are performed cyclically to dynamically set the correctable error threshold.
[0192] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0193] On the other hand, the present application further provides a computer-readable instruction product, which includes computer-readable instructions. The computer-readable instructions may be stored on a non-transitory computer-readable storage medium. When the computer-readable instructions are executed by a processor, the computer can perform the correctable error threshold setting method provided by each of the above methods, which includes:
[0194] Get the initial values of the maximum interrupt duration, operation cycle, and correctable error thresholds for different hardware types. Use the initial values as the current thresholds, and ensure that the operation cycle is greater than the maximum interrupt duration.
[0195] Interruption detection: When it is detected that the current interruption is a correctable error interruption, the interruption dwell time is accumulated in the current interruption to obtain the interruption dwell accumulated time.
[0196] Threshold update: Based on the operation cycle, or the combination of the maximum duration of the interruption and the cumulative duration of the interruption, the threshold update condition is determined, and when the threshold update condition is met, a new threshold is determined based on the current threshold of at least one hardware type, and when the cumulative duration of the interruption is greater than the maximum duration of the interruption within the current threshold update cycle, the new threshold is greater than the current threshold; or when the operation cycle is greater than the time difference, the new threshold is greater than the current threshold, and the time difference is the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the starting moment, and the starting moment is the moment when a correctable error interruption is first detected within each threshold update cycle, the correctable error threshold of at least one hardware type is updated to the new threshold, and the cumulative duration of the interruption is reset.
[0197] The interrupt detection and threshold update steps are performed cyclically to dynamically set the correctable error threshold.
[0198] In another aspect, the present application further provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, the correctable error threshold setting method provided by the above methods is implemented, and the method includes:
[0199] Get the initial values of the maximum interrupt duration, operation cycle, and correctable error thresholds for different hardware types. Use the initial values as the current thresholds, and ensure that the operation cycle is greater than the maximum interrupt duration.
[0200] Interruption detection: When it is detected that the current interruption is a correctable error interruption, the interruption dwell time is accumulated in the current interruption to obtain the interruption dwell accumulated time.
[0201] Threshold update: Based on the operation cycle, or the combination of the maximum duration of the interruption and the cumulative duration of the interruption, the threshold update condition is determined, and when the threshold update condition is met, a new threshold is determined based on the current threshold of at least one hardware type, and when the cumulative duration of the interruption is greater than the maximum duration of the interruption within the current threshold update cycle, the new threshold is greater than the current threshold; or when the operation cycle is greater than the time difference, the new threshold is greater than the current threshold, and the time difference is the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the starting moment, and the starting moment is the moment when a correctable error interruption is first detected within each threshold update cycle, the correctable error threshold of at least one hardware type is updated to the new threshold, and the cumulative duration of the interruption is reset.
[0202] The interrupt detection and threshold update steps are performed cyclically to dynamically set the correctable error threshold.
[0203] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0204] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.
[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for setting a correctable error threshold, characterized in that: include: Get the initial values of the maximum interrupt duration, operation cycle, and correctable error thresholds of different hardware types, and use the initial values as the current thresholds; Interruption detection: in response to detecting that the current interruption is a correctable error interruption, accumulating the interruption stay time in the current interruption to obtain the interruption stay accumulated time; Threshold update: based on the operation cycle, or a combination of the maximum duration of the interruption and the cumulative duration of the interruption, determine a threshold update condition, and in response to reaching the threshold update condition, determine a new threshold based on the current threshold of at least one hardware type, so that in the current threshold update cycle, when the cumulative duration of the interruption is greater than the maximum duration of the interruption, the new threshold is greater than the current threshold; or in response to the operation cycle being greater than the time difference, the new threshold is greater than the current threshold, the time difference being the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the start moment, the start moment being the moment when a correctable error interruption is first detected in each threshold update cycle, update the correctable error threshold of at least one hardware type to the new threshold, and reset the cumulative duration of the interruption; and The interruption detection and threshold updating steps are executed cyclically to dynamically set the correctable error threshold.
2. The correctable error threshold setting method according to claim 1, characterized in that: The step of updating the threshold value comprises: In response to the preset timer timing reaching the operation cycle, determining that the threshold update condition is reached, and entering a timer interrupt, wherein the timer is set when a correctable error interrupt is detected for the first time in each operation cycle, and starts timing; Determine the new threshold based on the maximum duration of the interruption, the cumulative duration of the interruption, and the current threshold of at least one hardware type, and update the correctable error threshold of at least one hardware type to the new threshold; and Reset the interruption dwell accumulated duration and exit the timer interruption.
3. The correctable error threshold setting method according to claim 2, characterized in that: Determining the new threshold based on the longest duration of the interruption, the cumulative duration of the interruption, and the current threshold of at least one hardware type includes: The new threshold is determined according to the ratio of the cumulative duration of the interruption stay to the longest duration of the interruption stay and the current threshold of at least one hardware type.
4. The correctable error threshold setting method according to claim 3, characterized in that: Determining the new threshold according to the ratio of the cumulative duration of the interruption stay to the longest duration of the interruption stay and the current threshold of at least one hardware type includes: determining the new threshold N' according to the following formula: Among them, N represents the current threshold, DT represents the cumulative duration of the interruption, and BST represents the maximum duration of the interruption. Indicates a round-up operation.
5. The correctable error threshold setting method according to claim 1, characterized in that: The step of updating the threshold value comprises: In the current interruption, comparing the cumulative duration of the interruption with the maximum duration of the interruption; In response to the interruption accumulated duration being greater than or equal to the interruption maximum duration, determining that the threshold update condition is met, executing the following steps, otherwise, exiting the current interruption; Determine the time difference between the current time and the start time, wherein the start time is the time when the correctable error interrupt is first detected in each threshold update period; determining the new threshold based on the time difference, the operating cycle, and the current threshold of at least one hardware type, and updating the correctable error threshold of at least one hardware type to the new threshold; and Reset the cumulative duration of the interruption and exit the current interruption.
6. The correctable error threshold setting method according to claim 5, characterized in that: Determining the new threshold based on the time difference, the operating cycle, and the current threshold of at least one hardware type includes: The new threshold is determined based on a ratio of the operating period to the time difference and the current threshold of at least one hardware type.
7. The method for setting a correctable error threshold according to claim 6, wherein: Determining the new threshold based on the ratio of the operating cycle to the time difference and the current threshold of at least one hardware type includes: determining the new threshold N' according to the following formula: Where N represents the current threshold, TT represents the operation cycle, and ΔT represents the time difference. Indicates a round-up operation.
8. The correctable error threshold setting method according to claim 1, characterized in that: In response to the new threshold exceeding a preset upper threshold value, correctable error interruption is stopped.
9. The correctable error threshold setting method according to claim 1, characterized in that: The correctable errors include at least two hardware-type correctable errors; The interrupt detection step further includes: in the current interrupt, counting the correctable error interrupts according to the hardware type to which they belong, to obtain error interrupt counts of various types of hardware; The step of updating the threshold value comprises: In response to the preset timer timing reaching the operation cycle, determining that the threshold update condition is reached, and entering a timer interrupt, wherein the timer is set when a correctable error interrupt is detected for the first time in each operation cycle, and starts timing; Comparing the cumulative duration of the interruption and the longest duration of the interruption and In response to the cumulative duration of the interruption being greater than or equal to the maximum duration of the interruption, a correctable error threshold corresponding to the hardware type with the largest error interruption count is screened out as the target current threshold, a target new threshold is determined based on the maximum duration of the interruption, the cumulative duration of the interruption and the target current threshold, and the target current threshold is updated as the target new threshold; In response to the cumulative duration of the interruption stay being less than the maximum duration of the interruption stay, screening out a correctable error threshold corresponding to the hardware type with the smallest error interruption count as the target current threshold, determining a target new threshold based on the maximum duration of the interruption stay, the cumulative duration of the interruption stay and the target current threshold, and updating the target current threshold to the target new threshold; and Reset the interruption accumulative duration and the error interruption counts of various hardware, and exit the timer interruption.
10. The method for setting a correctable error threshold according to claim 9, characterized in that: Determining a new target threshold based on the longest interruption stay duration, the cumulative interruption stay duration, and the target current threshold includes: The target new threshold is determined according to the ratio of the cumulative duration of the interruption stay to the longest duration of the interruption stay and the target current threshold.
11. The method for setting a correctable error threshold according to claim 10, characterized in that: According to the ratio of the accumulated duration of the interruption stay to the longest duration of the interruption stay and the current target threshold, the target new threshold is determined, including: determining the target new threshold N'' according to the following formula: Among them, N″ represents the current target threshold, DT represents the cumulative duration of interruption, and BST represents the maximum duration of interruption. Indicates a round-up operation.
12. The correctable error threshold setting method according to claim 1, characterized in that: The correctable errors include at least two hardware-type correctable errors; The interrupt detection step further includes: in the current interrupt, counting the correctable error interrupts according to the hardware type to which they belong, to obtain error interrupt counts of various types of hardware; The step of updating the threshold value comprises: In the current interruption, comparing the cumulative duration of the interruption with the maximum duration of the interruption; In response to the interruption accumulated duration being greater than or equal to the interruption maximum duration, determining that the threshold update condition is met, executing the following steps, otherwise, exiting the current interruption; Determine the time difference between the current time and the start time, wherein the start time is the time when the correctable error interrupt is first detected in each threshold update period; comparing the operating period and the time difference; In response to the condition that the operation cycle is greater than or equal to the time difference, screening out a correctable error threshold corresponding to the hardware type with the largest error interrupt count as the target current threshold, determining a target new threshold based on the time difference, the operation cycle and the target current threshold, and updating the target current threshold to the target new threshold; In response to the operating cycle being less than the time difference, screening out a correctable error threshold corresponding to the hardware type with the smallest error interrupt count as the target current threshold, determining a target new threshold based on the time difference, the operating cycle and the target current threshold, and updating the target current threshold to the target new threshold; and Reset the cumulative duration of the interruption and the error interruption counts of various hardware, and exit the current interruption.
13. The method for setting a correctable error threshold according to claim 12, characterized in that: Determining a target new threshold based on the time difference, the operation cycle and the target current threshold includes: The target new threshold is determined based on a ratio of the operation period to the time difference and the target current threshold.
14. The method for setting a correctable error threshold according to claim 13, characterized in that: Determining the target new threshold based on the ratio of the operation cycle to the time difference and the target current threshold includes: determining the target new threshold N'' according to the following formula: Where N" represents the current threshold of the target, TT represents the operation cycle, and ΔT represents the time difference. Indicates a round-up operation.
15. The method for setting a correctable error threshold according to any one of claims 9 to 14, characterized in that: When the target new threshold exceeds a preset upper threshold value, a hardware-type correctable error interrupt corresponding to the target new threshold is stopped.
16. The method for setting a correctable error threshold according to any one of claims 1 to 14, characterized in that: The initial value of the correctable error threshold is 1-10.
17. The method for setting a correctable error threshold according to any one of claims 1 to 14, characterized in that: In the step of cyclically executing the interruption detection and threshold value updating, it also includes: receiving a user's modified value for at least one of the maximum interruption stay time and the operation cycle.
18. A correctable error threshold setting device, characterized in that: include: A parameter acquisition module is used to obtain the initial values of the maximum duration of interruption, the operation cycle and the correctable error threshold of different hardware types, and use the initial values as the current threshold; An interruption detection module, configured to, in response to detecting that the current interruption is a correctable error interruption, accumulate the interruption dwell time in the current interruption to obtain the interruption dwell accumulated time; and A threshold update module is used to determine a threshold update condition based on the operation cycle, or a combination of the maximum duration of the interruption and the cumulative duration of the interruption, and in response to reaching the threshold update condition, determine a new threshold based on the current threshold of at least one hardware type, so that in the current threshold update cycle, when the cumulative duration of the interruption is greater than the maximum duration of the interruption, the new threshold is greater than the current threshold; or in response to the operation cycle being greater than a time difference, the new threshold is greater than the current threshold, the time difference being the time difference between the moment when the cumulative duration of the interruption is greater than or equal to the maximum duration of the interruption and the starting moment, the starting moment being the moment when a correctable error interruption is first detected in each threshold update cycle, update the correctable error threshold of at least one hardware type to the new threshold, and reset the cumulative duration of the interruption.
19. An electronic device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the correctable error threshold setting method according to any one of claims 1 to 17 is implemented.
20. A non-transitory computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the correctable error threshold setting method according to any one of claims 1 to 17 is implemented.
Citation Information
Patent Citations
Error correction method and apparatus
CA1222558A
Predicting degradation of a communication channel below a threshold based on data transmission errors
CN101317354A
Method for dynamically adjusting memory monitoring threshold value
CN105589789A
Correctable error processing method, device and equipment and readable storage medium
CN115543677A
Error processing method and device, electronic equipment and storage medium
CN115729742A