An interrupt processing method and related device
By obtaining the load information of the host device and IO device and dynamically adjusting the interrupt control parameters, the problem in the existing technology that the interrupt control parameters cannot adapt to complex application scenarios is solved, and the performance and efficiency of the computer system are improved.
Patent Information
- Application Number
- CN202011282493.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-04-27
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2036-04-27
AI Technical Summary
Existing computer systems cannot effectively adjust interrupt control parameters in complex and changeable application scenarios, resulting in a waste of computer resources and low business processing efficiency, and cannot meet the needs of different application scenarios.
By obtaining the load information of the host device and IO device, dynamically adjust the interrupt control parameters, such as the preset number of reports and the preset report duration, and optimize interrupt processing according to the load status to ensure that the parameters conform to the actual operating status of the computer system.
It improves the performance and efficiency of computer systems, adapts to different application scenarios, reduces the load on host devices and IO devices, and improves business processing efficiency.
Smart Images

Figure CN112347013B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to an interrupt processing method and related equipment. Background Art
[0002] 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 device will need to send an interrupt request to the operating system (OS) of the host device from time to time to apply for an interrupt. The central processing unit (CPU) of the host device needs to switch threads to handle the interrupt, which consumes a lot of computer resources and affects the overall performance of the computer system.
[0003] In order to reduce the computing burden of the host device in processing interrupts, the current technology integrates the interrupt requests sent by the user device through the input / output (IO) device. Specifically, the user device sends an interrupt request to the IO device to apply for an interrupt. When the number of interrupt requests received reaches the preset number of interrupts, or the duration of receiving the interrupt request reaches the preset interrupt duration, the IO device reports the interrupt to the host device. This can reduce the number of times the host device processes interrupts from the user device, thereby saving computer resources and improving the performance of the computer system.
[0004] However, the actual scenarios of computer systems are constantly changing. No matter how many preset interrupt times and preset interrupt durations are set by the IO device, it cannot guarantee that all application scenarios will be met. Therefore, the current computer system is stretched in the complex and changing application scenarios and cannot achieve business processing efficiency that satisfies users. Summary of the invention
[0005] The present invention provides an interrupt processing method, a related device and a computing device for improving the performance of a computer system.
[0006] The first aspect of the present invention provides an interrupt processing method, which is applicable to a host device in a computer system. The computer system also includes a user device and an IO device, and the IO device is used to receive an interrupt request from the user device, and report the interrupt to the host device when the number of interrupt requests received reaches a preset reporting number of times, or after a preset reporting time has passed after receiving the interrupt request. The host device obtains its own first load information, and then learns the load status of the host device and the load status of the IO device; the host device also obtains the second load information of the IO device, and then learns the load status of the IO device. 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 interrupt control parameters may include a preset reporting number and / or a preset reporting time. Through such a method, the interrupt control parameters of the IO device can be dynamically adjusted according to the load status of the host device and the IO device, so that the value of the interrupt control parameter conforms to the actual operating state of the computer system, thereby improving the performance and efficiency of the computer system.
[0007] Optionally, if the first load information reaches the first threshold and the second load information does not reach the second threshold, it means that the host device is overloaded but the IO device is not overloaded. The host device can increase the interrupt control parameters, specifically, increase one or more of the preset reporting times and the preset reporting duration to reduce the load on the host device.
[0008] Optionally, if the second load information reaches the second threshold and the first load information does not reach the first threshold, it means that the IO device is overloaded but the host device is not overloaded. The host device can reduce the interrupt control parameters, specifically, one or more of the preset reporting times and the preset reporting duration, to reduce the load on the IO device.
[0009] Optionally, the first load information may specifically include one or more parameters such as the CPU usage of the host device, the memory occupancy of the host device, the IO rate of the host device, etc., and may also include other parameters, and may also be calculated from one or more parameters to describe the load status of the host device from various aspects.
[0010] Optionally, the second load information may be a parameter related to IO, and specifically may include one or more of the parameters such as the depth of the IO queue to be processed by the IO device, the number of the IO queue to be processed by the IO device, the total number of IOs to be processed by the IO device, etc. In addition, the second load information may also include other parameters, such as the CPU usage rate of the IO device, the memory occupancy rate of the IO device, or other parameters, and may also be calculated from one or more parameters to describe the load status of the IO device from various aspects.
[0011] Optionally, the first threshold and the second threshold can be set by the host device. For example, the host device can determine the first threshold and the second threshold based on the user's input instructions, or determine the first threshold and the second threshold through a data mining method, or determine the empirical values of the first threshold and the second threshold based on historical data of the host device.
[0012] Optionally, the amplitude of each upward or downward adjustment of the interrupt control parameter does not exceed 20% to ensure the stability of the computer system.
[0013] The second aspect of the present invention provides an interrupt processing device, which is applicable to a host device in a computer system. The interrupt processing device may specifically include: a first acquisition module, which is used to acquire first load information of the host device; a second acquisition module, which is used to acquire second load information of the IO device; a parameter adjustment module, which is used to adjust the interrupt control parameters of the IO device according to the first load information and / or the second load information, including a preset number of reporting times and / or a preset reporting duration. Since the parameter adjustment module dynamically adjusts the interrupt control parameters of the IO device according to the load status of the host device and the IO device, the value of the interrupt control parameter can conform to the actual operating status of the computer system, which is conducive to improving the performance and efficiency of the computer system.
[0014] Optionally, the parameter adjustment module is specifically used to: when the first load information reaches a first threshold and the second load information does not reach a second threshold, increase one or more of the preset reporting times and the preset reporting duration to reduce the load of the host device.
[0015] Optionally, the parameter adjustment module is also used to: when the second load information reaches the second threshold and the first load information does not reach the first threshold, reduce one or more of the preset reporting times and the preset reporting duration to reduce the load of the IO device.
[0016] Optionally, the first load information may specifically include one or more parameters such as the CPU usage of the host device, the memory occupancy of the host device, the IO rate of the host device, etc., and may also include other parameters, and may also be calculated from one or more parameters to describe the load status of the host device from various aspects.
[0017] Optionally, the second load information may be a parameter related to IO, and specifically may include one or more of the parameters such as the depth of the IO queue to be processed by the IO device, the number of the IO queue to be processed by the IO device, the total number of IOs to be processed by the IO device, etc. In addition, the second load information may also include other parameters, such as the CPU usage rate of the IO device, the memory occupancy rate of the IO device, or other parameters, and may also be calculated from one or more parameters to describe the load status of the IO device from various aspects.
[0018] Optionally, the interrupt processing device also includes a parameter determination module, which is used to determine the first threshold and the second threshold according to the user's input instructions, or to determine the first threshold and the second threshold through a data mining method, or to determine the empirical values of the first threshold and the second threshold according to the historical data of the host device.
[0019] Optionally, the parameter adjustment module adjusts the interrupt control parameter upward or downward by no more than 20% each time.
[0020] The third aspect of the present invention provides a computing device, comprising a processor, a memory, a communication interface and a bus, wherein the processor is used to execute the interrupt processing method provided by the first aspect of the present invention by calling instructions stored in the memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is the basic architecture diagram of the computer system;
[0022] Figure 2 A flow chart of an embodiment of an interrupt processing method provided by an embodiment of the present invention;
[0023] Figure 3 A structural diagram of an embodiment of an interrupt processing device provided by an embodiment of the present invention;
[0024] Figure 4 A structural diagram of an embodiment of a computing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention provides an interrupt processing method for improving the performance of a computer system. The present invention also provides a related interrupt processing device, a computing device and a host device, which will be described below respectively.
[0026] The basic architecture of a computer system can be found in Figure 1 , mainly including host devices and user devices. The computer system may also include IO devices, which include device access channels connected to user devices and IO access interfaces connected to host devices, and can assist the host device in data exchange with user devices.
[0027] In order to realize data interaction between the host device and the user device, the IO device also needs to include a direct memory access (DMA) module, a storage module and a control module. The DMA module is used to carry the IO commands and IO data on the host device side and return the IO processing results to the host device; the storage module is mainly used to buffer the IO commands and IO data, which can be performed by storage media such as memory; the control module is mainly used to process the IO commands and IO data, which can be performed by processors such as CPU.
[0028] In a computer system, when the underlying user device is executing various applications, it will need to send interrupt requests to the host device's OS from time to time to apply for interrupts. IO-intensive computer systems generate a particularly large number of interrupts. When a new interrupt occurs, the host device's CPU needs to switch threads to handle the interrupt, which consumes a lot of computer resources and seriously affects the overall performance of the computer system.
[0029] In order to reduce the computing burden of the host device in processing interrupts, the current technology sets an interrupt register in the IO device, and at least two interrupt control parameters are set in the interrupt register: a preset number of reports and a preset reporting duration. The IO device starts counting and timing after receiving the interrupt request sent by the user device for the first time, and then increases the count by 1 each time it receives an interrupt request sent by the user device. If the count of the number of interrupts reaches the preset number of reports, the IO device reports an interrupt to the host device; in addition, if the timing time reaches the preset reporting duration, in order to avoid the application on the user device side from waiting, regardless of whether the number of interrupts reaches the preset number of reports, the IO device also reports an interrupt to the host device. After the IO device reports the interrupt to the host device, it resets the count and timing in the interrupt register and waits for the next interrupt request from the user device side.
[0030] From the discussion in the previous paragraph, it can be seen that by integrating the interrupts reported by the user device through the interrupt register, the number of times the host device handles the interrupts of the user device can be reduced. Therefore, it is of great significance to reasonably set the interrupt control parameters of the interrupt register to improve the performance of the computer system. However, the actual scenarios of the computer system are constantly changing, and the interrupt control parameters of the IO device cannot guarantee to meet all application scenarios. For example, in the low IO scenario, the user device side will report an interrupt at a long interval. At this time, the interrupt control parameters need to be set smaller, otherwise the reported interrupt often needs to wait for the preset reporting time before it can be processed, and the real-time performance of the system is not good. In the high IO scenario, interrupts occur frequently. At this time, the interrupt control parameters need to be set larger, otherwise the host device still needs to frequently handle interrupts, resulting in a significant reduction in the performance of the computer system and affecting the efficiency of business processing. Therefore, the current computer system seems to be stretched in complex and changeable application scenarios, and cannot achieve business processing efficiency that satisfies users.
[0031] In order to cope with complex and changing application scenarios and improve the business processing efficiency of computer systems, the present invention provides an interrupt processing method, which is applied to a host device. Figure 2 ,include:
[0032] 201. Obtain first load information of a host device;
[0033] The host device obtains its own first load information, wherein the first load information is used to indicate the load status of the host device, and may specifically include one or more parameters such as the CPU usage of the host device, the memory occupancy of the host device, the IO rate of the host device, etc. It may also include other parameters, and may also be calculated from one or more parameters, which are not limited here.
[0034] 202. Obtain second load information of the IO device;
[0035] The host device obtains the second load information of the IO device, wherein the second load information is used to indicate the load status of the IO device. Since the IO device is mainly used for data interaction between the host device and the user device, the second load information should be a parameter related to the IO, which may specifically include one or more of the parameters such as the depth of the IO queue to be processed by the IO device, the number of IO queues to be processed by the IO device, and the total number of IOs to be processed by the IO device. In addition, the second load information may also include other parameters, such as the CPU usage rate of the IO device, the memory occupancy rate of the IO device, or other parameters, which are not limited here.
[0036] 203. Adjust an interrupt control parameter of the IO device according to the first load information and the second load information.
[0037] The host device adjusts the interrupt control parameter of the IO device according to the first load information and the second load information obtained. The interrupt control parameter may include the preset reporting times and / or the preset reporting duration described above. Optionally, the interrupt control parameter may be set in the interrupt register of the IO device or in other modules of the IO device, which is not limited here.
[0038] This embodiment provides an interrupt processing method, wherein the host device obtains its own first load information and obtains the second load information of the IO device, and then adjusts the interrupt control parameters of the IO device according to the first load information and the second load information. Through such a method, the interrupt control parameters of the IO device can be dynamically adjusted according to the load status of the host device and the IO device, so that the value of the interrupt control parameter conforms to the actual operating status of the computer system, thereby improving the performance and efficiency of the computer system.
[0039] Among them, the first load information is used to indicate the load status of the host device, so whether the host device is overloaded can be determined by the first load information. Therefore, optionally, the host device can be preset with a first threshold, and the first threshold can be understood as a critical value for the overload of the host device. In a scenario where a larger value of the first load information indicates a larger load on the host device, if the first load information reaches the first threshold, the host device is considered to be overloaded. In a scenario where a smaller value of the first load information indicates a larger load on the host device, if the first load information is less than the first threshold, the host device is considered to be overloaded. Based on the same principle as determining whether the host device is overloaded, a second threshold can also be preset in the host device, and by comparing the second load information with the second threshold, it can be determined whether the IO device is overloaded.
[0040] The load states of the host device and the IO device are introduced above. The following will analyze the influence of adjusting the interrupt control parameters of the IO device on the load states of the host device and the IO device. Since it has been mentioned in the above discussion that the interrupt control parameters can include a preset number of reporting times and / or a preset reporting duration, the following will discuss these two interrupt control parameters separately.
[0041] (1) As for the preset reporting number, if the preset reporting number is increased, the IO device will trigger the operation of reporting the interrupt to the host device only after receiving more interrupt requests reported by user devices. In this way, the number of times the host device switches threads to handle interrupts can be reduced, thereby reducing the load of the host device. However, at the same time, increasing the preset reporting number will inevitably lead to an increase in the depth of the IO queue to be processed by the IO device, which is equivalent to increasing the load of the IO device.
[0042] Similarly, if the preset reporting times are lowered, the load on the host device will increase, but the load on the IO device can be reduced.
[0043] (2) For the preset reporting duration, if the preset reporting duration is increased, the IO device will trigger the operation of reporting the interruption to the host device only after the timing reaches a longer period of time. In this way, the number of times the host device switches threads to handle interruptions can be reduced, thereby reducing the load on the host device. However, at the same time, increasing the preset reporting duration will inevitably lead to an increase in the depth of the IO queue waiting on the IO device side, which is equivalent to increasing the load on the IO device.
[0044] Similarly, if the preset reporting time is lowered, the load on the host device will increase, but the load on the IO device can be reduced.
[0045] Based on the above analysis of the impact of the interrupt control parameters on the device load status, the method of adjusting the interrupt control parameters according to the device load information in step 203 can be further refined. Specifically:
[0046] (A) If the first load information reaches the first threshold and the second load information does not reach the second threshold, it means that the host device is overloaded but the IO device is not overloaded. The host device can increase the interrupt control parameters, specifically, one or more of the preset reporting times and the preset reporting duration can be increased.
[0047] However, since increasing the interrupt control parameter will increase the load of the IO device, the host device should increase the interrupt control parameter by a reasonable amount to ensure that the second load information does not reach the second threshold, that is, to ensure that the IO device is not overloaded.
[0048] (B) If the second load information reaches the second threshold and the first load information does not reach the first threshold, it means that the IO device is overloaded but the host device is not overloaded. The host device can reduce the interrupt control parameters, specifically, one or more of the preset reporting times and the preset reporting duration can be reduced.
[0049] However, since reducing the interrupt control parameter will increase 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, that is, to ensure that the host device is not overloaded.
[0050] If the adjustment range of the interrupt control parameter is too large, it may cause a great impact on the stability of the system. Therefore, it is optional that the range of each upward or downward adjustment of the interrupt control parameter should not exceed 20%.
[0051] Optionally, if the first load information reaches a first threshold and the second load information reaches a second threshold, it means that both the host device and the IO device are overloaded. At this time, the host device can weigh how to adjust the interrupt control parameters based on the overload conditions of the host device and the IO device, or it can maintain the original interrupt control parameters unchanged, which is not limited here.
[0052] It is worth pointing out that when the computer system is busy, user devices frequently generate interrupt requests. The IO device often receives interrupt requests with a preset number of reports before the timing reaches the preset reporting duration, and triggers the operation of reporting the interrupt to the host device. In this scenario, a small adjustment of the preset reporting duration will not significantly change the load status of the host device or the IO device, so the host device can give priority to adjusting the preset reporting times.
[0053] When the computer system is idle, the number of interrupt requests generated by the user device within the preset reporting time does not reach the preset reporting number, and the operation of reporting the interrupt to the host device is often triggered because the timing reaches the preset reporting time. In this scenario, the IO queue to be processed by the IO device is very shallow. On this basis, although reasonably increasing the preset reporting time will increase the depth of the IO queue, it can still ensure that the IO device is not overloaded, and at the same time can greatly reduce the load on the host device. Therefore, in the scenario where the system is idle, lowering the preset reporting time has better practical significance.
[0054] The present application does not limit the order between step 201 and step 202, and step 202 may also be performed before step 201. However, optionally, the computer system may give priority to the load status of the host device, that is, first perform step 201 to obtain the first load information of the host device, and only when the obtained first load information reaches the first threshold value, it is considered that the interrupt control parameter of the IO device needs to be adjusted, thereby triggering the operation of performing step 202 to obtain the second load information.
[0055] Optionally, the first threshold and the second threshold may be set by the IO device by default, or by the user, or by the host device. There are many methods for the host device to set the first threshold and the second threshold, for example, the first threshold and the second threshold may be determined according to the user's input instruction, or the first threshold and the second threshold may be determined by a data mining method, or the first threshold and the second threshold may be determined based on the historical data of the host device. The first threshold and the second threshold may also be determined by other methods, which are not limited here.
[0056] Optionally, in order to facilitate interactive management with the IO device, an IO driver may also be configured in the host device to implement operations of obtaining the second load information of the IO device and adjusting the interrupt control parameters of the IO device. Specifically, the OS of the host device determines to adjust the interrupt control parameters and sends parameter adjustment instructions to the IO driver. After receiving the parameter adjustment instruction, the IO driver obtains the currently completed and unfinished IO of the IO device. The IO driver saves the currently unfinished IO, and then adjusts the interrupt control parameters of the IO device according to the parameter adjustment instruction sent by the host device. After the interrupt control parameter adjustment is completed, the IO driver controls the IO device to execute the unfinished IO again.
[0057] The present invention also provides an interrupt processing device, which can be a functional module or integrated component set in a host device, or can be the host device itself, which is not limited here. The interrupt processing device executes Figure 2 The interrupt processing method described in the embodiment shown in FIG. Figure 3 ,include:
[0058] A first acquisition module 301 is used to acquire first load information of a host device;
[0059] A second acquisition module 302 is used to acquire second load information of the IO device;
[0060] The parameter adjustment module 303 is used to adjust the interrupt control parameters of the IO device according to the first load information and / or the second load information.
[0061] This embodiment provides an interrupt processing method, wherein the first acquisition module 301 acquires its own first load information, the second acquisition module 302 acquires the second load information of the IO device, and the parameter adjustment module 303 adjusts the interrupt control parameters of the IO device according to the first load information and the second load information. Through such a method, the interrupt processing device can dynamically adjust the interrupt control parameters of the IO device according to the load status of the host device and the IO device, so that the value of the interrupt control parameter conforms to the actual operation status of the computer system, thereby improving the performance and efficiency of the computer system.
[0062] Optionally, the parameter adjustment module 303 can specifically increase the interrupt control parameter of the IO device when the first load information reaches a first threshold and the second load information does not reach a second threshold; and / or reduce the interrupt control parameter of the IO device when the first load information does not reach the first threshold and the second load information reaches the second threshold.
[0063] Optionally, the first load information is used to indicate the load status of the host device, and may specifically include one or more parameters such as the CPU usage of the host device, the memory occupancy of the host device, and the IO rate of the host device.
[0064] Optionally, the second load information is used to indicate the load status of the IO device, and may specifically include one or more of the following parameters: the depth of the IO queue to be processed by the IO device, the number of IO queues to be processed by the IO device, the total number of IOs to be processed by the IO device, the CPU usage of the IO device, the memory occupancy of the IO device, etc.
[0065] Optionally, the interrupt processing device may also include an optional module: a parameter determination module 304, which is used to determine the first threshold and / or the second threshold. Specifically, the first threshold and the second threshold may be determined based on the user's input instructions, 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 based on historical data of the host device. The first threshold and the second threshold may also be determined by other methods.
[0066] Optionally, the amplitude of the interrupt control parameter of the IO device adjusted by the parameter adjustment module 303 each time does not exceed 20% of the interrupt control parameter of the IO device.
[0067] Figure 3 The operation method of the interrupt processing device shown can refer to Figure 2 The description of the interrupt handling method shown is not repeated here.
[0068] The embodiment of the present invention further provides a computing device 400, Figure 3 The interrupt processing device shown can be implemented by the computing device 400. For the specific structure of the computing device 400, please refer to Figure 4 , 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 can communicate with each other through the bus 404, or through other means such as wireless transmission.
[0069] The memory 402 memory may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a read-only memory (English: read-only memory, abbreviated: ROM), a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 402 may also include a combination of the above-mentioned types of memory. When the technical solution provided by the present invention is implemented by software, the program code for implementing the interrupt processing method provided by the present invention can be stored in the memory 402 and executed by the processor 401.
[0070] The computing device 400 obtains the second load information of the IO device through the communication interface 404 , and adjusts the interrupt control parameter of the IO device through the communication interface 404 .
[0071] Processor 401 can be any one or a combination of hardware units with processing functions such as CPU, graphics processing unit (GPU), digital signal processing (DSP), field-programmable gate array (FPGA), hardware chip, etc. Processor 401 is mainly used to obtain the first load information of the host device and the second load information of the IO device, and then determine how to adjust the interrupt control parameters according to the first load information and the second load information. The specific adjustment method can be referred to Figure 2 The relevant description of the interrupt handling method shown is not repeated here.
[0072] The present invention also provides a host device, which may specifically include Figure 3 The interrupt handling device shown, or Figure 4 The computing device shown.
[0073] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0074] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0075] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.
[0076] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or 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 a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0077] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 invention.
Claims
1. A computer system, characterized in that: The system includes a host device and an input / output IO device; The host device is used to perform data interaction with the user device; The IO device is used to assist the host device in data interaction with the user device; The host device is further used to obtain first load information of the host device and second load information of the IO device, and adjust 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 number and / or a preset reporting duration, the first load information is used to describe whether the host device is overloaded, and the second load information is used to describe whether the IO device is overloaded, and the second load information includes: a depth of an IO queue to be processed by the IO device; and / or a total number of IOs to be processed by the IO device; and / or a CPU usage rate of the IO device; and / or a memory occupancy rate of the IO device; The IO device is further used to receive an interrupt request from the user device, and report the interrupt to the host device after the number of received interrupt requests reaches a preset reporting number of times in the interrupt control parameter; or, the IO device is further used to receive an interrupt request from the user device, and report the interrupt to the host device after a duration of receiving the interrupt request reaches a preset reporting duration in the interrupt control parameter; or, the IO device is further used to receive an interrupt request from the user device, and report the interrupt to the host device after the number of received interrupt requests reaches a preset reporting number of times in the interrupt control parameter and a duration of the interrupt request reaches a preset reporting duration in the interrupt control parameter; The host device is also used for: If the host device is overloaded and the IO device is not overloaded, increasing the interrupt control parameter of the IO device; Or, if the host device is not overloaded and the IO device is overloaded, then reduce the interrupt control parameter of the IO device.
2. The computer system according to claim 1, characterized in that The host device is also used for: 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 and the second load information reaches the second threshold, reducing the interrupt control parameter of the IO device.
3. The computer system according to claim 1 or 2, characterized in that: The first load information includes: The CPU usage of the host device; and / or, memory occupancy rate of the host device; and / or, the IO rate of the host device.
4. The computer system according to claim 2, characterized in that: The host device is also used for: Determine the first threshold and / or the second threshold by a data mining method; and / or, determining the first threshold and / or the second threshold according to an input instruction of a user; And / or, determining an empirical value of the first threshold and / or the second threshold based on historical data of the host device.
5. The computer system according to claim 1, characterized in that: When the host device performs the operation of adjusting the interrupt control parameter of the IO device, the amplitude of adjusting the interrupt control parameter of the IO device does not exceed 20% of the interrupt control parameter of the IO device.
6. An interrupt processing method, applicable to a host device in a computer system, wherein the computer system further comprises a user device and an input / output (IO) device, characterized in that: The interrupt processing method comprises: Acquire first load information of the host device and second load information of the IO device, the IO device is used to assist the host device in data interaction with the user device, the first load information is used to describe whether the host device is overloaded, and the second load information is used to describe whether the IO device is overloaded, and the second load information includes: the depth of the IO queue to be processed by the IO device; and / or, the total number of IOs to be processed by the IO device; and / or, the CPU usage of the IO device; and / or, the memory occupancy of the IO device; According to the first load information and the second load information, adjusting the interrupt control parameter of the IO device, the interrupt control parameter including a preset reporting number and / or a preset reporting duration; The IO device is used to: receive an interrupt request from the user device, and report the interrupt to the host device after the number of interrupt requests received reaches the preset reporting number of times and / or after the duration of receiving the interrupt request reaches the preset reporting duration; The adjusting the interrupt control parameter of the IO device according to the first load information and the second load information includes: If the host device is overloaded and the IO device is not overloaded, increasing the interrupt control parameter of the IO device; Or, if the host device is not overloaded and the IO device is overloaded, then reduce the interrupt control parameter of the IO device.
