A method, device and computing device for balancing interrupt requests
By detecting the processor status and setting the set node allocation interrupt request, the delay and power consumption problems caused by interrupt request allocation of computer system are solved, and the performance and power consumption optimization of computing equipment are achieved.
Patent Information
- Application Number
- CN202310985953.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-08-07
AI Technical Summary
When the allocation of interrupt requests in a computer system, the processor in an idle state may cause a delay of processing interrupt requests to be long after wake-up, and the power consumption of a high load rate processor increases, resulting in deterioration of computer power consumption and reduced performance.
By detecting the operating status of multiple processors, the processor in the normal working state is set as a collection node, and interrupt requests are balanced, avoiding the waking of idle processors and high-load processors to process interrupt requests, and reducing the load of each processor rate and power consumption.
The power consumption optimization and performance improvement of computing equipment is achieved, avoiding the problem of delay change and power consumption increase during interrupt requests, and maintaining the load rate and power consumption of the processor.
Smart Images

Figure CN117369986B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an interrupt request balancing method, device and computing equipment. Background Art
[0002] Interrupt balance refers to the reasonable allocation and management of interrupt requests (IRQ) in a computer system to achieve a balance between system performance and reliability. Interrupt balance algorithms are configured in mainstream operating systems to evenly distribute IRQs to different central processing units (CPUs) for processing, thereby achieving high parallelism in the operating system. However, there may be CPUs in an idle state among the multiple CPUs managed by the operating system. If the operating system uses the interrupt balance algorithm to allocate IRQs, there will be problems such as waking up the processor in the idle state, increasing the delay of the processor with a high load rate to process IRQ, and increasing the power consumption of the high-frequency processor, resulting in deterioration of the computer's power consumption and reduced performance. Summary of the invention
[0003] In order to solve the above problems, an embodiment of the present application provides an interrupt request balancing method, which detects the operating status of multiple processors of a computing device and treats the processors in a normal working state among the multiple processors as a collection node, so that IRQ can be evenly distributed to the processors inside the collection node, avoiding the problems of waking up the processor in the idle state, the delay of the processor with a high load rate to process the IRQ, and the increase of the power consumption of the high-frequency processor, which leads to the deterioration of the power consumption and performance of the computing device. In addition, the present application also provides an interrupt request balancing device and a computing device corresponding to the interrupt request balancing method.
[0004] To this end, the following technical solutions are adopted in the embodiments of the present application:
[0005] In a first aspect, an embodiment of the present application provides a method for balancing an interrupt request IRQ, the method for balancing an interrupt request IRQ being characterized in that the method is executed by a computing device, the computing device comprising a plurality of processors, the method comprising: obtaining the operating status of the plurality of processors; when the processor is not in a set state, setting the processor to process a specified IRQ; the set state comprising one or more of a non-idle state, an operating frequency within a preset frequency range, and a load rate less than a set load rate; when the processor is in the set state, setting the processor to process IRQs other than the specified IRQ.
[0006] In this implementation, there are generally multiple processors inside the computing device, and a processor in a non-idle state, with an operating frequency within a preset frequency range and a load rate less than a set load rate among the multiple processors can be set to process IRQs other than the specified IRQ, and processors in other states can be set to process the specified IRQ. The computing device will not allow a processor in an idle state to receive IRQs other than the specified IRQ, thereby avoiding problems such as waking up a processor in an idle state, a longer delay in processing IRQs by a processor with a high load rate, and increased power consumption of a processor with a high frequency, which results in deterioration of power consumption and performance of the computing device.
[0007] In one embodiment, the method further includes: based on an interrupt balancing algorithm, evenly distributing the IRQs other than the designated IRQs to the processors in the set state.
[0008] In this embodiment, when the computing device runs an interrupt balancing algorithm, the received IRQs can be evenly distributed to the processors in the set state, so that the processors in the set state can process the IRQs evenly. This can not only keep the load rate, power consumption, operating frequency and other performance of each processor in the set state the same, but also avoid problems such as waking up the processor in the idle state, longer delays in processing IRQs by processors with high load rates, and increased power consumption of high-frequency processors, which can lead to power consumption degradation and performance reduction of the computing device.
[0009] In one embodiment, the process further includes: when the operating state of the processor is switched from the set state to not being in the set state, setting the processor to process a specified IRQ.
[0010] In this embodiment, when the computing device determines that the operating state of the processor switches from a set state to a non-set state, the type of IRQ processed by the processor can be changed to allow the processor to process the specified IRQ, and avoid problems such as waking up the processor in the idle state, longer delays in processing IRQs by processors with high load rates, and increased power consumption of high-frequency processors, which lead to power consumption degradation and performance reduction of the computing device.
[0011] In one embodiment, when the operating state of the processor is switched from not being in the set state to being in the set state, the processor is set to process the IRQ other than the designated IRQ.
[0012] In this embodiment, when the computing device determines that the operating state of the processor switches from not being in a set state to being in a set state, the type of IRQ processed by the processor can be changed to allow more processors to process IRQs other than the specified IRQ, thereby reducing the load rate, power consumption, latency, etc. of each processor in the running state.
[0013] In one embodiment, the method further includes: in response to the number of IRQs received by the processor in the set state exceeding a set threshold, setting some of the processors not in the set state to process the IRQs other than the specified IRQs.
[0014] In this implementation, when the computing device detects that the number of IRQs is relatively large and the number of processors in a specific state is relatively small, each processor needs to process a relatively large number of IRQs, which will cause a relatively long delay in the processor processing the IRQs. Therefore, the computing device can convert some processors that are not in the set state into processors in the set state, allowing more processors to process IRQs other than the specified IRQs, which can reduce the delay of each processor in the running state.
[0015] In one embodiment, it also includes: detecting an application scenario of the computing device; and adjusting the number of processors currently in the set state based on a pre-stored relationship between the number of processors in the set state corresponding to various application scenarios of the computing device.
[0016] In this embodiment, the computing device can be applied to different application scenarios, such as communication, application usage, mobile office, web browsing, etc. Different application scenarios will generate different numbers of IRQs, requiring different numbers of processors in specific states to process. Therefore, designers can pre-train the relationship between different application scenarios and the number of processors in specific states, and store the relationship between different application scenarios and the number of processors in specific states. After the computing device detects the current application scenario, it can adjust the number of processors in a specific state under the current application scenario to achieve the best performance of the processors in a specific state, such as power consumption, load rate, and latency.
[0017] In a second aspect, an embodiment of the present application provides an interrupt request IRQ balancing device, comprising: a transceiver unit, used to obtain the operating status of the multiple processors; a processing unit, used to set the processor to process a specified IRQ when the processor is not in a set state; the set state includes one or more of a non-idle state, an operating frequency within a preset frequency range, and a load rate less than a set load rate; when the processor is in the set state, the processor is set to process IRQs other than the specified IRQ.
[0018] In one implementation, the processing unit is further configured to distribute the IRQs other than the designated IRQs to the processors in the set state in a balanced manner based on an interrupt balancing algorithm.
[0019] In one embodiment, the processing unit is further configured to set the processor to process a specified IRQ when the operating state of the processor is switched from being in the set state to not being in the set state.
[0020] In one embodiment, the processing unit is further configured to set the processor to process the IRQ other than the designated IRQ when the operating state of the processor is switched from not being in the set state to being in the set state.
[0021] In one embodiment, the processing unit is further used to set some of the processors not in the set state to process IRQs other than the specified IRQ in response to the number of IRQs received by the processor in the set state exceeding a set threshold.
[0022] In one embodiment, the processing unit is further used to detect the application scenario of the computing device; and adjust the number of processors currently in the set state based on the pre-stored relationship between the number of processors in the set state corresponding to various application scenarios of the computing device.
[0023] In a third aspect, an embodiment of the present application provides a computing device, comprising: at least one memory, multiple processors, the multiple processors including a main processor, the main processor being used to execute instructions stored in the at least one memory, so that the computing device can be implemented as each of the possible embodiments of the first aspect.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute various possible implementation embodiments of the first aspect.
[0025] In a fifth aspect, an embodiment of the present application provides a computer program product, characterized in that the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements each possible implementation embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The following is a brief introduction to the drawings required for describing the embodiments or prior art.
[0027] FIG. 1( a ) is a schematic diagram of a scheme for allocating IRQs by an operating system in the related art;
[0028] FIG. 1( b ) is a schematic diagram of another scheme for allocating IRQs by an operating system in the related art;
[0029] FIG. 1( c ) is a schematic diagram of another solution for allocating IRQs by an operating system in the related art;
[0030] Figure 2 A schematic diagram of a scheme for allocating IRQs for an operating system provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of the architecture of a computing device provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of the architecture of the operating system provided in the embodiments of the present application;
[0033] Figure 5 A control flow chart of each module of the operating system provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of a flow chart of an IRQ equalization method provided in an embodiment of the present application is shown;
[0035] FIG. 7( a ) is a data diagram of a simulation experiment on the number of core interruptions for different IRQ allocation schemes provided in an embodiment of the present application;
[0036] FIG. 7( b ) is a data diagram of a simulation experiment of the time delay of the core processing IRQ under different IRQ allocation schemes provided in an embodiment of the present application;
[0037] FIG. 7( c ) is a data diagram of a simulation experiment of the time for migrating an IRQ and the time for migrating a core provided in an embodiment of the present application;
[0038] Figure 8 A schematic diagram of the structure of an IRQ equalization device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0040] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0041] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.
[0042] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0043] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0044] IRQ refers to hardware sending a signal to the operating system to terminate or cancel the current operation or request. Generally speaking, when an external device needs to send an interrupt signal, it will modify the level of the terminal pin connected to the generic interrupt controller (GIC) or advanced programmable interrupt controller (APIC). When the GIC or APIC recognizes that the level of the interrupt signal line has changed, it will send an interrupt signal to the CPU. After receiving the interrupt signal, the CPU immediately stops the current execution flow and jumps to the interrupt handler. Therefore, the interrupt signal sent by the external device to the GIC or APIC, and the interrupt signal sent by the GIC or APIC to the CPU can be called IPQ.
[0045] As shown in Figure 1(a), the operating system can run four CPUs, namely CPU-0, CPU-1, CPU-2, and CPU-3. The operating system receives four IRQs, namely IRQ-0, IRQ-1, IRQ-2, and IRQ-3. Under normal circumstances, the operating system is in performance mode. The operating system can run the interrupt balancing algorithm and evenly distribute multiple IRQs to different CPUs, allowing the operating system to achieve high parallelism. That is, the operating system distributes IRQ-0 to CPU-0, IRQ-1 to CPU-1, IRQ-2 to CPU-2, and IRQ-3 to CPU-3.
[0046] However, in the process of allocating IRQs, the operating system needs to periodically count the number of IRQs, the load rate of each CPU, calculate the interrupt affinity of IRQs allocated to each CPU, and perform interrupt migration, which will cause the operating system to have a relatively high cost of reallocation each time. In addition, when the operating system evenly allocates IRQs, there may be problems such as waking up processors in an idle state, increasing the latency of high-load processors in processing IRQs, and increasing the power consumption of high-frequency processors, resulting in degraded power consumption and performance of computing devices.
[0047] As shown in Figure 1(b), the operating system can run four CPUs, namely CPU-0, CPU-1, CPU-2, and CPU-3. The operating system receives four IRQs, namely IRQ-0, IRQ-1, IRQ-2, and IRQ-3. When the operating system is in power save mode, it can start a background daemon thread to centrally distribute multiple IRQs to one or a few CPUs to avoid waking up the CPU in the idle state. That is, the operating system can distribute IRQ-1 of CPU-1 to CPU-0, IRQ-2 of CPU-2 to CPU-0, and IRQ-3 of CPU-3 to CPU-0.
[0048] However, when the operating system allocates IRQs, the cost of each reallocation is relatively high. In addition, the operating system allocates multiple IRQs to CPU-0, causing CPU-0 to be at a high load rate. Since CPU-0 needs to handle a large number of IRQs, the delay of CPU-0 processing IRQs is relatively long, making it impossible for the operating system to adjust dynamically in real time.
[0049] As shown in Figure 1(c), the operating system can run four CPUs, namely CPU-0, CPU-1, CPU-2 and CPU-3. The operating system receives four IRQs, namely IRQ-0, IRQ-1, IRQ-2 and IRQ-3. Assume that CPU-0, CPU-1 and CPU-3 are in online mode, and CPU-2 is in offline mode. Offline mode means that CPU-2 may enter sleep mode or be unplugged. When CPU-2 switches from online mode to offline mode, the operating system can migrate the IRQs bound to CPU-2 one by one to the CPU in working state. When CPU-2 switches from offline mode to online mode, the operating system can migrate the IRQs bound to other CPUs to CPU-2 one by one.
[0050] However, each time the CPU switches between offline mode and online mode, it needs to migrate the IRQ bound to itself to other CPUs, or migrate the IRQ bound to other CPUs to itself. If the number of migrated IRQs is large, the CPU cannot quickly switch from offline mode to online mode, or from online mode to offline mode, causing the operating system to freeze.
[0051] In order to solve the defects existing in the related art, the embodiments of the present application provide an IRQ balancing method and a computing device. There are generally multiple processors inside the computing device to obtain the operating status of multiple processors. When the processor is in a set state, the computing device sets the processor to process IRQs other than the specified IRQ, and when the processor is in the running state, the processor is set to process the specified IRQ. Among them, the set state includes one or more of a non-idle state, an operating frequency within a preset frequency range, and a load rate less than a set load rate.
[0052] In an embodiment of the present application, the computing device can construct the processor in the set state into a participating node. The computing device can run an interrupt balancing algorithm to distribute the received IRQ to the processor of the participating node in a balanced manner, so that each processor inside the participating node has equal authority and can receive and process IRQ equally. After receiving the IRQ, the computing device defaults to distributing the IRQ to the processor inside the participating node for processing, which can avoid the competition for resources by the single-core processor outside the participating node, resulting in a relatively long delay in processing the IRQ. And avoid problems such as waking up the processor in the idle state, the delay of the high-load processor to process the IRQ becomes longer, and the power consumption of the high-frequency processor increases, resulting in power consumption degradation and performance reduction of the computing device. Multiple processors inside the participating node can process IRQ in a balanced manner, and can keep the load rate, power consumption, operating frequency and other performance of each processor in the set state the same, and can avoid problems such as waking up the processor in the idle state, the delay of the high-load processor to process the IRQ becomes longer, and the power consumption of the high-frequency processor increases, resulting in power consumption degradation and performance reduction of the computing device.
[0053] In addition, a light IRQ balancer can be designed inside the collection node. The light IRQ balancer is responsible for detecting the idle state, load rate, operating frequency and other performance parameters of each processor, as well as the application scenario of the computing device, the number of processors and other system parameters. It can dynamically adjust the processors inside the collection node and allow the processors to migrate out of or into the collection node in a lightweight manner. The collection node optimizes the internal processors to better handle IRQ.
[0054] A collection node is a node divided in software, which is divided based on the characteristics and functions of the processor that processes IRQs other than the specified IRQ. In the embodiment of the present application, the processor inside the collection node indicates that it can process IRQs other than the specified IRQ. The processor outside the collection node indicates that it can process the specified IRQ, or does not process the IRQ.
[0055] The processor inside the collection node refers to the processor in the set state, and the processor outside the collection node refers to the processor not in the set state. "Migration out of the collection node" means that the operating state of the processor is switched from being in a specific state to being not in a specific state. "Migration into the collection node" means that the operating state of the processor is switched from being not in a specific state to being in a specific state. Therefore, the technical solution of the present application is described below with the "collection node" to allow readers to better understand the technical solution of the present application.
[0056] like Figure 2 As shown, the operating system can run four CPUs, namely CPU-0, CPU-1, CPU-2 and CPU-3. The operating system receives six IRQs, namely IRQ-0, IRQ-1, IRQ-2, IRQ-3, IRQ-4 and IRQ-5. CPU-0, CPU-1 and CPU-2 are inside the collection node. CPU-3 is outside the collection node. Assume that IRQ-0, IRQ-1, IRQ-2 and IRQ-3 are assigned to the inside of the collection node, and IRQ-4 and IRQ-5 are assigned to the outside of the collection node. The lightweight interrupt request balancer inside the collection node can lightweightly allow CPU-2 to migrate out of or into the collection node.
[0057] In one case, when the operating system is in performance mode, the lightweight interrupt request balancer detects that CPU-2 is in an idle state and can migrate CPU-2 out of the collection node. At this time, the IRQ inside the collection node will not be routed to CPU-2 for processing, which can avoid problems such as waking up the CPU in the idle state, the long latency of the high-load CPU processing IRQ, and the increase in power consumption of the high-frequency CPU, which will lead to power consumption degradation and performance reduction of the computing device.
[0058] In another case, when the operating system is in low-power mode, the lightweight interrupt request balancer can sense the state of the processor and allow CPU-2 to enter the collection node. The collection node can run the interrupt balancing algorithm to allocate some IRQs to CPU-2, reducing the number of IRQs that the CPU inside the original collection node needs to handle, and avoiding the long delay of the CPU inside the original collection node to handle IRQs, which makes the operating system unable to adjust dynamically in real time.
[0059] In another case, when the operating system is in a dormant state that can be awakened or hot-plugged, the lightweight interrupt request balancer can lightweight migrate the dormant or unplugged CPU-2 out of the collection node, or migrate the dormant or plugged-in CPU-2 into the collection node. When the operating system determines that CPU-2 migrates out of the collection node, the operating system allocates IRQs to other CPUs in the collection node without allocating IRQs to CPU-2. Compared with the related art, the operating system migrates multiple IRQs bound to a CPU to other CPUs one by one. The present application only needs to migrate CPU-2 out of the collection node to enable CPU-2 to quickly switch from online mode to offline mode.
[0060] Similarly, when the operating system determines that CPU-2 has been migrated to the collection node, the operating system re-detects the CPUs inside the collection node during the IRQ allocation process, and evenly distributes the IRQs to each CPU in the collection node. Compared with the related art, the operating system needs to migrate multiple IRQs bound to other CPUs to CPU-2 one by one. This application only needs to migrate CPU-2 to the collection node, so that CPU-2 can quickly switch from offline mode to online mode.
[0061] Figure 3 Schematic diagram of the architecture of a computing device provided in an embodiment of the present application. Figure 3 As shown, computing device 300 includes application programs 310 , operating system 320 , basic input output system (BIOS) 330 , and hardware components 340 .
[0062] Application 310 refers to a computer program that completes one or more specific tasks. Application 310 is installed in operating system 320, can interact with the user, and create one or more execution tasks after receiving the user's operation instructions. Each application 310 runs in an independent process and has an independent address space.
[0063] The operating system 320 is a set of interrelated system software programs that manage and control computer operations, run and operate hardware and software resources, and provide public services to organize user interactions. The operating system 320 can schedule various resource modules of the computing device 300, including hardware and software equipment, data information, etc. The use of a computer operating system can reduce the workload of manual resource allocation, reduce the degree of user intervention in computer operations, and greatly improve the intelligent work efficiency of the computer. The operating system 320 can be a Linux system real-time operating system, etc.
[0064] BIOS 330 is an industry-standard firmware interface. BIOS 330 is a set of programs fixed to a read-only memory (ROM) chip on the motherboard of the computer, which stores the most important basic input and output programs of the computer, the self-test program after powering on, and the system self-starting program. The main function of BIOS 330 is to provide the lowest-level and most direct hardware settings and controls for the computer. BIOS 330 does not directly control the hardware component 340, but provides an abstraction layer and directly controls the hardware component 340.
[0065] The hardware component 340 includes various hardware of the computing device 300 , such as a CPU, a hard disk, a network card, an interrupt controller, etc. The hardware component 340 is used to support the normal operation of the computing device 300 .
[0066] The operating system 320 can divide the memory space in which it runs into two parts, namely kernel space and user space. User space refers to the space in which user program code runs. Kernel space refers to the space in which kernel code runs. When a process runs in user space, the process is in "user mode (user model)". A process in user mode 321 is also called a user mode process. When a process runs in kernel space, the process is in "kernel mode (kernel model)". A process in kernel mode 322 is also called a kernel mode process.
[0067] In the design of operating system 320, user state 321 refers to a non-privileged execution state. The kernel prohibits code in this state from performing potentially dangerous operations, such as writing system configuration files, killing other users' processes, restarting the system, etc. Kernel state 322 refers to a privileged execution state. The kernel can perform any operation on the code in this state.
[0068] like Figure 4 As shown, the operating system 320 is divided into an interrupt initialization module 3221, an interrupt routing management module 3222, a behavior perception module 3223 and a collection node management module 3224 in the kernel state 322 according to the executed functions, and an interrupt processing module 3211 is divided in the user state 321. Among them, the interrupt initialization module 3221, the interrupt routing management module 3222, the behavior perception module 3223, the collection node management module 3224 and the interrupt processing module 3211 can all be implemented by software, or by hardware, or by a combination of software and hardware.
[0069] The following is a diagram of the various execution modules of the operating system 320 and the combination of Figure 5 The control flow chart shown describes the technical solution of this application.
[0070] The hardware component 340 includes an interrupt controller 341. The interrupt controller 341 can be hardware such as GIC and APIC. GIC is an interrupt controller based on the advanced RISC machine (ARM) architecture. In a multi-core processor system, GIC can coordinate the interrupt signal processing between multiple processor cores and provide a consistent interrupt management and distribution mechanism to ensure that the system can run efficiently and reliably respond to external events and devices. APIC is an interrupt controller based on the extended 86 architecture. APIC is used to process and distribute interrupt signals to ensure that the interrupt signals are correctly routed to the corresponding processor core or device.
[0071] The interrupt initialization module 3221 is used to initialize the interrupt controller 234 to ensure that the operating system 320 can accurately and reliably capture and process interrupt events. In addition, the interrupt initialization module 3221 can also sniff the routing mode of the interrupt routing management module 3222, detect which type of routing mode the hardware indicates, and adjust the software strategy accordingly.
[0072] After receiving the IRQ, the interrupt routing management module 3222 can select the routing mode of the IRO based on the interrupt configuration information configured by the user. The routing mode of the IRO can be divided into a single-core processing routing mode and a multi-core balanced processing routing mode. Among them, the single-core processing routing mode indicates that the IRQ is assigned to a specific processor for processing. The multi-core balanced processing routing mode indicates that the IRQ is assigned to the processor row inside the collection node for processing.
[0073] In an embodiment of the present application, when the operating system 320 performs interrupt registration, the interrupt handler is associated with a specific interrupt signal. The operating system 320 can divide the processor into a specific processor and a general processor according to the properties of the IRQ processed by the processor. A specific processor is a processor that processes special IRQs such as high-priority IRQs and emergency IRQs. A general processor is a processor that processes IRQs other than special IRQs. The operating system 320 can build general processors into a collection node so that general processors can receive and process IRQs equally. The operating system 320 can receive the user's interrupt configuration information for IRQ, divide the routing mode of IRQ into a single-core processing routing mode and a multi-core balanced processing routing mode, and select a suitable routing mode for IRQ transmission.
[0074] In one case, when the interrupt routing management module 3222 determines that the IRQ is a special IRQ, the IRQ can be migrated to a specific processor through a single-core processing routing method, so that the specific processor can specifically handle the special IRQ. Since the special IRQ can only be processed by a specific processor, the specific processor will receive and process the special IRQ regardless of its state.
[0075] In another case, when the interrupt routing management module 3222 determines that the IRQ is not a special IRQ, the IRQ is migrated to the collection node by default through a multi-core balanced processing routing mode. The collection node runs an interrupt balancing algorithm to evenly distribute the received IRQ to the processors inside the collection node.
[0076] The behavior perception module 3223 can use the light IRQ balancer to periodically detect the parameters of the target devices such as the processor, hard disk, clock or timer, external device, external controller, etc., to determine whether the processor is in a dormant state or hot-swapped state, whether the processor is in an idle state, whether the operating frequency of the processor is within a preset frequency range, whether the load rate of the processor is less than the set load rate, whether the processor processes a high priority IRQ, whether the processor processes an emergency IRQ, the application scenario of the computing device 300, etc. Among them, the application scenario can be communication, application use, mobile office, web browsing, etc.
[0077] The collection node management module 3224 generally runs an interrupt balancing algorithm to distribute the received multiple IRQs to each processor inside the collection node in a balanced manner, so that each processor inside the collection node can process the IRQ equally, so as to achieve the same working state of each processor, and no abnormal state such as high load rate and high frequency will occur in individual processors. The collection node management module 3224 detects whether the state of the processor has changed, and can optimize the processor inside the collection node to allow the collection node to better process the IRQ. For example, when there is a processor in the collection node in an idle state, the collection node management module 3224 can migrate the processor in the idle state inside the collection node out of the collection node, which can avoid the problems of waking up the processor in the idle state, the delay of the high-load processor to process the IRQ becomes longer, and the power consumption of the high-frequency processor increases, resulting in the degradation of the power consumption and performance of the computing device. For another example, when there is a processor in the collection node in a high load rate, the collection node management module 3224 can migrate a specified number of processors outside the collection node into the collection node to reduce the load rate inside the collection node. For another example, when the operating frequency of a processor inside a collection node exceeds a preset frequency range, the collection node management module 3224 can migrate the processor whose operating frequency is not within the set range out of the collection node to avoid large differences in the operating frequencies of the processors inside the collection node, which would lead to degradation of the power consumption of the operating system.
[0078] The interrupt processing module 3211 can import the IRQ from the kernel state 322 to the user state 321 according to the routing status of the IRQ, so that the processor called by the user state 321 can process the IRQ.
[0079] In an embodiment of the present application, the operating system 320 can construct some processors into a collection node based on the user's configuration items. The collection node can run an interrupt balancing algorithm to evenly distribute the received IRQs to the processors of the collection node, so that each processor inside the collection node has equal authority and can equally receive and process IRQs. The collection node can receive information about devices involved in processing IRQs, dynamically adjust the processors inside the collection node, and allow the processors to migrate out of or into the collection node in a lightweight manner. The collection node optimizes the internal processors to better process IRQs.
[0080] The above is an introduction to the computing device 300 provided in the embodiment of the present application. Next, based on the above content, the IRQ equalization method provided in the embodiment of the present application is introduced.
[0081] Figure 6 FIG. 3 is a flow chart of an IRQ equalization method provided in an embodiment of the present application. The method may be executed by the operating system 320. Figure 6As shown, the IRQ equalization method may include the following steps:
[0082] S601 , the operating system 320 obtains the operating status of multiple processors of the computing device 300 .
[0083] The computing device 300 may refer to a terminal device such as a server, a desktop computer, a portable notebook computer, etc. The computing device 300 generally includes multiple processors, which respectively undertake the key tasks of performing calculations and controlling computer operations. The processor may be a device with computing functions such as a CPU, a graphics processing unit (GPU), an extensible processing unit (XPU), etc.
[0084] In one case, when there is only one device with computing function inside the computing device 300, the computing device 300 can divide the resources of the device with computing function into multiple computing units according to the computing function. In this case, the processor can be the computing unit.
[0085] In another case, when the computing device 300 is a computing cluster composed of multiple servers, one server can be used as a processor.
[0086] S602: When the processor is in a setting state, the operating system 320 sets the processor to process IRQs other than the designated IRQ.
[0087] S603, the operating system 320 sets the processor to process the specified IRQ when the processor is in the running state.
[0088] The operating system 320 can use the light IRQ balancer to detect the performance parameters of each processor, such as the idle state, load rate, and operating frequency, as well as system parameters such as the application scenario of the computing device and the number of processors. Based on the performance parameters of the processors, the operating system 320 can form a collection node with processors that are in a non-idle state, whose operating frequency is within a preset frequency range, and whose load rate is less than a set load rate. Processors in other states are outside the collection node. The collection node can run an interrupt balancing algorithm to evenly distribute the received IRQs to some processors inside the collection node. Some processors inside the collection node have equal authority and can receive and process IRQs equally.
[0089] Optionally, the operating system 320 can divide the processor into a specific processor and a general processor according to the properties of the IRQ processed by the processor. The specific processor is used to process special IRQs such as high priority IRQs and emergency IRQs. The general processor is used to process IRQs other than special IRQs. The operating system 320 can construct the general processor into a collection node and transmit non-special IRQs to the collection node by default. The operating system 320 can set the specific processor outside the collection node, so that the specific processor acts as a single-core processor to specifically receive and process special IRQs.
[0090] In an embodiment of the present application, the operating system 320 can detect the status of each processor during the process of building a collection node, filter out processors that are in an idle state, in a high load rate, processing special IRQs, in a sleep state or a hot-plug state, and build other processors into a collection node, so that the processors inside the collection node can handle IRQs at will.
[0091] The collection node can be provided with a lightweight interface, which allows the processor inside the collection node to exit the collection node and allows the processor outside the collection node to enter the collection node. The lightweight interface is designed to be a concise and effective communication and interaction method through a simplified, flexible, medical and efficient design method. The lightweight interface has the characteristics of low latency, and the processor can quickly pass through the lightweight interface to realize the rapid change of the processor inside the collection node.
[0092] In the embodiment of the present application, after receiving the IRQ, the operating system 320 selects a suitable routing mode for the IRQ based on the interrupt configuration information, and migrates the IRQ to the corresponding processor for processing through the suitable routing mode. The routing mode of the IRQ can be divided into a single-core processing routing mode and a multi-core balanced processing routing mode. The single-core processing routing mode indicates that the IRQ is assigned to a specific processor for processing. The multi-core balanced processing routing mode indicates that the IRQ is assigned to the processor row inside the collection node for processing.
[0093] The interrupt configuration information is information pre-stored by the user, generally including the importance of the IRQ, the consistency of the input / output (I / O) data storage, etc. In one case, after receiving the IRQ, the operating system 320 detects that the importance of the IRQ matches the importance of the interrupt configuration information, and can select a single-core processing routing mode to migrate the IRQ to a corresponding specific processor. On the contrary, the operating system 320 selects a multi-core balanced processing routing mode to migrate the IRQ to the collection node.
[0094] The operating system 320 can use the light IRQ balancer to periodically detect parameters of target devices such as the processor, hard disk, clock or timer, external device, external controller, etc. to determine whether the processor is in a sleep state or hot-plug state, whether the processor is in an idle state, whether the processor's operating frequency is within a preset frequency range, whether the processor's load rate is less than the set load rate, whether the processor handles a high-priority IRQ, whether the processor handles an emergency IRQ, the application scenario in which the computing device 300 is located, etc.
[0095] The operating system 320 modifies the processor inside the collection node according to whether the state of the processor has changed, so that the collection node can better handle IRQ. In one case, when the operating system 320 determines that a processor inside the collection node is in an idle state, the processor in the idle state can be migrated out of the collection node through a lightweight interface to avoid problems such as waking up the processor in the idle state, increasing the delay of the high-load processor in handling IRQ, and increasing the power consumption of the high-frequency processor, which leads to deterioration of power consumption and performance of the computing device.
[0096] Optionally, when the operating system 320 detects that the processor exiting the collection node switches from the idle state to the working state, the processor can be migrated into the collection node through a lightweight interface. The operating system 320 allows the processor exiting the collection node to re-enter the collection node, which can reduce the load rate of the processor inside the collection node and avoid the long delay of the processor processing IRQ, which causes the operating system 320 to be unable to adjust dynamically in real time.
[0097] In another case, when the operating system 320 determines that a processor in the collection node is in a dormant state that can be awakened or hot-plugged, the processor in the dormant state that can be awakened or hot-plugged may be offline or online at any time, resulting in unstable working states of other processors in the collection node. The operating system 320 detects the state of the processor and can migrate the processor that has entered the dormant state or has been unplugged out of the collection node through a lightweight interface, or migrate the dormant awakened or plugged processor into the collection node through a lightweight interface, so as to prevent the processor in the dormant state that can be awakened or hot-plugged from affecting the working states of other processors in the collection node.
[0098] In addition, when a processor is suddenly inserted into the computing device 300 or awakened from a dormant state, the computing device 300 needs to allocate the IRQ to the inserted processor as quickly as possible to improve the response speed of the processor. Similarly, when a processor is suddenly unplugged from the computing device or enters an idle state, the computing device 300 needs to allocate the IRQ bound to the offline processor to other processors as quickly as possible to avoid the computing device from crashing due to the sudden offline of the processor. In an embodiment of the present application, when the operating system 320 determines that a processor inside the collection node has migrated out of the collection node, or a processor has migrated into the collection node, the IRQ allocation scheme can be modified. The operating system 320 detects the processor inside the collection node and evenly allocates the IRQ to each processor inside the current collection node. Compared with related technologies, the operating system 320 converts the operation of migrating IRQ into the operation of migrating processors, so that a processor in a dormant state that can be awakened or hot-plugged can quickly switch from offline mode to online mode, or from online mode to offline mode.
[0099] In another case, when the operating system 320 detects that the processor inside the collection node is at a high load rate, the processor outside the collection node can be migrated into the collection node through a lightweight interface. The operating system 320 increases the number of processors inside the collection node to reduce the number of IRQs processed by each processor, thereby switching the processor inside the collection node from a high load rate to a normal state or a low load rate.
[0100] In another case, when the operating system 320 detects that the operating frequency of a processor in the collection node exceeds the preset frequency range, the processor in the high frequency or low frequency state can be migrated out of the collection node through a lightweight interface, or the processor in the high frequency or low frequency state can be turned off to adjust the frequency of multiple processors in the collection node. The operating system 320 turns off the processor with too high or too low operating frequency in the collection node to keep the processor in the collection node within the set range, so that multiple processors in the collection node can process IRQ in parallel, and improve the uniformity of the operating frequency distribution of each processor in the collection node.
[0101] In another case, when the operating system 320 detects that a processor inside the collection node is specifically used to process special IRQs such as high-priority IRQs and emergency IRQs, the processor can be migrated out of the collection node through a lightweight interface to prevent the processor from continuing to receive other IRQs in the collection node, thereby affecting the processing progress of the special IRQ.
[0102] In another case, when the operating system 320 detects the application scenario in which the computing device 300 is located, it can migrate a set number of processors outside the collection node into the collection node through a lightweight interface, or migrate a set number of processors inside the collection node out of the collection node through a lightweight interface based on the pre-set number of processors of the collection node corresponding to each scenario, so that the number of processors inside the collection node remains at the number of processors corresponding to the scenario in which the computing device 300 is located.
[0103] Computing devices can be applied to different application scenarios, such as communication, application usage, mobile office, web browsing, etc. Different application scenarios will generate different numbers of IRQs and require different numbers of processors in specific states to process. Therefore, designers can pre-train the relationship between different application scenarios and the number of processors in specific states, and store the relationship between different application scenarios and the number of processors in specific states. After the computing device detects the current application scenario, it can adjust the number of processors in a specific state under the current application scenario to achieve the best performance of the processors in a specific state, such as power consumption, load rate, and latency.
[0104] In an embodiment of the present application, the operating system forms a collection node with some processors among the multiple processors of the computing device. The collection node can run an interrupt balancing algorithm so that the processors inside the collection node can process IRQs in a balanced manner. The processors outside the collection node may not process IRQs or process special IRQs. After receiving the IRQ, the operating system can assign the IRQ to the processor inside the collection node by default, which can avoid competition for resources among the processors outside the collection node, resulting in a relatively long delay in the processor inside the collection node processing the IRQ. Multiple processors inside the collection node can process IRQs in a balanced manner, avoiding a single processor from processing IRQs with a high load, so as to improve the performance of the operating system and reduce the power consumption of the operating system.
[0105] In addition, the operating system detects whether the status of the processor has changed, and migrates the processors out of the collection node in special situations such as when the processor is in idle state, the operating frequency is not within the preset frequency range, the load rate is not less than the set load rate, or when processing special IRQs. In addition, when the processors inside the collection node are at a high load rate, some processors are migrated into the collection node. This can optimize the processors inside the collection node and allow the processors inside the collection node to better handle IRQs.
[0106] Figure 7(a)-Figure 7(c) A data graph of experiments conducted on computing devices using the protection scheme of this application.
[0107] As shown in Figure 7(a), the computing device can run four cores, namely core 0, core 1, core 2, and core 3. The first row of data indicates that core 0 is in an idle state, and cores 1, 2, and 3 are in a working state. When the computing device runs the "King of Glory" application, core 0 (that is, cpu0) is interrupted 11051 times when it is in an idle state. The weighted average of the frequency distribution of the four cores is 1391.542MHz.
[0108] The second line of data indicates that core 0, core 1, core 2, and core 3 are in idle state. When the computing device runs Honor of Kings, core 0 (i.e., cpu0) will be interrupted 6353 times when it is in idle state, core 1 (i.e., cpu1) will be interrupted 3342 times when it is in idle state, core 2 (i.e., cpu2) will be interrupted 3463 times when it is in idle state, and core 3 (i.e., cpu3) will be interrupted 4305 times when it is in idle state. The weighted average of the frequency distribution of core 0, core 1, core 2, and core 3 is 1520.9MHz. It can be seen that although the number of interruptions of a single core in idle state has decreased, the operating frequency fluctuations of the four cores have increased.
[0109] The third line of data indicates that there are cores 0, 1, 2, and 3 in the collection node, and the cores in the collection node are in an idle state and can be migrated out of the collection node. When the computing device runs Honor of Kings, the generated IRQ is processed by the core inside the collection node. Core 0 (that is, cpu0) will be interrupted 7559 times when it is in an idle state. The weighted average of the frequency distribution of the cores inside the collection node is 1300.9MHz. It can be seen that the number of interruptions when the core inside the collection node is in an idle state is reduced, and the operating frequency fluctuations of multiple cores inside the collection node are reduced.
[0110] As shown in Figure 7(b), the computing device can run four cores, namely 0 core, 1 core, 2 cores and 3 cores. The first row of data indicates that there is only 0 core inside the collection node, and the collection node will not migrate out or migrate into the core. When the computing device runs the "JD" application, the latency of 0 core processing IRQ inside the collection node is 3ms116us. When the computing device runs the "Honor of Kings" application, the latency of 0 core processing IRQ inside the collection node is 7ms20us. When the computing device plays "TikTok", the latency of 0 core processing IRQ inside the collection node is 89us on average (the extreme value is between 19-1069us).
[0111] The second line of data indicates that there are 0 cores, 1 core, 2 cores, and 3 cores inside the collection node, and the collection node migrates out or migrates into the core. When the computing device runs the "JD" application, the latency of the 0 core inside the collection node to process IRQ is 1ms459us. When the computing device runs the "Honor of Kings" application, the latency of the 0 core inside the collection node to process IRQ is 1ms238us. When the computing device plays "TikTok", the latency of the 0 core inside the collection node to process IRQ is 89us on average (the extreme value is between 20-421us). It can be seen that the latency of the 0 core inside the collection node to process IRQ is greatly reduced.
[0112] As shown in Figure 7(c), the first row shows that when a core switches from working state to sleeping state, the time consumed by the 100 IRQs bound to the core to migrate to other cores is 11000ns. The second row shows that the time consumed by a core to migrate out of the collection node is 0.5ns. It can be seen that the time consumed by migrating a core is much shorter than that of migrating 100 IRQs.
[0113] Figure 8 FIG. 1 is a schematic diagram of the structure of an IRQ equalization device provided in an embodiment of the present application. Figure 8 As shown, the IRQ equalization device 800 can be divided into a transceiver unit 810 and a processing unit 820 according to the execution function. The specific implementation process of the IRQ equalization device 800 is as follows:
[0114] The transceiver unit 810 is used to obtain the operating status of multiple processors. The processing unit 820 is used to set the processor to process a specified IRQ when the processor is not in a set state. The set state includes one or more of a non-idle state, an operating frequency within a preset frequency range, and a load rate less than a set load rate. The processing unit 820 is also used to set the processor to process an IRQ other than the specified IRQ when the processor is in the set state.
[0115] In one implementation, the processing unit 820 is further configured to distribute IRQs other than the specified IRQs to the processors in a set state in a balanced manner based on an interrupt balancing algorithm.
[0116] In one implementation, the processing unit 820 is further configured to set the processor to process a specified IRQ when the operating state of the processor is switched from being in a set state to being in a non-set state.
[0117] In one implementation, the processing unit 820 is further configured to set the processor to process an IRQ other than a specified IRQ when the operating state of the processor is switched from being in a non-set state to being in a set state.
[0118] In one embodiment, the processing unit 820 is further configured to set some processors that are not in the setting state to process IRQs other than the specified IRQs in response to the number of IRQs received by the processors in the setting state exceeding a set threshold.
[0119] In one embodiment, the processing unit 820 is further used to detect an application scenario of the computing device; and adjust the number of processors currently in the set state based on a pre-stored relationship between the number of processors in the set state corresponding to various application scenarios of the computing device.
[0120] The present application also provides a computing device, which includes at least one memory and multiple processors, wherein the multiple processors include a main processor, and the main processor can execute the following Figure 2-Figure 7(c) And the above corresponding protected technical solutions, so that the computing device has the technical effect of the above protected technical solutions.
[0121] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer executes the above Figure 2-Figure 7(c) And the IRQ equalization method described in any one of the corresponding description contents.
[0122] In an embodiment of the present application, a computer program product is also provided, wherein the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements the above Figure 2-Figure 7(c) And the IRQ equalization method described in any one of the corresponding description contents.
[0123] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0124] In addition, various aspects or features of the embodiments of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0125] In the above embodiment, Figure 8 The IRQ equalization device 800 described in the embodiment can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0126] It should be understood that in various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0127] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0128] 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 units is only a logical function division. There may be other division methods in actual implementation, such as multiple units 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] If the function is implemented in the form of a software functional unit 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 embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or an access network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0131] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited to this. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.
Claims
1. A method for balancing interrupt requests IRQ, It is characterized in that The method is executed by a computing device, wherein the computing device includes a plurality of processors, and the method includes: Obtaining the operating status of the multiple processors; When the processor is not in a set state, the processor is set to process a specified IRQ; the set state includes one or more of a non-idle state, an operating frequency within a preset frequency range, and a load rate less than a set load rate; the specified IRQ includes one or more of a high priority IRQ and an emergency IRQ; When the processor is in the setting state, the processor is set to process an IRQ other than the designated IRQ.
2. The method according to claim 1, It is characterized in that The method further comprises: Based on an interrupt balancing algorithm, the IRQs other than the designated IRQs are evenly distributed to the processors in the set state.
3. The method according to claim 1 or 2, It is characterized in that Also includes: When the operation state of the processor is switched from being in the set state to being not in the set state, the processor is set to process a designated IRQ.
4. The method according to claim 1 or 2, It is characterized in that Also includes: When the operation state of the processor is switched from not being in the set state to being in the set state, the processor is set to process the IRQ other than the designated IRQ.
5. The method according to claim 1 or 2, It is characterized in that Also includes: In response to the number of IRQs received by the processor in the setting state exceeding a set threshold, some of the processors not in the setting state are set to process the IRQs other than the designated IRQ.
6. The method according to claim 1 or 2, It is characterized in that Also includes: Detecting an application scenario of the computing device; Based on the pre-stored relationship between the number of processors in the set state corresponding to various application scenarios of the computing device, the number of processors currently in the set state is adjusted.
7. An interrupt request IRQ equalization device, It is characterized in that include: A transceiver unit, used to obtain the operating status of multiple processors in the computing device; A processing unit, configured to set the processor to process a specified IRQ when the processor is not in a set state; the set state includes one or more of a non-idle state, an operating frequency within a preset frequency range, and a load rate less than a set load rate; the specified IRQ includes one or more of a high priority IRQ and an emergency IRQ; When the processor is in the setting state, the processor is set to process an IRQ other than the designated IRQ.
8. The device according to claim 7, It is characterized in that The processing unit is further configured to distribute the IRQs other than the designated IRQs to the processors in the set state in a balanced manner based on an interrupt balancing algorithm.
9. The device according to claim 7 or 8, It is characterized in that The processing unit is further configured to set the processor to process a specified IRQ when the operating state of the processor is switched from being in the set state to not being in the set state.
10. The device according to claim 7 or 8, It is characterized in that The processing unit is further configured to, when the operating state of the processor is switched from not being in the set state to being in the set state, set the processor to process the IRQ other than the designated IRQ.
11. The device according to claim 7 or 8, It is characterized in that The processing unit is further configured to, in response to the number of IRQs received by the processor in the set state exceeding a set threshold, set some of the processors not in the set state to process the IRQs other than the designated IRQs.
12. The device according to claim 7 or 8, It is characterized in that The processing unit is further used to detect an application scenario of the computing device; Based on the pre-stored relationship between the number of processors in the set state corresponding to various application scenarios of the computing device, the number of processors currently in the set state is adjusted.
13. A computing device, It is characterized in that include: at least one memory, A plurality of processors, wherein the plurality of processors include a main processor, wherein the main processor is configured to execute instructions stored in the at least one memory so that the computing device performs the method according to any one of claims 1 to 6.
14. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.
15. A computer program product, It is characterized in that The computer program product stores instructions, and when the instructions are executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 6.
