CN107315700B - Interrupt processing method and related device - Google Patents

Interrupt processing method and related device Download PDF

Info

Publication number
CN107315700B
CN107315700B CN201610269253.8A CN201610269253A CN107315700B CN 107315700 B CN107315700 B CN 107315700B CN 201610269253 A CN201610269253 A CN 201610269253A CN 107315700 B CN107315700 B CN 107315700B
Authority
CN
China
Prior art keywords
interrupt
load information
control parameter
interrupt control
host device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610269253.8A
Other languages
Chinese (zh)
Other versions
CN107315700A (en
Inventor
应勤
鲍延胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610269253.8A priority Critical patent/CN107315700B/en
Priority to CN202011282493.4A priority patent/CN112347013A/en
Publication of CN107315700A publication Critical patent/CN107315700A/en
Application granted granted Critical
Publication of CN107315700B publication Critical patent/CN107315700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/24Interrupt
    • G06F2213/2412Dispatching of interrupt load among interrupt handlers in processor system or interrupt controller

Abstract

The invention discloses an interrupt processing method which is used for improving the performance and the efficiency of a computer system. The method provided by the invention comprises the following steps: the host equipment acquires first load information of the host equipment, acquires second load information of the IO equipment, and then adjusts an interrupt control parameter of the IO equipment according to the first load information and the second load information. By the method, the interrupt control parameter of the IO device can be dynamically adjusted according to the load states of the host device and the IO device, so that the value of the interrupt control parameter conforms to the actual running state of the computer system, and the purpose of improving the performance and efficiency of the computer system is further achieved. The invention also provides a relevant interrupt processing device and a computing device.

Description

Interrupt processing method and related device
Technical Field
The present invention relates to the field of data processing, and in particular, to an interrupt processing method and related devices.
Background
A computer system generally includes a host device, a user device, and an IO device connecting the host device and the user device. When executing various applications, the user equipment may send an interrupt request to an Operating System (OS) of the host device from time to apply for an interrupt. A Central Processing Unit (CPU) of the host device needs to switch threads to process an interrupt, which consumes a large amount of computer resources and affects the overall performance of the computer system.
In order to reduce the computational burden of the host device in processing the interrupt, the current technology integrates the interrupt request sent by the user device through an input/output (IO) device. Specifically, the user equipment sends an interrupt request to the IO equipment to apply for interrupt, and the IO equipment reports interrupt to the host equipment when the number of times of the received interrupt request reaches a preset interrupt number, or when the duration of the received interrupt request reaches a preset interrupt duration. Therefore, the interruption frequency of the host equipment for processing the user equipment can be reduced, the computer resource is saved, and the performance of the computer system is improved.
However, the actual scene of the computer system is constantly changing, and no matter how many the IO device sets the preset interrupt times and the preset interrupt duration, it cannot be guaranteed that all application scenes are satisfied. Therefore, the computer system at the present stage is very easy to find in a complex and changeable application scene, and cannot achieve the satisfactory business processing efficiency of the user.
Disclosure of Invention
The invention provides an interrupt processing method, a related device and computing equipment, which are used for improving the performance of a computer system.
The invention provides an interrupt processing method, which is suitable for host equipment in a computer system. The computer system further comprises user equipment and IO equipment, wherein the IO equipment is used for receiving interrupt requests of the user equipment and reporting interrupts to the host equipment when the number of the received interrupt requests reaches a preset reporting number of times or a preset reporting time length is passed after the interrupt requests are received. The host equipment acquires first load information of the host equipment, and further acquires the load state of the host equipment and the load state of the IO equipment; the host device also obtains second load information of the IO device, and further obtains the load state of the IO device. And then the host device adjusts the interrupt control parameters of the IO device according to the first load information and the second load information. The interruption control parameter may include a preset reporting time and/or a preset reporting duration. By the method, the interrupt control parameters of the IO equipment can be dynamically adjusted according to the load states of the host equipment and the IO equipment, so that the values of the interrupt control parameters conform to the actual running state of the computer system, and the performance and the efficiency of the computer system are improved.
Optionally, if the first load information reaches the first threshold and the second load information does not reach the second threshold, it indicates that the host device is overloaded and the IO device is not overloaded, and the host device may increase the interrupt control parameter, specifically, may increase one or more of the preset reporting times and the preset reporting duration, so as to reduce the load of the host device.
Optionally, if the second load information reaches the second threshold and the first load information does not reach the first threshold, it indicates that the IO device is overloaded but the host device is not overloaded, and the host device may decrease the interrupt control parameter, specifically decrease one or more of the preset reporting times and the preset reporting duration, so as to reduce the load of the IO device.
Optionally, the first load information may specifically include one or more of parameters such as a CPU utilization of the host device, a memory occupancy of the host device, and an IO rate of the host device, and may further include other parameters, and may be calculated from one or more of the parameters, so as to describe the load state of the host device in various aspects.
Optionally, the second load information may be parameters related to the IO, and specifically may include one or more of parameters such as a depth of an IO queue to be processed by the IO device, a number of IO queues to be processed by the IO device, and a total number of the IO queues to be processed by the IO device. In addition, the second load information may further include other parameters, such as a CPU usage rate of the IO device, a memory occupancy rate of the IO device, or other parameters, and may be calculated from one or more parameters to describe a load state of the IO device in various aspects.
Alternatively, the first threshold and the second threshold may be set by the host device, for example, the host device may determine the first threshold and the second threshold according to an input instruction of a user, or determine the first threshold and the second threshold through a data mining method, or determine empirical values of the first threshold and the second threshold according to historical data of the host device.
Optionally, the amplitude of the interrupt control parameter does not exceed 20% each time the interrupt control parameter is adjusted up or down, so as to ensure the stability of the computer system.
A second aspect of the present invention provides an interrupt processing apparatus, which is suitable for a host device in a computer system. The interrupt processing apparatus may specifically include: the first obtaining module is used for obtaining first load information of the host equipment; the second obtaining module is used for obtaining second load information of the IO equipment; and the parameter adjusting module is used for adjusting the interrupt control parameters of the IO device according to the first load information and/or the second load information, wherein the interrupt control parameters comprise preset reporting times and/or preset reporting duration. Because the parameter adjusting module dynamically adjusts the interrupt control parameter of the IO device according to the load states of the host device and the IO device, the value of the interrupt control parameter can accord with the actual running state of the computer system, and the performance and the efficiency of the computer system are favorably improved.
Optionally, the parameter adjusting module is specifically configured to: and when the first load information reaches the first threshold value and the second load information does not reach the second threshold value, increasing one or more of the preset reporting times and the preset reporting duration to reduce the load of the host equipment.
Optionally, the parameter adjusting module is further configured to: and when the second load information reaches the second threshold and the first load information does not reach the first threshold, reducing one or more of the preset reporting times and the preset reporting duration so as to reduce the load of the IO device.
Optionally, the first load information may specifically include one or more of parameters such as a CPU utilization of the host device, a memory occupancy of the host device, and an IO rate of the host device, and may further include other parameters, and may be calculated from one or more of the parameters, so as to describe the load state of the host device in various aspects.
Optionally, the second load information may be parameters related to the IO, and specifically may include one or more of parameters such as a depth of an IO queue to be processed by the IO device, a number of IO queues to be processed by the IO device, and a total number of the IO queues to be processed by the IO device. In addition, the second load information may further include other parameters, such as a CPU usage rate of the IO device, a memory occupancy rate of the IO device, or other parameters, and may be calculated from one or more parameters to describe a load state of the IO device in various aspects.
Optionally, the interrupt processing apparatus further includes a parameter determining module, configured to determine the first threshold and the second threshold according to an input instruction of a user, or determine the first threshold and the second threshold through a data mining method, or determine empirical values of the first threshold and the second threshold according to historical data of the host device.
Optionally, the amplitude of each up-regulation or down-regulation interruption control parameter of the parameter regulation module does not exceed 20%.
A third aspect of the invention provides a computing device comprising a processor, a memory, a communication interface, and a bus. Wherein, the processor is used for executing the interrupt processing method provided by the first aspect of the present invention by calling the instruction stored in the memory.
Drawings
FIG. 1 is a basic architecture diagram of a computer system;
fig. 2 is a flowchart of an embodiment of an interrupt processing method according to the present invention;
FIG. 3 is a block diagram of an embodiment of an interrupt processing apparatus according to the present invention;
fig. 4 is a block diagram of an embodiment of a computing device according to an embodiment of the present invention.
Detailed Description
The invention provides an interrupt processing method which is used for improving the performance of a computer system. The invention also provides a relevant interrupt processing device, a computing device and a host device, which are respectively described below.
Referring to fig. 1, a basic architecture of a computer system mainly includes a host device and a user device. The computer system can further comprise IO equipment, wherein the IO equipment comprises an equipment access channel connected with the user equipment, and an IO access interface connected with the host equipment, and can assist the host equipment in data interaction with the user equipment.
In order to implement data interaction between the host device and the user device, the IO device further includes a Direct Memory Access (DMA) module, a storage module, and a control module. The DMA module is used for carrying IO commands and IO data of the host equipment side and returning IO processing results to the host equipment; the storage module is mainly used for buffering the IO command and the IO data, and can be particularly served by storage media such as a memory and the like; the control module is mainly used for processing the IO command and the IO data, and can be specifically acted by a processor such as a CPU.
In a computer system, when various applications are executed by a user device on a bottom layer, an interrupt request is sent to an OS of a host device from time to apply for an interrupt. The number of interrupts generated by IO-intensive computer systems is particularly high. When a new interrupt occurs, the CPU of the host device needs to switch threads to process the interrupt, which consumes a large amount of computer resources and seriously affects the overall performance of the computer system.
In order to reduce the computational burden of the host device in handling interrupts, in the current technology, an interrupt register is provided in the IO device, and at least two interrupt control parameters are set in the interrupt register: presetting reporting times and presetting reporting duration. The IO device starts counting and starts timing after receiving the interrupt request sent by the user device for the first time, and then adds 1 to the count each time the interrupt request sent by the user device is received. If the count of the interruption times reaches the preset reporting times, the IO device reports an interruption to the host device; in addition, if the timing time reaches the preset reporting time, the IO device also reports an interrupt to the host device no matter whether the interrupt frequency reaches the preset reporting frequency, in order to avoid application death and the like on the user device side. After the IO device reports the interrupt to the host device, the counting and timing in the interrupt register are reset to wait for the next interrupt request of the user device side.
As can be seen from the discussion in the previous paragraph, the interrupts reported by the user equipment are integrated by the interrupt register, so that the number of times that the host device processes the interrupts of the user equipment can be reduced. Therefore, reasonably setting the interrupt control parameters of the interrupt register has important significance for improving the performance of the computer system. However, the actual scene of the computer system is constantly changing, and the interrupt control parameter of the IO device cannot guarantee to satisfy all application scenes. For example, in a low IO scenario, the ue side may report an interrupt at a long interval, at this time, the interrupt control parameter needs to be set to be smaller, otherwise, the reported interrupt may need to wait for a preset reporting duration before being processed, and the real-time performance of the system is poor. In a high IO scenario, the interrupt frequently occurs, and at this time, the interrupt control parameter needs to be set to be larger, otherwise, the host device still needs to frequently process the interrupt, which causes the performance of the computer system to be greatly reduced, and affects the efficiency of service processing. Therefore, the computer system at the present stage is very easy to find in a complex and changeable application scene, and cannot achieve the satisfactory business processing efficiency of the user.
In order to cope with complex and variable application scenes and improve the service processing efficiency of a computer system, the invention provides an interrupt processing method, which is applied to a host device. Referring to fig. 2, the basic flow of the interrupt processing method includes:
201. acquiring first load information of host equipment;
the host device obtains first load information of itself, where the first load information is used to indicate a load state of the host device, and may specifically include one or more of parameters such as a CPU usage rate of the host device, a memory occupancy rate of the host device, and an IO rate of the host device, and may also include other parameters, and may also be calculated from one or more parameters, which is not limited herein.
202. Acquiring second load information of the IO equipment;
the host device obtains second load information of the IO device, where the second load information is used to indicate a load state of the IO device. Because the IO device is mainly used for data interaction between the host device and the user device, the second load information should be parameters related to IO, and specifically may include one or more of parameters such as a depth of an IO queue to be processed by the IO device, a number of IO queues to be processed by the IO device, and a total number of IO to be processed by the IO device. In addition, the second load information may further include other parameters, such as a CPU usage rate of the IO device, a memory occupancy rate of the IO device, or other parameters, which is not limited herein.
203. And adjusting the interrupt control parameters of the IO equipment according to the first load information and the second load information.
And the host equipment adjusts the interrupt control parameters of the IO equipment according to the acquired first load information and the second load information. The interruption control parameter may include the preset reporting times and/or the preset reporting duration. Optionally, the interrupt control parameter may be set in an interrupt register of the IO device, or may be set in another module of the IO device, which is not limited herein.
The embodiment provides an interrupt processing method, wherein a host device obtains first load information of the host device, obtains second load information of an IO device, and then adjusts an interrupt control parameter of the IO device according to the first load information and the second load information. By the method, the interrupt control parameters of the IO equipment can be dynamically adjusted according to the load states of the host equipment and the IO equipment, so that the values of the interrupt control parameters conform to the actual running state of the computer system, and the performance and the efficiency of the computer system are improved.
The first load information is used for representing the load state of the host device, so that whether the host device is overloaded can be determined through the first load information. Thus, optionally, the host device may be preset with a first threshold value, which may be understood as a critical value for overloading the host device. Under the scene that the larger the value of the first load information is, the larger the load of the host device is, if the first load information reaches the first threshold, the host device is considered to be overloaded. Under the scene that the smaller the value of the first load information is, the larger the load of the host device is, if the first load information is smaller than the first threshold, the host device is considered to be overloaded. Based on the same principle as that of judging whether the host device is overloaded, a second threshold value can be preset in the host device, and whether the IO device is overloaded can be determined by comparing the second load information with the second threshold value.
The load states of the host device and the IO device are introduced above, and the influence of adjusting the interrupt control parameter of the IO device on the load states of the host device and the IO device will be analyzed below. Since it has been mentioned in the above discussion that the interruption control parameter may include the preset reporting time and/or the preset reporting duration, the following discussion will be made for the two interruption control parameters, respectively.
(1) For the preset reporting times, if the preset reporting times are adjusted up, the IO device triggers an operation of reporting an interrupt to the host device once after receiving interrupt requests reported by more user devices. Thus, the number of times of processing interruption by switching threads by the host device can be reduced, and the load of the host device can be reduced. Meanwhile, the preset reporting times are adjusted upwards, which inevitably results in the increase of the depth of the IO queue to be processed by the IO device, which is equivalent to the increase of the load of the IO device.
Similarly, if the preset reporting times are adjusted downward, the load of the host device is increased, but the load of the IO device can be reduced.
(2) For the preset reporting duration, if the preset reporting duration is adjusted up, the IO device triggers one reporting interruption operation to the host device after the timing reaches a longer time period. Thus, the number of times of processing interruption by switching threads by the host device can be reduced, and the load of the host device can be reduced. Meanwhile, the preset reporting time length is adjusted upwards, which inevitably causes the depth of the IO queue waiting on the IO device side to increase, which is equivalent to the increase of the load of the IO device.
Similarly, if the preset reporting duration is adjusted downward, the load of the host device is increased, but the load of the IO device can be reduced.
On the premise that the influence of the interrupt control parameters on the load state of the device is analyzed above, the method for adjusting the interrupt control parameters according to the load information of the device in step 203 can be further refined. Specifically, the method comprises the following steps:
(A) if the first load information reaches the first threshold value and the second load information does not reach the second threshold value, it indicates that the host device is overloaded and the IO device is not overloaded, and the host device may increase the interrupt control parameter, specifically, may increase one or more of the preset reporting times and the preset reporting duration.
However, since increasing the interrupt control parameter may increase the load of the IO device, the host device should increase the interrupt control parameter by a reasonable magnitude to ensure that the second load information does not reach the second threshold, i.e., to ensure that the IO device is not overloaded.
(B) If the second load information reaches the second threshold and the first load information does not reach the first threshold, it indicates that the IO device is overloaded but the host device is not overloaded, and the host device may decrease the interrupt control parameter, specifically, may decrease one or more of the preset reporting times and the preset reporting duration.
However, since reducing the interrupt control parameter increases the load of the host device, the host device should reduce the interrupt control parameter by a reasonable amount to ensure that the first load information does not reach the first threshold, i.e., to ensure that the host device is not overloaded.
If the adjustment range of the interrupt control parameter is too large, a large impact may be caused on the stability of the system. Thus, optionally, the magnitude of the interruption control parameter should not exceed 20% per up-or down-regulation.
Optionally, if the first load information reaches the first threshold and the second load information reaches the second threshold, it indicates that both the host device and the IO device are overloaded, and at this time, the host device may balance how to adjust the interrupt control parameter according to the overload conditions of the host device and the IO device, and may also maintain the original interrupt control parameter unchanged, which is not limited herein.
It is worth noting that in a busy state of the computer system, the user equipment frequently generates interrupt requests. The IO device often receives an interrupt request with a preset reporting frequency when the timing does not reach the preset reporting time, and triggers an operation of reporting the interrupt to the host device. In such a scenario, the preset reporting time length is adjusted by a small margin, so that the load state of the host device or the IO device is not significantly changed, and therefore the host device can preferentially adjust the preset reporting times.
In the idle state of the computer system, the number of interrupt requests generated by the user equipment within the preset reporting time period does not reach the preset reporting times, and the operation of reporting interrupts to the host equipment is often triggered because the timing reaches the preset reporting time period. In this scenario, the IO queue to be processed by the IO device is shallow, and on this basis, reasonably increasing the preset reporting duration can increase the depth of the IO queue, but the IO device can still be ensured not to be overloaded, and the load of the host device can be greatly reduced. Therefore, in the idle scene of the system, the lower regulation of the preset reporting time has better practical significance.
The present application does not limit the sequence between step 201 and step 202, and step 202 may be executed before step 201. Alternatively, the computer system may give priority to the load state of the host device, that is, step 201 is executed to acquire the first load information of the host device, and when the acquired first load information reaches the first threshold, it is determined that the interrupt control parameter of the IO device needs to be adjusted, so that the operation of acquiring the second load information in step 202 is triggered.
Optionally, the first threshold and the second threshold may be set by the IO device by default, or set by the user, or set by the host device. For example, the first threshold and the second threshold may be determined according to an input instruction of a user, or the first threshold and the second threshold may be determined by a data mining method, or empirical values of the first threshold and the second threshold may be determined according to historical data of the host device, or the first threshold and the second threshold may be determined by other methods, which is not limited herein.
Optionally, in order to facilitate interactive management with the IO device, an IO driver may be further configured in the host device, so as to implement operations of obtaining second load information of the IO device and adjusting an interrupt control parameter of the IO device. Specifically, the OS of the host device determines to adjust the interrupt control parameter, and issues a parameter adjustment instruction to the IO driver. And after receiving the parameter adjusting instruction, the IO driver acquires the currently completed and unfinished IO of the IO equipment. The IO driver stores the current unfinished IO, and then adjusts the interrupt control parameters of the IO equipment according to the parameter adjusting instruction issued by the host equipment. And after the adjustment of the interrupt control parameters is finished, the IO drive controls the IO device to execute unfinished IO again.
The present invention further provides an interrupt processing apparatus, which may be a functional module or an integrated component disposed in the host device, or may be the host device itself, and is not limited herein. The interrupt processing apparatus executes the interrupt processing method described in the embodiment shown in fig. 2 at run time. Referring to fig. 3, the basic structure of the interrupt processing apparatus includes:
a first obtaining module 301, configured to obtain first load information of a host device;
a second obtaining module 302, configured to obtain second load information of the IO device;
and the parameter adjusting module 303 is configured to adjust the interrupt control parameter of the IO device according to the first load information and/or the second load information.
The embodiment provides an interrupt processing method, wherein a first obtaining module 301 obtains first load information of itself, a second obtaining module 302 obtains second load information of an IO device, and a parameter adjusting module 303 adjusts an interrupt control parameter of the IO device according to the first load information and the second load information. By the method, the interrupt processing device can dynamically adjust the interrupt control parameters of the IO equipment according to the load states of the host equipment and the IO equipment, so that the values of the interrupt control parameters conform to the actual running state of the computer system, and the performance and the efficiency of the computer system are improved.
Optionally, the parameter adjusting module 303 may specifically increase the interrupt control parameter of the IO device when the first load information reaches the first threshold and the second load information does not reach the second threshold; and/or when the first load information does not reach the first threshold and the second load information reaches the second threshold, reducing the interrupt control parameter of the IO device.
Optionally, the first load information is used to indicate a load state of the host device, and may specifically include one or more of parameters such as a CPU usage rate of the host device, a memory occupancy rate of the host device, and an IO rate of the host device.
Optionally, the second load information is used to indicate a load state of the IO device, and may specifically include one or more of parameters such as a depth of an IO queue to be processed by the IO device, a number of IO queues to be processed by the IO device, a total number of IO to be processed by the IO device, a CPU usage rate of the IO device, and a memory occupancy rate of the IO device.
Optionally, the interrupt processing apparatus may further include an optional module: the parameter determining module 304 is configured to determine the first threshold and/or the second threshold, and specifically, may determine the first threshold and the second threshold according to an input instruction of a user, or determine the first threshold and the second threshold through a data mining method, or determine empirical values of the first threshold and the second threshold according to historical data of the host device, or may determine the first threshold and the second threshold through other methods.
Optionally, the parameter adjusting module 303 adjusts the amplitude of the interrupt control parameter of the IO device at each time, where the amplitude does not exceed 20% of the interrupt control parameter of the IO device.
The operation method of the interrupt processing apparatus shown in fig. 3 may refer to the related description of the interrupt processing method shown in fig. 2, which is not described herein again.
An embodiment of the present invention further provides a computing device 400, and the interrupt processing apparatus shown in fig. 3 can be implemented by the computing device 400. Referring to fig. 4, the specific structure of the computing device 400 mainly includes a processor 401, a memory 402, a communication interface 403, and a bus 404. The processor 401, the memory 402, and the communication interface 403 may be connected to each other by a bus 404, or may communicate with each other by other means such as wireless transmission.
The memory 402 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (ROM), such as a read-only memory (ROM), a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD); the memory 402 may also comprise a combination of memories of the kind described above. When the technical solution provided by the present invention is implemented by software, a program code for implementing the interrupt processing method provided by the present invention may be stored in the memory 402 and executed by the processor 401.
The computing device 400 obtains second load information of the IO device through the communication interface 404, and adjusts an interrupt control parameter of the IO device through the communication interface 404.
The processor 401 may be any one or a combination of several kinds of hardware units having a processing function, such as a CPU, a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP), a field-programmable gate array (FPGA), and a hardware chip. The processor 401 is mainly configured to obtain first load information of the host device and second load information of the IO device, and then determine how to adjust the interrupt control parameter according to the first load information and the second load information. The specific adjustment method may refer to the related description in the interrupt processing method shown in fig. 2, and is not described herein again.
The present invention further provides a host device, which may specifically include the interrupt processing apparatus shown in fig. 3, or the computing device shown in fig. 4.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. An interrupt processing method, adapted to a host device in a computer system, the computer system further including a user device and an input/output (IO) device, the interrupt processing method comprising:
acquiring first load information of the host device;
acquiring second load information of the IO equipment; the IO device is used for assisting the host device to perform data interaction with the user device;
adjusting an interrupt control parameter of the IO device according to the first load information and the second load information, wherein the interrupt control parameter includes a preset reporting frequency and/or a preset reporting duration; or, according to the second load information, adjusting an interrupt control parameter of the IO device, where the interrupt control parameter includes a preset reporting frequency and/or a preset reporting duration;
wherein the IO device is configured to: and receiving the interrupt request of the user equipment, and reporting the interrupt to the host equipment after the number of the received interrupt requests reaches the preset reporting times and/or after the time length of the received interrupt requests reaches the preset reporting time length.
2. The interrupt processing method according to claim 1, wherein the adjusting the interrupt control parameter of the IO device according to the first load information and the second load information includes:
if the first load information reaches a first threshold value and the second load information does not reach a second threshold value, increasing an interrupt control parameter of the IO device;
and/or if the first load information does not reach the first threshold value and the second load information reaches the second threshold value, reducing the interrupt control parameter of the IO device.
3. The interrupt processing method according to claim 1 or 2, wherein the first load information includes:
a Central Processing Unit (CPU) utilization rate of the host device;
and/or, a memory occupancy rate of the host device;
and/or an IO rate of the host device.
4. The interrupt processing method of claim 1, wherein the second load information comprises:
the depth of the IO queue to be processed by the IO device;
and/or the total number of IO to be processed by the IO device;
and/or the CPU utilization rate of the IO equipment;
and/or the memory occupancy rate of the IO device.
5. The interrupt processing method of claim 2, further comprising:
determining the first threshold value and/or the second threshold value by a data mining method;
and/or, according to an input instruction of a user, determining the first threshold and/or the second threshold;
and/or determining empirical values for the first threshold and/or the second threshold based on historical data for the host device.
6. The interrupt processing method according to claim 1, wherein, when the operation of adjusting the interrupt control parameter of the IO device is performed, an amplitude of the interrupt control parameter of the IO device is adjusted to be not more than 20% of the interrupt control parameter of the IO device.
7. An interrupt handling apparatus, adapted to a host device in a computer system, the computer system further including a user device and an input/output (IO) device, the interrupt handling apparatus comprising:
the first obtaining module is used for obtaining first load information of the host equipment;
the second obtaining module is used for obtaining second load information of the IO equipment; the IO device is used for assisting the host device to perform data interaction with the user device;
the parameter adjusting module is configured to adjust an interrupt control parameter of the IO device according to the first load information and the second load information, where the interrupt control parameter includes a preset reporting time and/or a preset reporting duration; or, according to the second load information, adjusting an interrupt control parameter of the IO device, where the interrupt control parameter includes a preset reporting frequency and/or a preset reporting duration;
wherein the IO device is configured to: and receiving the interrupt request of the user equipment, and reporting the interrupt to the host equipment after the number of the received interrupt requests reaches the preset reporting times and/or after the time length of the received interrupt requests reaches the preset reporting time length.
8. The interrupt processing apparatus of claim 7, wherein the parameter adjustment module is specifically configured to:
if the first load information reaches a first threshold value and the second load information does not reach a second threshold value, increasing an interrupt control parameter of the IO device;
and/or if the first load information does not reach the first threshold value and the second load information reaches the second threshold value, reducing the interrupt control parameter of the IO device.
9. The interrupt processing apparatus according to claim 7 or 8, wherein the first load information includes:
a Central Processing Unit (CPU) utilization rate of the host device;
and/or, a memory occupancy rate of the host device;
and/or an IO rate of the host device.
10. The interrupt processing apparatus of claim 7, wherein the second load information comprises:
the depth of the IO queue to be processed by the IO device;
and/or the total number of IO to be processed by the IO device;
and/or the CPU utilization rate of the IO equipment;
and/or the memory occupancy rate of the IO device.
11. The interrupt handling apparatus of claim 8, further comprising a parameter determination module to:
determining the first threshold value and/or the second threshold value by a data mining method;
and/or, according to an input instruction of a user, determining the first threshold and/or the second threshold;
and/or determining empirical values for the first threshold and/or the second threshold based on historical data for the host device.
12. The interrupt processing apparatus according to claim 7, wherein the parameter adjusting module, when performing the operation of adjusting the interrupt control parameter of the IO device, adjusts an amplitude of the interrupt control parameter of the IO device to be not more than 20% of the interrupt control parameter of the IO device.
CN201610269253.8A 2016-04-27 2016-04-27 Interrupt processing method and related device Active CN107315700B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610269253.8A CN107315700B (en) 2016-04-27 2016-04-27 Interrupt processing method and related device
CN202011282493.4A CN112347013A (en) 2016-04-27 2016-04-27 Interrupt processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610269253.8A CN107315700B (en) 2016-04-27 2016-04-27 Interrupt processing method and related device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202011282493.4A Division CN112347013A (en) 2016-04-27 2016-04-27 Interrupt processing method and related device

