Interrupt controller and abnormal interrupt processing method
By using interrupt controller caching and feature recognition technology, the impact of abnormal interrupts from peripheral devices on the host system is reduced, thereby improving system performance.
Patent Information
- Application Number
- CN202510846407.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-28
AI Technical Summary
Excessive abnormal interruptions generated by peripheral devices during operation lead to a decrease in the performance of the host system.
The interrupt controller uses a buffer module to receive and buffer interrupt information. The interrupt characteristics are identified by the determination module and compared with the interrupt handling record to determine whether to process the interrupt information, thereby reducing the processing of duplicate and abnormal interrupts.
This effectively reduces the amount of interrupt information processing, saves system resources, and improves system performance.
Smart Images

Figure CN120849035A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an interrupt controller and a method for handling abnormal interrupts. Background Technology
[0002] During operation, peripheral devices may encounter abnormal situations (such as the use of unallocated GPU physical memory, out-of-bounds access, and memory safety issues by PCIe (PCI Express, peripheral component interconnect express, high-speed serial computer expansion bus standard) devices, taking GPU (Graphics Processing Unit) as an example). In such cases, many peripheral devices will generate a large number of interrupt messages, and the host often needs to spend a lot of resources to process these interrupt messages, which greatly reduces the system performance of the host. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide an interrupt controller and a method for handling abnormal interrupts, which can effectively reduce the amount of interrupt information processing, save system resources, and improve system performance.
[0004] In a first aspect, embodiments of the present invention provide an interrupt controller, comprising: a cache module for receiving and caching first interrupt information sent by a client module of a peripheral device; and a determination module electrically connected to the cache module for determining the interrupt characteristics of the first interrupt information, obtaining the first characteristics, determining whether second interrupt information has been received based on a second interrupt processing record and the first characteristics, and determining whether to continue processing the first interrupt information based on whether the second interrupt information has been received, wherein the interrupt characteristics of the second interrupt information are the same as the first characteristics, and the second interrupt processing record is used to record the interrupt characteristics of abnormal interrupt information processed by the interrupt controller.
[0005] In one embodiment, the determining module includes: a recording and storage submodule configured to store the second interrupt processing record; a comparison submodule electrically connected to both the cache module and the recording and storage submodule, configured to determine the interrupt feature of the first interrupt information, obtain the first feature, compare the first feature with the second interrupt processing record stored in the recording and storage submodule, and determine whether the second interrupt information has been processed based on the comparison result; and a processing submodule electrically connected to the comparison submodule, configured to continue processing the first interrupt information or abandon processing the first interrupt information based on the comparison result of the comparison submodule.
[0006] In one implementation, the first interrupt information includes first interrupt data; the second interrupt information includes second interrupt data; the processing submodule is configured to generate a first interrupt message based on the first interrupt data if the comparison result of the comparison submodule is that the second interrupt data has not been processed, or to abandon processing the first interrupt data if the comparison result of the comparison submodule is that the second interrupt data has been processed.
[0007] In one embodiment, the record storage submodule is further configured to increment the processing count of the first feature in the second interrupt processing record by 1 if the comparison result of the comparison submodule indicates that the second interrupt information has been processed.
[0008] In one implementation, the interrupt characteristics include: the process identifier of the process that generated the interrupt, the identifier of the client module that generated the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurred.
[0009] Secondly, embodiments of the present invention also provide a method for handling abnormal interruptions, the method comprising: acquiring first interrupt information to be processed; determining interrupt features of the first interrupt information to obtain a first feature; determining whether a second interrupt information has been processed based on an interrupt processing record and the first feature, wherein the interrupt feature of the second interrupt information is the same as the first feature, and the interrupt processing record is used to record the interrupt features of processed abnormal interrupt information; and determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed.
[0010] In one implementation, the interrupt characteristics include: the process identifier of the process that generated the interrupt, the identifier of the client module that generated the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurred.
[0011] In one implementation, determining whether the second interrupt information has been processed based on the interrupt processing record and the first feature includes: obtaining the number of times the first feature is processed in the interrupt processing record; if the number of times the first feature is processed is greater than 0, determining that the second interrupt information has been processed; or if the number of times the first feature is processed is equal to 0, determining that the second interrupt information has not been processed.
[0012] In one implementation, determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: abandoning the processing of the first interrupt information if the second interrupt information has been processed; or continuing to process the first interrupt information if the second interrupt information has not been processed.
[0013] In one embodiment, after determining whether the second interrupt information has been processed based on the interrupt handling record and the first feature, the method further includes: updating the interrupt handling record based on the first feature.
[0014] In one embodiment, the method is applied to a host, and updating the interrupt handling record according to the first feature includes: adding the first feature to the interrupt handling record if the first feature is not present in the interrupt handling record, and setting the processing count of the first feature to 1, wherein the interrupt handling record includes a first interrupt handling record set in the host and a second interrupt handling record set in the interrupt controller of a peripheral device.
[0015] In one implementation, updating the interruption processing record according to the first feature includes: if the first feature already exists in the interruption processing record, incrementing the processing count of the first feature by 1.
[0016] In one embodiment, the method is applied to a host, the interrupt handling record includes a first interrupt handling record set in the host, the step of obtaining the first interrupt information to be processed includes: in response to receiving an interrupt request, obtaining the first interrupt message to be processed; the step of determining the interrupt characteristics of the first interrupt information and obtaining a first characteristic includes: in the case that the first interrupt message is an abnormal interrupt, determining the interrupt characteristics of the first interrupt message and obtaining the first characteristic; the step of determining whether the second interrupt information has been processed based on the interrupt handling record and the first characteristic includes: based on the first interrupt handling record and the first characteristic, determining whether the second interrupt message has been processed, wherein the interrupt characteristics of the second interrupt message are the same as the first characteristic; the step of determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: based on whether the second interrupt message has been processed, determining whether to continue processing the first interrupt message.
[0017] In one embodiment, the method is applied to the interrupt controller of a peripheral device. The interrupt processing record includes a second interrupt processing record set in the interrupt controller of the peripheral device. Obtaining the first interrupt information to be processed includes: receiving first interrupt data sent by the client module of the peripheral device. Determining the interrupt characteristics of the first interrupt information and obtaining a first characteristic includes: determining the interrupt characteristics of the first interrupt data and obtaining the first characteristic. Determining whether the second interrupt information has been processed based on the interrupt processing record and the first characteristic includes: determining whether the second interrupt data has been received based on the second interrupt processing record and the first characteristic, wherein the interrupt characteristics of the second interrupt data are the same as the first characteristic. Determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: determining whether to generate a first interrupt message using the first interrupt data based on whether the second interrupt data has been received.
[0018] Thirdly, embodiments of the present invention also provide a method for handling abnormal interruptions, comprising: an interrupt controller of a peripheral device receiving first interrupt data sent by a client module of the peripheral device; the interrupt controller determining an interrupt feature of the first interrupt data to obtain a first feature; the interrupt controller determining, based on its own second interrupt processing record and the first feature, whether it has received second interrupt data, wherein the interrupt feature of the second interrupt data is the same as the first feature, and the second interrupt processing record is used to record the interrupt feature of processed abnormal interrupt data; the interrupt controller determining, based on whether it has received the second interrupt data, whether to generate a first interrupt message using the first interrupt data; and in the first interrupt message... If the number of interrupt messages exceeds a preset threshold, the interrupt controller sends an interrupt request to the host; the host, in response to receiving the interrupt request, obtains the first interrupt message; if the host determines that the first interrupt message is an abnormal interrupt, the host determines the interrupt characteristics of the first interrupt message and obtains the first characteristic; the host, based on its own first interrupt handling record and the first characteristic, determines whether it has processed a second interrupt message, wherein the interrupt characteristics of the second interrupt message are the same as the first characteristic, and the first interrupt handling record is used to record the interrupt characteristics of processed abnormal interrupt messages; the host, based on whether it has processed the second interrupt message, determines whether to continue processing the first interrupt message.
[0019] In one embodiment, after the interrupt controller determines whether the second interrupt data has been received based on the second interrupt processing record and the first feature, the method further includes: if the interrupt controller determines that the second interrupt data has been received, the interrupt controller increments the processing count of the first feature in the second interrupt processing record by 1; after the host determines whether the second interrupt message has been processed based on the first interrupt processing record and the first feature, the method further includes: if the host determines that the second interrupt message has not been processed, writing the first feature into the first interrupt processing record and the second interrupt processing record respectively, and setting the processing count of the first feature to 1 in the first interrupt processing record and the second interrupt processing record respectively; or, if the host determines that the second interrupt message has been processed, incrementing the processing count of the first feature in the first interrupt processing record by 1.
[0020] Fourthly, embodiments of the present invention also provide a peripheral device, the peripheral device including a client module and an interrupt controller, the client module being electrically connected to the interrupt controller, the client module being used to send interrupt information to the interrupt controller, and the interrupt controller being used to process the interrupt information, wherein the interrupt controller is any interrupt controller provided in embodiments of the present invention.
[0021] Fifthly, embodiments of the present invention also provide an electronic device, the electronic device comprising: a processor and a memory, the processor being electrically connected to the memory; the memory being used to store executable program code; the processor running a program corresponding to the executable program code by reading the executable program code stored in the memory, thereby implementing any of the abnormal interruption handling methods provided by embodiments of the present invention.
[0022] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement any of the abnormal interruption handling methods provided in the embodiments of the present invention.
[0023] In a seventh aspect, embodiments of the present invention also provide an exception interruption handling system, including an electronic device and a peripheral device, wherein the electronic device and the peripheral device are electrically connected to each other, wherein the electronic device is any type of electronic device provided in embodiments of the present invention, and the peripheral device is any type of peripheral device provided in embodiments of the present invention. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A schematic diagram of an interrupt controller provided for an embodiment of the present invention; Figure 2 Another schematic diagram of the interrupt controller provided for an embodiment of the present invention; Figure 3 This is a schematic diagram of a recording and storage submodule in an embodiment of the present invention; Figure 4 A flowchart of an exception interruption handling method provided for an embodiment of the present invention; Figure 5 A detailed flowchart of an exception interruption handling method provided for an embodiment of the present invention; Figure 6 A schematic diagram of the system to which the abnormal interruption handling method provided in the embodiments of the present invention is applied; Figure 7 This is an initialization flowchart for exception interrupt handling in an embodiment of the present invention; Figure 8 A detailed flowchart of an exception interruption handling method provided for an embodiment of the present invention; Figure 9 A schematic diagram of the structure of a peripheral device provided for an embodiment of the present invention; Figure 10 A schematic diagram of the structure of an electronic device provided for an embodiment of the present invention; Figure 11 This is a schematic diagram of an exception interruption handling system provided in an embodiment of the present invention. Detailed Implementation
[0026] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0027] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0028] In a first aspect, embodiments of the present invention provide an interrupt controller that can effectively reduce the amount of interrupt information processing, save system resources, and improve system performance.
[0029] like Figure 1 As shown, the interrupt controller provided in the embodiments of the present invention may include: Cache module 71 is used to receive and cache the first interrupt information sent by the client module of the peripheral device; The determination module 72, electrically connected to the cache module 71, is used to determine the interrupt characteristics of the first interrupt information, obtain the first characteristics, determine whether the second interrupt information has been received based on the second interrupt processing record and the first characteristics, and determine whether to continue processing the first interrupt information based on whether the second interrupt information has been received. The interrupt characteristics of the second interrupt information are the same as the first characteristics, and the second interrupt processing record is used to record the interrupt characteristics of abnormal interrupt information processed by the interrupt controller.
[0030] The interrupt controller provided in this embodiment of the invention includes a cache module 71 that receives and caches first interrupt information sent by a client module of a peripheral device; and a determination module 72, electrically connected to the cache module 71, that determines the interrupt characteristics of the first interrupt information, obtains the first characteristics, determines whether second interrupt information has been received based on a second interrupt processing record and the first characteristics, and determines whether to continue processing the first interrupt information based on whether the second interrupt information has been received. Since the interrupt characteristics of the second interrupt information are the same as the first characteristics, the first interrupt information can be filtered based on whether the second interrupt information has been processed previously, so that some of the first interrupt information does not need to be processed, thereby effectively reducing the amount of interrupt information processed, saving system resources, and improving system performance.
[0031] In embodiments of the present invention, interrupt features can be characteristic descriptions of interrupt information used to identify an interrupt message or a class of interrupt information. For example, the features of these interrupt messages can include the entity that generated the interrupt message, or the type of interrupt message, etc. The client module of the peripheral device can refer to the IP (intellectual property) module of the peripheral device.
[0032] The second interrupt handling record can be gradually accumulated during the interrupt information processing process, and is used to record the interrupt characteristics of processed abnormal interrupt information. Here, abnormal interrupts are relative to normal interrupts, and specifically refer to interrupts caused by abnormal situations during program execution. For example, in one example, an abnormal interrupt could be caused by a peripheral device using unallocated physical memory.
[0033] Specifically, such as Figure 2 As shown, in one embodiment, the determining module 72 may include: The record storage submodule 721 is configured to store the second interrupt handling record; The comparison submodule 722 is electrically connected to the cache module 71 and the record storage submodule 721 respectively. It is configured to determine the interrupt feature of the first interrupt information, obtain the first feature, compare the first feature with the second interrupt processing record stored in the record storage submodule, and determine whether the second interrupt information has been processed based on the comparison result. The interrupt feature of the second interrupt information is the same as the first feature. The processing submodule 723 is electrically connected to the comparison submodule 722 and is configured to either continue processing the first interrupt information or abandon processing the first interrupt information based on the comparison result of the comparison submodule 722.
[0034] In one implementation, the interrupt feature includes: a process identifier of the process that generated the interrupt, an identifier of the client module in the peripheral device that generated the interrupt, and the virtual memory page containing the virtual address accessed when the interrupt occurred. For example, in one instance, the interrupt feature can be represented as (pid1002, GPU01, VA11), where pid1002 represents the process identifier of the process that generated the interrupt, GPU01 represents the identifier of the client module in the peripheral device that generated the interrupt, and VA11 represents the virtual memory page containing the virtual address accessed when the interrupt occurred. A virtual memory page can include multiple virtual addresses, with the high-order bits of the virtual addresses within the same virtual memory page being the same, while the low-order bits are different. Optionally, the number of virtual addresses included in a virtual memory page varies depending on the page size. For example, in one instance, the virtual memory page size can be 4K, meaning it includes 4K virtual addresses; in another instance, the virtual memory page size can be 2M, meaning it includes 4M virtual addresses.
[0035] In one embodiment, the first interrupt information includes first interrupt data; the second interrupt information includes second interrupt data; the processing submodule 723 is configured to generate a first interrupt message based on the first interrupt information if the comparison result of the comparison submodule 722 is that the second interrupt information has not been processed, or to abandon processing the first interrupt information if the comparison result of the comparison submodule 722 is that the second interrupt information has been processed.
[0036] For example, if the interrupt handling record (pid1002, GPU, VA11, 12) shows that the first feature (pid1002, GPU, VA11) has been processed 12 times, then it can be determined that the second interrupt information has been processed. Conversely, if the interrupt handling record does not contain the record for (pid1002, GPU, VA11, 12), then it can be determined that the first feature has been processed 0 times.
[0037] Figure 3 The diagram shows the record storage submodule 721 in the interrupt controller (IH), which can be implemented based on a cache to store interrupt characteristics and counters. For example, each cache line is 64 bits long, and the registers are also 64 bits long. The process identifier (PID) of the process that generated the interrupt is bits 63 to 56, the identifier (IP Src) of the client module that generated the interrupt in the peripheral device is bits 55 to 48, the virtual memory page (VA) containing the virtual address accessed when the interrupt occurred is bits 47 to 12, and the repeat count (dup) is bits 11 to 0. Details are as follows: pid[63:56]: Process ID IP src[55:48]: Which client (i.e., the client module of the peripheral device) was the source of the interrupt? VA[47:12]: The virtual memory page where the virtual address is located dup[11:0]: Repeat count, the register stops counting when the maximum value is reached.
[0038] For example, the first characteristic of the first interrupt information is (pid1002, GPU, VA11). After determining that the second interrupt information has been processed by obtaining the interrupt processing record (pid1002, GPU, VA11, 12), the processing of the first interrupt information is abandoned.
[0039] In one embodiment, the recording and storage submodule 721 is further configured to increment the processing count of the first feature in the second interrupt processing record by 1 if the comparison result of the comparison submodule 722 indicates that the second interrupt information has been processed.
[0040] Secondly, embodiments of the present invention provide a method for handling abnormal interruptions, which can effectively reduce the amount of interruption information processing, save system resources, and improve system performance.
[0041] like Figure 4 As shown, an embodiment of the present invention provides a method for handling abnormal interruptions, including: S11, Obtain the first interrupt information to be processed; In this step, the first interrupt information to be processed can be obtained. For example, the first interrupt information may be an exception interrupt generated when the GPU uses unallocated GPU physical memory during device use. Another example is an exception interrupt generated when multiple GPU cores process the same abnormal address in parallel during GPU computation.
[0042] S12, determine the interrupt feature of the first interrupt information, and obtain the first feature; After obtaining the first interrupt information to be processed in step S11, the interrupt characteristics of the first interrupt information can be determined. Interrupt characteristics can be feature descriptions of the interrupt information, used to identify a single interrupt information or a class of interrupt information. For example, the characteristics of these interrupt information may include the entity that generated the interrupt information, or the type of interrupt information, etc.
[0043] S13, Based on the interrupt handling record and the first feature, determine whether the second interrupt information has been processed, wherein the interrupt feature of the second interrupt information is the same as the first feature, and the interrupt handling record is used to record the interrupt feature of the processed abnormal interrupt information; In this step, it can be determined whether the second interrupt information has been processed. The interrupt handling record can be gradually accumulated during the processing of interrupt information, recording the interrupt characteristics of processed abnormal interrupt information. Abnormal interrupts are those caused by exceptions during program execution, as opposed to normal interrupts. For example, in one scenario, an abnormal interrupt could be caused by a peripheral device using unallocated physical memory. Thus, the presence of the first characteristic in the interrupt handling record can determine whether the second interrupt information has been processed previously.
[0044] For example, the interrupt handling record stores interrupt feature A with PID 1001 and virtual address (VA) VA1. The first feature of the current first interrupt information is the same as interrupt feature A, which is also PID 1001 and VA1. Therefore, it can be determined that the second interrupt information with the same first feature has been processed.
[0045] S14, determine whether to continue processing the first interrupt information based on whether the second interrupt information has been processed.
[0046] In this step, it can be determined whether to continue processing the first interrupt information based on whether the second interrupt information has been processed, thus giving the opportunity to make some of the first interrupt information unnecessary to continue processing.
[0047] The abnormal interrupt handling method provided in this embodiment of the invention can acquire first interrupt information to be processed, determine the interrupt characteristics of the first interrupt information, obtain a first feature, determine whether a second interrupt information has been processed based on the interrupt processing record and the first feature, and determine whether to continue processing the first interrupt information based on whether the second interrupt information has been processed previously. Since the interrupt characteristics of the second interrupt information are the same as the first feature, the first interrupt information can be filtered based on whether the second interrupt information has been processed previously, so that some of the first interrupt information does not need to be processed, thereby effectively reducing the amount of interrupt information processing, saving system resources, and improving system performance.
[0048] It should be noted that the abnormal interrupt handling method provided in the embodiments of the present invention can be applied to the interrupt controller of a peripheral device, or to the host, or to both the interrupt controller of a peripheral device and the host. The embodiments of the present invention do not limit this.
[0049] In an embodiment of the present invention, first interrupt information can be obtained in step S11, and interrupt features of the first interrupt information can be determined in step S12 to obtain a first feature. The interrupt feature can be used to identify an interrupt information or interrupt information of the same type with the same interrupt features.
[0050] Specifically, in one embodiment of the present invention, the interrupt feature may include: a process identifier of the process that generated the interrupt, an identifier of the client module that generated the interrupt in the peripheral device, and a virtual memory page containing the virtual address accessed when the interrupt occurred. For example, in one example, the interrupt feature may be represented as (pid1002, GPU01, VA11), where pid1002 represents the process identifier of the process that generated the interrupt, GPU01 represents the identifier of the client module that generated the interrupt in the peripheral device, and VA11 represents the virtual memory page containing the virtual address accessed when the interrupt occurred. A virtual memory page may include multiple virtual addresses, with the high-order bits of the virtual addresses within the same virtual memory page being the same, while the low-order bits are different. Optionally, the number of virtual addresses included in a virtual memory page varies depending on the size of the virtual memory page. For example, in one example, the size of the virtual memory page may be 4K, meaning it includes 4K virtual addresses; in another example, the size of the virtual memory page may be 2M, meaning it includes 4M virtual addresses.
[0051] In step S12, the interrupt characteristics of the first interrupt information are determined. After obtaining the first characteristic, in step S13, based on the interrupt processing record and the first characteristic, it can be determined whether the second interrupt information has been processed, wherein the interrupt characteristics of the second interrupt information are the same as the first characteristic. The interrupt processing record can be a statistical record of processed interrupts pre-stored by hardware or software. Each time new interrupt information is obtained, the characteristics of the new interrupt information can be compared with the interrupt processing record to determine whether interrupt information with the same characteristics has been processed previously. Further, in one embodiment, the interrupt processing record can also record the number of times each interrupt characteristic is processed. If the interrupt processing record does not contain that interrupt characteristic, or although it contains that interrupt characteristic, but the number of times it is processed is 0, it can be determined that interrupt information with that interrupt characteristic has not been processed previously.
[0052] In one embodiment of the present invention, the interrupt feature may include multiple feature fields. If all of these feature fields correspond to the same value, it can be determined that the two interrupt features are the same. For example, in one implementation, the interrupt feature of the first interrupt information is (pid1002, GPU01, VA11). If the interrupt processing record also stores the interrupt feature (pid1002, GPU01, VA11), it can be determined that a second interrupt information with the same interrupt feature has been processed previously. Otherwise, if the interrupt processing record does not store the interrupt feature (pid1002, GPU01, VA11), it can be determined that a second interrupt information with the same interrupt feature has not been processed previously.
[0053] In embodiments of the present invention, a single virtual memory page may include multiple virtual addresses. Therefore, for two interrupt features, as long as the process identifier of the process generating the interrupt, the identifier of the client module generating the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurs are all the same, the two interrupt features can be considered to be the same. It is not required that the virtual address accessed when the interrupt occurs is also the same. That is to say, if the process identifier of the process generating the interrupt is the same and the identifier of the client module generating the interrupt in the peripheral device is the same, as long as they appear in the same virtual memory page, the two interrupt features can be considered to be the same. In subsequent steps, it is determined whether to continue processing the first interrupt information with the same interrupt feature, thereby effectively reducing the number of interrupt information that needs to be processed.
[0054] For example, in one implementation, for a PCIe device, during operation, interrupt information under abnormal circumstances may contain a large amount of repetitive information, causing the host system to lag during interrupt handling. In this embodiment, by defining interrupt characteristics, it is possible to avoid the large amount of repetitive interrupt information generated by the PCIe device being centrally processed by the host, thereby improving the interrupt handling capability of the PCIe device and preventing performance degradation of the host system.
[0055] Specifically, in one embodiment of the present invention, step S12, determining whether the second interrupt information has been processed based on the interrupt processing record and the first feature, may include: obtaining the number of times the first feature is processed in the interrupt processing record; if the number of times the first feature is processed is greater than 0, determining that the second interrupt information has been processed; or if the number of times the first feature is processed is equal to 0, determining that the second interrupt information has not been processed. For example, if the number of times the first feature (pid1002, GPU, VA11) is processed in the interrupt processing record (pid1002, GPU, VA11, 12) is 12, then it can be determined that the second interrupt information has been processed. As another example, if the interrupt processing record does not contain the record (pid1002, GPU, VA11, 12), then it can be determined that the number of times the first feature is processed is 0.
[0056] For example, one form of interrupt handling record can be as follows: Figure 3 As shown in the diagram. Here, pid is the process identifier of the interrupted process, ip src is the identifier of the client module (client) that generated the interrupt in the peripheral device, VA is the virtual memory page containing the virtual address accessed when the interrupt occurred, and dup is the repeat counter.
[0057] After determining whether the second interrupt information has been processed, step S14 can determine whether to continue processing the first interrupt information based on whether the second interrupt information has been processed. In one embodiment of the present invention, determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: abandoning the processing of the first interrupt information if the second interrupt information has been processed; or continuing to process the first interrupt information if the second interrupt information has not been processed. For example, the first feature of the first interrupt information is (pid1002, GPU, VA11). After determining that the second interrupt information has been processed by obtaining the interrupt processing record (pid1002, GPU, VA11, 12), the processing of the first interrupt information is abandoned.
[0058] In one implementation, after determining whether the second interrupt information has been processed based on the interrupt handling record and the first feature, the method further includes: updating the interrupt handling record based on the first feature. For example, if the first feature of the first interrupt information is (pid1002, GPU, VA11), and after determining that the second interrupt information has been processed by obtaining the interrupt handling record (pid1002, GPU, VA11, 12), then the number of times 12 of the interrupt handling record is updated to 13. For a method for handling abnormal interrupts applied to a host, when updating the interrupt handling record, if the first feature is not present in the interrupt handling record, then the first feature is added to the interrupt handling record, and the processing count of the first feature is set to 1.
[0059] In one implementation, the method is applied to a host, and updating the interrupt handling record according to the first feature includes: if the first feature does not exist in the interrupt handling record, adding the first feature to the interrupt handling record and setting the processing count of the first feature to 1; or, if the first feature already exists in the interrupt handling record, incrementing the processing count of the first feature by 1. For example, if the first feature of the first interrupt information is (pid1003, GPU, VA13), and there is no second interrupt information with the same first feature in the interrupt handling record, then a record is added to the interrupt handling record: (pid1003, GPU, VA13, 1).
[0060] The above embodiments can be applied to the interrupt controller of a peripheral device or a host. When the method is applied to a host, the interrupt handling record may include a first interrupt handling record set in the host. Obtaining the first interrupt information to be processed includes: in response to receiving an interrupt request, obtaining the first interrupt message to be processed; determining the interrupt characteristics of the first interrupt information and obtaining the first characteristic includes: in the case that the first interrupt message is an abnormal interrupt, determining the interrupt characteristics of the first interrupt message and obtaining the first characteristic; determining whether the second interrupt information has been processed based on the interrupt handling record and the first characteristic includes: determining whether the second interrupt message has been processed based on the first interrupt handling record and the first characteristic, wherein the interrupt characteristics of the second interrupt message are the same as the first characteristic; determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: determining whether to continue processing the first interrupt message based on whether the second interrupt message has been processed.
[0061] Specifically, in this embodiment, the interrupt handling record includes a first interrupt handling record set in the host. The parts that are the same as before will not be repeated in this embodiment. In specific implementation, in response to receiving an interrupt request, a first interrupt message to be processed is obtained. It should be noted that in this embodiment, what is obtained to be processed is the first interrupt message. Specifically, the PCIe interrupt controller processes the client-side interrupt information into an interrupt message. The interrupt characteristics in the interrupt message are the same as the interrupt characteristics in the interrupt information.
[0062] In one embodiment, the method is applied to the interrupt controller of a peripheral device. The interrupt handling record includes a second interrupt handling record set in the interrupt controller of the peripheral device. Obtaining the first interrupt information to be processed includes: receiving first interrupt data sent by the client module of the peripheral device, wherein the first interrupt data may be, for example, an interrupt cookie (small file). Determining the interrupt characteristics of the first interrupt information and obtaining a first characteristic includes: determining the interrupt characteristics of the first interrupt data and obtaining a first characteristic. Determining whether the second interrupt information has been processed based on the interrupt handling record and the first characteristic includes: determining whether the second interrupt data has been received based on the second interrupt handling record and the first characteristic, wherein the interrupt characteristics of the second interrupt data are the same as the first characteristic. Determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: determining whether to generate a first interrupt message using the first interrupt data based on whether the second interrupt data has been received.
[0063] Specifically, in this embodiment, the interrupt handling record includes a second interrupt handling record set in the interrupt controller of the peripheral device. In this embodiment, the parts that are the same as before will not be repeated. In specific implementation, in response to receiving an interrupt request, first interrupt data to be processed is obtained. It should be noted that in this embodiment, the first interrupt data to be processed is obtained. Specifically, the PCIe interrupt controller processes the client module's interrupt data into an interrupt message. The interrupt characteristics in the interrupt message are the same as the interrupt characteristics in the interrupt data.
[0064] In one embodiment, the abnormal interrupt handling method is applied to the interrupt controller of a peripheral device or to the host. In this embodiment, the abnormal interrupt handling method can be applied to the interrupt controller of a peripheral device, the host, or both simultaneously. If the second interrupt information has already been processed, the first interrupt information can be filtered out, thus reducing the amount of duplicate interrupt information occupying the MSI (Message Signaled Interrupts) processing cache space. The abnormal interrupt handling method applied to the interrupt controller of the peripheral device and the abnormal interrupt handling method applied to the host work together to improve the utilization efficiency of the MSI processing cache space, thereby enhancing interrupt information processing capabilities, effectively improving PCIe device performance, and significantly improving system performance.
[0065] The following detailed description of the abnormal interruption handling method provided by the embodiments of the present invention is based on a specific example.
[0066] like Figure 5 As shown, the abnormal interruption handling method provided by the embodiments of the present invention may include: S401. Obtain the first interrupt information to be processed; S402. Determine the interrupt characteristics of the first interrupt information to obtain the first characteristic; The interrupt characteristics include: the process identifier of the process that caused the interrupt, the identifier of the client module that caused the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurred.
[0067] S403. Obtain the number of times the first feature corresponds to the interruption handling record; the interruption handling record is used to record the interruption feature of processed abnormal interruption information. S404. If the number of times the first feature has been processed is greater than 0, it is determined that the second interrupt information has been processed; or if the number of times the first feature has been processed is equal to 0, it is determined that the second interrupt information has not been processed. S405. Update the interruption processing record according to the first feature.
[0068] S406. If the second interrupt information has been processed, the processing of the first interrupt information is abandoned; or, If the second interrupt information has not been processed, continue processing the first interrupt information.
[0069] Thirdly, embodiments of the present invention also provide a method for handling abnormal interruptions. This method may include: an interrupt controller of a peripheral device receiving first interrupt data sent by a client module of the peripheral device; the interrupt controller determining an interrupt feature of the first interrupt data to obtain a first feature; the interrupt controller determining, based on its own second interrupt processing record and the first feature, whether it has received second interrupt data, wherein the interrupt feature of the second interrupt data is the same as the first feature, and the second interrupt processing record is used to record the interrupt feature of processed abnormal interrupt data; the interrupt controller determining, based on whether it has received the second interrupt data, whether to generate a first interrupt message using the first interrupt data; and, if the number of first interrupt messages exceeds a preset threshold, the interrupt controller sending an interrupt request to the host. In response to receiving the interrupt request, the host obtains the first interrupt message; if the host determines that the first interrupt message is an abnormal interrupt, the host determines the interrupt characteristics of the first interrupt message and obtains the first characteristic; the host determines whether it has processed the second interrupt message based on its own first interrupt handling record and the first characteristic, wherein the interrupt characteristics of the second interrupt message are the same as the first characteristic, and the first interrupt handling record is used to record the interrupt characteristics of the abnormal interrupt messages that have been processed; the host determines whether to continue processing the first interrupt message based on whether it has processed the second interrupt message.
[0070] The abnormal interruption handling method provided by the embodiments of the present invention can determine the interruption characteristics of a first interruption message or first interruption data, obtain a first characteristic, determine whether a second interruption message or second interruption data has been processed based on the interruption processing record and the first characteristic, and determine whether to continue processing the first interruption message or first interruption data based on whether the second interruption message or second interruption data has been processed previously. Since the interruption characteristics of the second interruption message or second interruption data are the same as the first characteristic, the first interruption message or second interruption data can be filtered based on whether the second interruption message or second interruption data has been processed previously, so that some of the first interruption messages or first interruption data do not need to be processed, thereby effectively reducing the amount of interruption information processing, saving system resources, and improving system performance.
[0071] Specifically, in this embodiment, the interrupt controller of the peripheral device and the host work together. The interrupt controller of the PCIe device can filter duplicate interrupt information with the same interrupt characteristics, and the host can identify and filter duplicate interrupt information with the same interrupt characteristics, realizing real-time detection and suppression of duplicate abnormal interrupts under abnormal conditions. While effectively improving the performance of the PCIe device, it also reduces the resources spent by the host in processing abnormal interrupts, further improving the efficiency of abnormal interrupt processing, avoiding the impact of a large number of duplicate abnormal interrupts on system performance, stability and reliability, thereby improving the robustness of the host.
[0072] For example, such as Figure 6 As shown, in the PCIe device IH (interrupt handler), abnormal interrupt information is filtered based on hardware (based on...). Figure 6 The determination module in the middle) identifies and filters abnormal interrupt information on the host side based on software (based on Figure 6 (This is implemented using a duplicate interrupt information identification and filtering module). In one embodiment, the determination module can be implemented in hardware, while the duplicate interrupt information identification and filtering module can be implemented in software. The cache module in the interrupt controller of the peripheral device can receive the first interrupt data sent by the client module of the peripheral device. The determination module in the interrupt controller can determine whether the second interrupt data has been received based on the second interrupt processing record and the first feature of the first interrupt data, wherein the interrupt feature of the second interrupt data is the same as the first feature. Then, based on whether the second interrupt data has been received, it determines whether to use the first interrupt data to generate a first interrupt message; if the number of the first interrupt messages is greater than a preset threshold, the interrupt controller sends an interrupt request to the host.
[0073] Upon receiving an interrupt request, the host retrieves a first interrupt message to be processed. Using a duplicate data identification module, it determines whether a second interrupt message has already been processed, wherein the interrupt characteristics of the second interrupt message are the same as the first characteristic. Then, based on whether the second interrupt message has been processed, it determines whether to continue processing the first interrupt message.
[0074] It should be noted that, in the embodiments of the present invention, the exception interruption information can follow the lifecycle of the process, such as... Figure 7 As shown, the initialization operations performed during process creation are as follows: S31, Create process; S32, through PCIe operation of the IH interrupt feature register, causes the register corresponding to the process number to be invalidated; S33, clear the record of the process number corresponding to the interrupt handling record of the host process; S34, initialization complete, waiting to receive interrupt information.
[0075] Figure 3 The diagram shows the record storage submodule in the Interrupt Controller (IH), which can be implemented based on a cache to store interrupt characteristics and counters. For example, each cache line is 64 bits long, where the process identifier (PID) of the process that generated the interrupt is bits 63 to 56, the identifier (IP Src) of the client module that generated the interrupt in the peripheral device is bits 55 to 48, the virtual memory page (VA) containing the virtual address accessed when the interrupt occurred is bits 47 to 12, and the repeat count (dup) is bits 11 to 0. Details are as follows: pid[63:56]: Process ID IP src[55:48]: Which client (i.e., the client module of the peripheral device) was the source of the interrupt? VA[47:12]: The virtual memory page where the virtual address is located dup[11:0]: Repeat count, the register stops counting when the maximum value is reached.
[0076] like Figure 8 As shown, in one embodiment of the present invention, the method for handling abnormal interruptions may include: ① In the event of an anomaly, the client module in the PCIe device triggers an interrupt, and the IH controller receives the interrupt information from the client; ② Filtering interrupt information operation: Compare the interrupt characteristics from this IP source end to see if they already exist in the second interrupt handling record; ③ If an interruption exists and the interruption count is greater than 0, the interruption count is increased, the interruption information is discarded, and the current processing ends; ④ If the interrupt feature appears for the first time, the interrupt information is processed into an interrupt message and stored in the MSI interrupt buffer (e.g., ring buffer); when the data in the IH MSI buffer exceeds a predetermined threshold, an MSI interrupt is generated and the host is notified to process it. ⑤ When the host receives an MSI interrupt, it processes each interrupt message from the IH MSI buffer. If the interrupt is being processed for the first time, it records it in its own first interrupt processing record and the device's second interrupt processing record. ⑥ If the interruption characteristic is not the first occurrence, the host updates its first interrupt handling record and abandons processing the interruption message; When a new interrupt occurs, repeat steps 1-6 above.
[0077] In one embodiment, after the interrupt controller determines whether the second interrupt data has been received based on the second interrupt processing record and the first feature, the method further includes: if the interrupt controller determines that the second interrupt data has been received, the interrupt controller increments the processing count of the first feature in the second interrupt processing record by 1; after the host determines whether the second interrupt message has been processed based on the first interrupt processing record and the first feature, the method further includes: if the host determines that the second interrupt message has not been processed, writing the first feature into the first interrupt processing record and the second interrupt processing record respectively, and setting the processing count of the first feature to 1 in the first interrupt processing record and the second interrupt processing record respectively; or, if the host determines that the second interrupt message has been processed, incrementing the processing count of the first feature in the first interrupt processing record by 1.
[0078] In one implementation, the interrupt characteristics include: the process identifier of the process that generated the interrupt, the identifier of the client module that generated the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurred.
[0079] Fourthly, embodiments of the present invention provide a peripheral device that can effectively reduce the amount of interrupt information processing, save system resources, and improve system performance.
[0080] like Figure 9 As shown, the peripheral device 6 provided in the embodiment of the present invention may include a client module 61 and an interrupt controller 62. The client module 61 is electrically connected to the interrupt controller 62. The client module 61 is used to send interrupt information to the interrupt controller 62. The interrupt controller 62 is used to process the interrupt information. The interrupt controller 62 is any interrupt controller provided in the embodiment of the present invention, and thus can also achieve the corresponding technical effects. It has been described in detail above and will not be repeated here.
[0081] Fifthly, embodiments of the present invention also provide an electronic device that can effectively reduce the amount of interrupt information processing, save system resources, and improve system performance.
[0082] like Figure 10 As shown, the electronic device provided in the embodiments of the present invention may include: a processor 81 and a memory 82, wherein the processor 81 and the memory 82 are electrically connected; the memory 82 is used to store executable program code; the processor 81 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 82, so as to implement any of the abnormal interruption handling methods provided in the foregoing embodiments.
[0083] For details on the specific execution process of the above steps by the processor 81 and the steps further executed by the processor 81 by running executable program code, please refer to the description of the foregoing embodiments, which will not be repeated here.
[0084] Sixthly, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement any of the abnormal interruption handling methods provided in the foregoing embodiments, thus achieving the corresponding technical effects. This has been described in detail above and will not be repeated here.
[0085] The seventh aspect, such as Figure 11 As shown, embodiments of the present invention also provide an abnormal interruption handling system, including an electronic device 91 and a peripheral device 92, which are electrically connected to each other. The electronic device 91 is any of the electronic devices provided in the foregoing embodiments, and the peripheral device 92 is any of the peripheral devices provided in the foregoing embodiments. Therefore, the corresponding technical effects can also be achieved. This has been described in detail above and will not be repeated here.
[0086] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0087] The various embodiments in this specification are described in a related manner. For the same or similar parts between the various embodiments, please refer to each other. Each embodiment focuses on describing the differences from other embodiments.
[0088] In particular, the device embodiment is basically similar to the method embodiment, so the description is relatively simple. For relevant details, please refer to the description of the method embodiment.
[0089] For ease of description, the above apparatus is described by dividing it into various functional units / modules. Of course, in implementing this invention, the functions of each unit / module can be implemented in one or more software and / or hardware.
[0090] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0091] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An interrupt controller, characterized in that, include: The caching module is used to receive and cache the first interrupt information sent by the client module of the peripheral device; The determination module, electrically connected to the cache module, is used to determine the interrupt characteristics of the first interrupt information, obtain the first characteristic, determine whether the second interrupt information has been received based on the second interrupt processing record and the first characteristic, and determine whether to continue processing the first interrupt information based on whether the second interrupt information has been received. The interrupt characteristics of the second interrupt information are the same as the first characteristic, and the second interrupt processing record is used to record the interrupt characteristics of abnormal interrupt information processed by the interrupt controller.
2. The interrupt controller according to claim 1, characterized in that, The determining module includes: The record storage submodule is configured to store the second interrupt handling record; The comparison submodule is electrically connected to the cache module and the record storage submodule, respectively, and is configured to determine the interrupt feature of the first interrupt information, obtain the first feature, compare the first feature with the second interrupt processing record stored in the record storage submodule, and determine whether the second interrupt information has been processed based on the comparison result. The processing submodule, electrically connected to the comparison submodule, is configured to either continue processing the first interrupt information or abandon processing the first interrupt information based on the comparison result of the comparison submodule.
3. The interrupt controller according to claim 2, characterized in that, The first interrupt information includes first interrupt data; the second interrupt information includes second interrupt data. The processing submodule is configured to generate a first interrupt message based on the first interrupt data if the comparison result of the comparison submodule is that the second interrupt data has not been processed, or to abandon processing the first interrupt data if the comparison result of the comparison submodule is that the second interrupt data has been processed.
4. The interrupt controller according to claim 2, characterized in that, The record storage submodule is further configured to increment the processing count of the first feature in the second interrupt processing record by 1 if the comparison result of the comparison submodule indicates that the second interrupt information has been processed.
5. The interrupt controller according to claim 1, characterized in that, The interrupt characteristics include: the process identifier of the process that generated the interrupt, the identifier of the client module that generated the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurred.
6. A method for handling abnormal interruptions, characterized in that, The method includes: Obtain the first interrupt information to be processed; Determine the interrupt characteristics of the first interrupt information to obtain the first characteristic; Based on the interrupt handling record and the first feature, it is determined whether the second interrupt information has been processed, wherein the interrupt feature of the second interrupt information is the same as the first feature, and the interrupt handling record is used to record the interrupt feature of the processed abnormal interrupt information; Whether to continue processing the first interrupt information is determined based on whether the second interrupt information has been processed.
7. The method according to claim 6, characterized in that, The interrupt characteristics include: the process identifier of the process that generated the interrupt, the identifier of the client module that generated the interrupt in the peripheral device, and the virtual memory page where the virtual address accessed when the interrupt occurred.
8. The method according to claim 6, characterized in that, The step of determining whether the second interrupt information has been processed based on the interrupt handling record and the first feature includes: Obtain the number of times the first feature corresponds to the interrupt handling record; If the number of times the first feature is processed is greater than 0, it is determined that the second interrupt information has been processed; or if the number of times the first feature is processed is equal to 0, it is determined that the second interrupt information has not been processed.
9. The method according to claim 6, characterized in that, The step of determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: If the second interrupt information has already been processed, the processing of the first interrupt information is abandoned; or, If the second interrupt information has not been processed, continue processing the first interrupt information.
10. The method according to claim 6, characterized in that, After determining whether the second interrupt information has been processed based on the interrupt handling record and the first feature, the method further includes: Update the interruption processing record based on the first feature.
11. The method according to claim 10, characterized in that, The method is applied to a host, and updating the interrupt handling record according to the first feature includes: If the first feature is not present in the interrupt handling record, the first feature is added to the interrupt handling record, and the number of times the first feature is processed is set to 1. The interrupt handling record includes a first interrupt handling record set in the host and a second interrupt handling record set in the interrupt controller of the peripheral device.
12. The method according to claim 10, characterized in that, Updating the interruption processing record based on the first feature includes: if the first feature already exists in the interruption processing record, incrementing the processing count of the first feature by 1.
13. The method according to claim 6, characterized in that, The method is applied to a host, and the interrupt handling record includes a first interrupt handling record set in the host. The acquisition of the first interrupt information to be processed includes: In response to receiving an interrupt request, the first interrupt message to be processed is obtained; The step of determining the interrupt feature of the first interrupt information to obtain the first feature includes: In the case that the first interrupt message is an abnormal interrupt, the interrupt characteristics of the first interrupt message are determined, and the first characteristics are obtained; The step of determining whether the second interrupt information has been processed based on the interrupt handling record and the first feature includes: Based on the first interrupt handling record and the first feature, determine whether the second interrupt message has been processed, wherein the interrupt feature of the second interrupt message is the same as the first feature; The step of determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: Whether to continue processing the first interrupt message is determined based on whether the second interrupt message has been processed.
14. The method according to claim 6, characterized in that, The method is applied to the interrupt controller of a peripheral device, and the interrupt handling record includes a second interrupt handling record set in the interrupt controller of the peripheral device. The acquisition of the first interrupt information to be processed includes: Receive the first interrupt data sent by the client module of the peripheral device; The step of determining the interrupt feature of the first interrupt information to obtain the first feature includes: Determine the interrupt characteristics of the first interrupt data to obtain the first characteristic; The step of determining whether the second interrupt information has been processed based on the interrupt handling record and the first feature includes: Based on the second interrupt handling record and the first feature, determine whether the second interrupt data has been received, wherein the interrupt feature of the second interrupt data is the same as the first feature; The step of determining whether to continue processing the first interrupt information based on whether the second interrupt information has been processed includes: Whether to use the first interrupt data to generate a first interrupt message depends on whether the second interrupt data has been received.
15. A method for handling abnormal interruptions, characterized in that, include: The interrupt controller of the peripheral device receives the first interrupt data sent by the client module of the peripheral device; The interrupt controller determines the interrupt characteristics of the first interrupt data to obtain a first characteristic; The interrupt controller determines whether it has received second interrupt data based on its own second interrupt handling record and the first feature, wherein the interrupt feature of the second interrupt data is the same as the first feature, and the second interrupt handling record is used to record the interrupt feature of the processed abnormal interrupt data; The interrupt controller determines whether to generate a first interrupt message using the first interrupt data based on whether the second interrupt data has been received. If the number of the first interrupt messages exceeds a preset threshold, the interrupt controller sends an interrupt request to the host. The host, in response to receiving the interrupt request, obtains the first interrupt message; If the host determines that the first interrupt message is an abnormal interrupt, the host determines the interrupt characteristics of the first interrupt message and obtains the first characteristic. The host determines whether it has processed the second interrupt message based on its first interrupt handling record and the first feature, wherein the interrupt feature of the second interrupt message is the same as the first feature, and the first interrupt handling record is used to record the interrupt feature of the abnormal interrupt message that has been processed. The host determines whether to continue processing the first interrupt message based on whether the second interrupt message has been processed.
16. The method according to claim 15, characterized in that, After the interrupt controller determines whether the second interrupt data has been received based on the second interrupt handling record and the first feature, the method further includes: If the interrupt controller determines that the second interrupt data has been received, the interrupt controller increments the processing count of the first feature in the second interrupt processing record by 1; After the host determines whether the second interrupt message has been processed based on the first interrupt handling record and the first feature, the method further includes: If the host determines that the second interrupt message has not been processed, the first feature is written into the first interrupt processing record and the second interrupt processing record respectively, and the processing count of the first feature is set to 1 in the first interrupt processing record and the second interrupt processing record respectively; or, If the host determines that the second interrupt message has been processed, the processing count of the first feature in the first interrupt processing record is incremented by 1.
17. A peripheral device, characterized in that, The peripheral device includes a client module and an interrupt controller. The client module is electrically connected to the interrupt controller. The client module is used to send interrupt information to the interrupt controller. The interrupt controller is used to process the interrupt information. The interrupt controller is the interrupt controller according to any one of claims 1 to 5.
18. An electronic device, characterized in that, The electronic device includes: a processor and a memory, wherein the processor is electrically connected to the memory; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the abnormal interruption handling method of any one of claims 6 to 13.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the abnormal interruption handling method according to any one of claims 6 to 13.
20. An exception interruption handling system, characterized in that, It includes electronic devices and peripheral devices, which are electrically connected to each other, wherein the electronic device is any of the electronic devices according to claim 18, and the peripheral devices are any of the peripheral devices according to claim 17.