Publications (2)

Publication Number Publication Date
CN107315700A CN107315700A (en) 2017-11-03
CN107315700B true CN107315700B (en) 2020-12-08

Family

ID=60185365

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202011282493.4A Pending CN112347013A (en) 2016-04-27 2016-04-27 Interrupt processing method and related device
CN201610269253.8A Active CN107315700B (en) 2016-04-27 2016-04-27 Interrupt processing method and related device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202011282493.4A Pending CN112347013A (en) 2016-04-27 2016-04-27 Interrupt processing method and related device

Country Status (1)

Country Link
CN (2) CN112347013A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347013A (en) * 2016-04-27 2021-02-09 华为技术有限公司 Interrupt processing method and related device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552614A (en) * 2020-04-28 2020-08-18 杭州迪普科技股份有限公司 Statistical method and device for CPU utilization rate
CN112596818B (en) * 2020-12-30 2023-12-05 上海众源网络有限公司 Application program control method, system and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6189065B1 (en) * 1998-09-28 2001-02-13 International Business Machines Corporation Method and apparatus for interrupt load balancing for powerPC processors
CN102063335A (en) * 2009-11-13 2011-05-18 大唐移动通信设备有限公司 Interrupt controller and method for processing interrupt of multi-core processor shared device
CN102779075A (en) * 2012-06-28 2012-11-14 华为技术有限公司 Method, device and system for scheduling in multiprocessor nuclear system
CN102945214A (en) * 2012-10-19 2013-02-27 北京忆恒创源科技有限公司 Method for optimizing interrupt processing task based on IO (Input-Output) delay time distribution
CN103744716A (en) * 2014-01-15 2014-04-23 上海交通大学 Dynamic interrupt balanced mapping method based on current virtual central processing unit (VCPU) scheduling state
CN105378668A (en) * 2013-06-13 2016-03-02 微软技术许可有限责任公司 Operating system-managed interrupt steering in multiprocessor systems

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6889277B2 (en) * 2002-04-18 2005-05-03 Sun Microsystems, Inc. System and method for dynamically tuning interrupt coalescing parameters
US6988156B2 (en) * 2002-04-18 2006-01-17 Sun Microsystems, Inc. System and method for dynamically tuning interrupt coalescing parameters
US20050125582A1 (en) * 2003-12-08 2005-06-09 Tu Steven J. Methods and apparatus to dispatch interrupts in multi-processor systems
US7634589B2 (en) * 2004-09-23 2009-12-15 International Business Machines Corporation Method for controlling peripheral adapter interrupt frequency by estimating processor load in the peripheral adapter
US20060064529A1 (en) * 2004-09-23 2006-03-23 International Business Machines Corporation Method and system for controlling peripheral adapter interrupt frequency by transferring processor load information to the peripheral adapter
CN101354664B (en) * 2008-08-19 2011-12-28 中兴通讯股份有限公司 Method and apparatus for interrupting load equilibrium of multi-core processor
GB2484101A (en) * 2010-09-29 2012-04-04 Nec Corp Adjusting a load threshold for use in call admission control at a node based on blocking and outage rates
CN112347013A (en) * 2016-04-27 2021-02-09 华为技术有限公司 Interrupt processing method and related device
CN207882429U (en) * 2017-11-10 2018-09-18 交通运输部天津水运工程科学研究所 A kind of pull-type black box detection system based on round basic matrix

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6189065B1 (en) * 1998-09-28 2001-02-13 International Business Machines Corporation Method and apparatus for interrupt load balancing for powerPC processors
CN102063335A (en) * 2009-11-13 2011-05-18 大唐移动通信设备有限公司 Interrupt controller and method for processing interrupt of multi-core processor shared device
CN102779075A (en) * 2012-06-28 2012-11-14 华为技术有限公司 Method, device and system for scheduling in multiprocessor nuclear system
CN102945214A (en) * 2012-10-19 2013-02-27 北京忆恒创源科技有限公司 Method for optimizing interrupt processing task based on IO (Input-Output) delay time distribution
CN105378668A (en) * 2013-06-13 2016-03-02 微软技术许可有限责任公司 Operating system-managed interrupt steering in multiprocessor systems
CN103744716A (en) * 2014-01-15 2014-04-23 上海交通大学 Dynamic interrupt balanced mapping method based on current virtual central processing unit (VCPU) scheduling state

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347013A (en) * 2016-04-27 2021-02-09 华为技术有限公司 Interrupt processing method and related device

Also Published As

Publication number Publication date
CN112347013A (en) 2021-02-09
CN107315700A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN107832126B (en) Thread adjusting method and terminal thereof
US20190258514A1 (en) I/O Request Scheduling Method and Apparatus
WO2021233261A1 (en) Multi-task dynamic resource scheduling method
US20120221730A1 (en) Resource control system and resource control method
CN110196767B (en) Service resource control method, device, equipment and storage medium
CN107315700B (en) Interrupt processing method and related device
WO2022068697A1 (en) Task scheduling method and apparatus
TW201743223A (en) Self-adaptive resource allocation method and device
US8819685B2 (en) Method and apparatus for adjusting I/O channel on virtual platform
CN107995286B (en) Automatic service starting and stopping method based on dubbo platform, server and storage medium
EP2772854A1 (en) Regulation method and regulation device for i/o channels in virtualization platform
US9880953B2 (en) Systems and methods for network I/O based interrupt steering
CN114217993A (en) Method, system, terminal device and storage medium for controlling thread pool congestion
WO2019174391A1 (en) Method and apparatus for controlling data stream in storage device, storage device, and storage medium
JP2012221340A (en) Control method, program and computer
CN112965823A (en) Call request control method and device, electronic equipment and storage medium
CN107132903B (en) Energy-saving management implementation method, device and network equipment
CN105242955A (en) Virtual machine disk input and output scheduling method and system
WO2015184612A1 (en) Resource scheduling method and apparatus
US9298652B2 (en) Moderated completion signaling
CN112214299A (en) Multi-core processor and task scheduling method and device thereof
CN112256383B (en) Method, device, equipment and medium for adjusting CPU core number of virtual machine
CN110650206B (en) IO flow control method and device in distributed storage system and storage medium
US20180309686A1 (en) Reducing rate limits of rate limiters
CN115686863A (en) Hybrid polling method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220118

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.