Interrupt management method, device and equipment and computer readable storage medium

By periodically judging the interrupt generation conditions of the interrupt channel and sending interrupt messages, the problem that the host in the computer system cannot receive the interrupt channel interrupt message is solved, and the processing efficiency of the completion queue is improved.

CN119065899APending Publication Date: 2024-12-03SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411157031.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In a computer system, the host cannot receive the newly generated interrupt message during the blocking of the interrupt channel, resulting in the host's processing efficiency of the completion queue.

Method used

Periodically determine whether the interrupt channel meets the preset interrupt generation conditions, and sets the status signal to the first level state when it is satisfied. An interrupt message is sent to the host based on the specified signal edge of the status signal. After the host completes processing, the status signal is set to the first level state. Set to the second level state to ensure that even if the interrupt message is missed, periodic judgment can trigger the transmission of the interrupt message again.

Benefits of technology

It shortens the time when interrupt messages are missed and improves the host's processing efficiency for completing queues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065899A_ABST
    Figure CN119065899A_ABST
Patent Text Reader

Abstract

The invention discloses an interrupt management method, device and equipment and a computer readable storage medium, and belongs to the field of computers.The interrupt management method comprises the steps that whether an interrupt channel meets a preset interrupt generation condition or not is periodically judged, and a state signal is set to be in a first level state if the interrupt channel meets the preset interrupt generation condition; according to the method, the state signal is sent to the host through the interrupt channel so as to jump to the specified signal edge of the first level state based on the state signal, the host can set the state signal to be in the second level state after processing the interrupt message, and in this case, even if the host omits the interrupt message of the interrupt channel, the state signal can be set to be in the second level state. Since the host can set the state signal to be in the second level state after processing the interrupt message, the periodic judgment of the interrupt generation condition can enable the state signal to appear at the specified signal edge again and trigger the transmission of the interrupt message, thereby shortening the time of missing the interrupt message and improving the processing efficiency of the host for completing the queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to an interrupt management method, device, equipment and computer-readable storage medium. Background Art

[0002] In a computer system, after completing the data read and write tasks assigned by the host, the controller of the storage device can write the task completion information into the completion queue (CQ), and the interrupt controller can send an interrupt message to the host when the status of the completion queue meets the preset conditions, so that the host can process the completion information of each task in the completion queue;

[0003] After the host responds to an interrupt message, it usually masks the interrupt channel that sent the interrupt message first, then processes the completion information of each task in the completion queue, and unmasks the interrupt channel after processing. However, in this case, the host cannot receive new interrupt messages generated by the interrupt channel during the masking period, thereby reducing the host's processing efficiency for the completion queue.

[0004] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0005] The purpose of the present invention is to provide an interrupt management method, device, equipment and computer-readable storage medium. When the interrupt channel is periodically determined to meet the preset interrupt generation conditions, the status signal can be set to the first level state, and the host can set the status signal to the second level state after processing the interrupt message. Even if omission occurs, the periodic judgment can trigger the generation of the interrupt message again.

[0006] In order to solve the above technical problems, the present invention provides an interrupt management method, which is applied to an interrupt controller of a computer system, comprising:

[0007] Periodically determine whether the interrupt channel meets a preset interrupt generation condition, wherein the interrupt generation condition refers to a condition that requires the host to process a completion queue managed by the interrupt channel;

[0008] If the condition is satisfied, setting the state signal of the interrupt channel to a first level state;

[0009] Based on a designated signal edge of the status signal, an interrupt message is sent to the host through the interrupt channel so that the host processes the completion queue managed by the interrupt channel, wherein the designated signal edge refers to: a signal edge that changes from a second level state to a first level state, and the first level state is opposite to the second level state;

[0010] In response to a processing completion signal sent by the host after processing the interrupt channel, the state signal of the interrupt channel is set to a second level state.

[0011] On the other hand, the interrupt generation condition of the interrupt channel in the non-aggregation mode includes: there is task completion information in the interrupt channel;

[0012] The interruption generation conditions of the interruption channel in the aggregation mode include: a quantity aggregation condition, the quantity aggregation condition means that the number of data entities currently to be processed by the interruption channel is greater than a first preset threshold;

[0013] Setting the state signal of the interrupt channel to a first level state includes:

[0014] If the interrupt channel is in a non-aggregation mode, setting the first state signal of the interrupt channel to a first level state;

[0015] If the interrupt channel is in the aggregation mode, the second state signal of the interrupt channel is set to a first level state, wherein the state signal includes a first state signal and a second state signal, the first state signal is a state signal of the interrupt on-off in the non-aggregation mode, and the second state signal is a state signal of the interrupt on-off in the aggregation mode;

[0016] Based on a specified signal edge of the status signal, sending an interrupt message to the host through the interrupt channel includes:

[0017] Sending an interrupt message to a host through the interrupt channel based on a specified signal edge of a status signal corresponding to the working mode of the interrupt channel;

[0018] In response to a processing completion signal sent by the host after processing the interrupt channel, setting the state signal of the interrupt channel to a second level state includes:

[0019] In response to a processing completion signal sent by the host after processing the interrupt channel, a state signal corresponding to the working mode of the interrupt channel is set to a second level state.

[0020] On the other hand, the interrupt management method further includes:

[0021] When the interrupt channel is in a non-aggregation mode, when a new task completion information appears in the completion queue managed by the interrupt channel, an event-type pulse is generated;

[0022] When the interrupt channel is in the aggregation mode, when any preset event occurs in the interrupt channel, an event-type pulse is generated, wherein the preset event includes a first event and a second event, the first event refers to: there is an error in the data entity corresponding to the task completion information of the completion queue newly added to the interrupt channel management, and the second event refers to: the task completion information of the completion queue newly added to the interrupt channel management comes from the management-type completion queue;

[0023] Based on a specified signal edge of the status signal, sending an interrupt message to the host through the interrupt channel includes:

[0024] When a specified signal edge of the status signal is detected, a status pulse is generated;

[0025] When there is at least one trigger pulse in the interrupt channel, an interrupt pulse is generated, wherein the trigger pulse includes the event-type pulse and the state-type pulse;

[0026] In response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host;

[0027] After the interrupt message of the interrupt channel is sent to the host, the interrupt message sending request of the interrupt channel is removed from the interrupt message queue.

[0028] On the other hand, in response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host comprises:

[0029] When the interrupt channel is not masked, in response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host;

[0030] The interrupt management method further includes:

[0031] When the interrupt channel is masked, in response to the interrupt pulse, the digit corresponding to the interrupt channel in the preset digit list is set to the first value, so that the host processes the completion queue of the interrupt channel whose digit in the preset digit list is the first value, and after the processing is completed, the digit of the interrupt channel to be processed is set to the second value.

[0032] On the other hand, the interrupt management method further includes:

[0033] When the interrupt channel is not masked, the interrupt message sending request of the interrupt channel to which the digit with the first value in the preset digit list belongs is added into the interrupt message queue of the host.

[0034] On the other hand, the interrupt generation conditions of the interrupt channel in the aggregation mode also include the time aggregation conditions;

[0035] The time aggregation condition means that the time when the number of data entities to be processed by the interruption channel is in a preset interval is greater than a preset duration, and the preset interval is greater than zero and less than the first preset threshold.

[0036] On the other hand, the interrupt management method further includes:

[0037] Determine whether there is a send request loss problem in each interrupt channel in the computer system, wherein the send request loss problem refers to: the interrupt message send request loss problem caused by the saturation of the interrupt message queue of the interrupt channel;

[0038] If it exists, the special interrupt send request is added to the interrupt message queue of the host so that when the host receives the special interrupt, it can selectively control the interrupt channel to enter the aggregation mode.

[0039] In order to solve the above technical problems, the present invention further provides an interrupt management device, comprising:

[0040] A first judgment module is used to periodically judge whether the interrupt channel meets the preset interrupt generation condition, and if so, trigger the first action module, wherein the interrupt generation condition refers to a condition that requires the host to process the completion queue managed by the interrupt channel;

[0041] A first action module, used for setting the state signal of the interrupt channel to a first level state;

[0042] A first sending module is used to send an interrupt message to the host through the interrupt channel based on a specified signal edge of the status signal, so that the host processes the completion queue managed by the interrupt channel, wherein the specified signal edge refers to: a signal edge that changes from a second level state to a first level state, and the first level state is opposite to the second level state;

[0043] The second action module is used to set the state signal of the interrupt channel to a second level state in response to a processing completion signal sent by the host after processing the interrupt channel.

[0044] In order to solve the above technical problems, the present invention further provides an interrupt management device, comprising:

[0045] Memory for storing computer programs;

[0046] The processor is used to implement the steps of the interrupt management method described above when executing the computer program.

[0047] In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the interrupt management method described above are implemented.

[0048] Beneficial effect: The present invention provides an interrupt management method. Considering that the premise for an interrupt channel to generate an interrupt message is to meet specific conditions, when the interrupt channel is missed after the interrupt message, the specific condition of the interrupt channel "used to generate an interrupt message" still exists. Therefore, the present invention periodically judges whether the interrupt channel meets the preset interrupt generation condition, and sets the status signal to the first level state if it is met, so as to send an interrupt message to the host through the interrupt channel based on the status signal jumping to the specified signal edge of the first level state, and the host can set the status signal to the second level state after processing the interrupt message. In this case, even if the host misses the interrupt message of the interrupt channel, since the host can set the status signal to the second level state after processing the interrupt message, the periodic judgment of the interrupt generation condition can make the status signal appear again The specified signal edge triggers the sending of the interrupt message, thereby shortening the time when the interrupt message is missed and improving the host's processing efficiency for the completion queue.

[0049] The present invention also provides an interrupt management device, equipment and computer-readable storage medium, which have the same beneficial effects as the above interrupt management method. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the relevant technologies and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A flowchart of an interrupt management method provided by the present invention;

[0052] Figure 2 A flow chart of another interrupt management method provided by the present invention;

[0053] Figure 3 A schematic diagram of the structure of an interrupt management device provided by the present invention;

[0054] Figure 4 A schematic diagram of the structure of another interrupt management device provided by the present invention;

[0055] Figure 5 A schematic diagram of the structure of an interrupt management device provided by the present invention;

[0056] Figure 6 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0057] The core of the present invention is to provide an interrupt management method, device, equipment and computer-readable storage medium. When the interrupt channel is periodically determined to meet the preset interrupt generation conditions, the status signal can be set to the first level state, and the host can set the status signal to the second level state after processing the interrupt message. Even if omission occurs, the periodic judgment can trigger the generation of the interrupt message again.

[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Please refer to Figure 1 , Figure 1 A flowchart of an interrupt management method provided by the present invention is provided. The interrupt management method is applied to an interrupt controller of a computer system, comprising:

[0060] S101: periodically determining whether an interrupt channel satisfies a preset interrupt generation condition, wherein the interrupt generation condition refers to a condition requiring the host to process a completion queue managed by the interrupt channel;

[0061] Specifically, taking into account the technical problems in the above background technology, and in combination with the consideration that: the premise for the interrupt channel to generate an interrupt message is to meet specific conditions, when the interrupt channel is omitted after the interrupt message, the specific condition of the interrupt channel "for generating an interrupt message" still exists, so in order to enable the interrupt channel to quickly generate an interrupt message again, periodic detection of the above-mentioned specific conditions can solve this problem, so in the embodiment of the present invention, it is possible to periodically determine whether the interrupt channel meets the preset interrupt generation condition.

[0062] The interrupt generation condition may be set autonomously, and its specific type may be various, which is not limited in the embodiment of the present invention.

[0063] Specifically, the judgment period of "whether the interrupt channel meets the preset interrupt generation condition" can be set independently, for example, it can be a clock cycle, etc., and the embodiment of the present invention is not limited here.

[0064] Specifically, the interrupt mechanism of the embodiment of the present invention may belong to the interrupt mechanism in a variety of protocols, such as the interrupt mechanism in the NVMe (NonVolatile Memory Host Controller Interface Specification) protocol, etc., and the embodiment of the present invention is not limited here.

[0065] The interrupt channel may refer to a MSIX (Message Signaled Interrupts x) vector.

[0066] S102: If the conditions are met, the state signal of the interrupt channel is set to a first level state;

[0067] Specifically, considering that the signal edge during the level state conversion can convey the information that "the interrupt channel meets the preset interrupt generation conditions", and before the host sets the state of the status signal to the second level state, the first level state of the status signal can indicate that the interrupt channel is in the state of "meeting the preset interrupt generation conditions but not processed by the host", the embodiment of the present invention intends to use the status signal to indicate "whether the interrupt channel meets the preset interrupt generation conditions", and to convey the information that "the interrupt channel meets the preset interrupt generation conditions" through its designated signal edge. Therefore, in the embodiment of the present invention, when the judgment result is satisfied, the status signal of the interrupt channel can be set to the first level state.

[0068] S103: Based on a designated signal edge of the status signal, an interrupt message is sent to the host through the interrupt channel so that the host processes the completion queue managed by the interrupt channel, wherein the designated signal edge refers to a signal edge that changes from the second level state to the first level state, and the first level state is opposite to the second level state;

[0069] Specifically, considering that the status signal is in the second level state in the initial case, then when the preset interrupt generation condition is met, the status signal of the interrupt channel will be changed from the second level state to the first level state, so that the specified signal edge will appear. Since "meeting the preset interrupt generation condition" means that the interrupt channel requires the host to process the completion queue, the embodiment of the present invention can send an interrupt message to the host through the interrupt channel based on the specified signal edge of the status signal, so that the host can process the completion queue managed by the interrupt channel.

[0070] Among them, the first level state is opposite to the second level state, and the specific level states of the two can be set independently, for example, the first level state is a high level, and the second level state is a low level (in this case, the designated signal edge is a rising edge), etc., and the embodiment of the present invention is not limited here.

[0071] S104: In response to a processing completion signal sent by the host after processing the interrupt channel, setting the state signal of the interrupt channel to a second level state.

[0072] Specifically, considering that there may be many triggering conditions for a single interrupt channel to send an interrupt message to the host in addition to the above-mentioned "satisfying the preset interrupt generation condition", the host will shield the interrupt channel when entering the interrupt service program when processing the interrupt message, and will unshield the interrupt channel before the end of the interrupt service program. Assuming that when the host is processing an interrupt message generated by other trigger conditions (not the above-mentioned "satisfying the preset interrupt generation condition"), due to the shielding of the interrupt channel, it is impossible to receive the interrupt message generated by the interrupt channel due to "satisfying the preset interrupt generation condition". In this case, if the host sets the status signal of the interrupt channel to the second level state after processing the interrupt message, then due to the periodic judgment action, it will quickly discover that the interrupt channel "satisfies the preset interrupt generation condition" and set the status signal of the interrupt channel to the second level state, thereby triggering the sending of the interrupt message again, shortening the duration of interrupt message loss, and improving the host's processing efficiency of the completion queue.

[0073] Among them, the steps executed by the host in the interrupt service program mainly include: shielding the interrupt channel when entering the interrupt service program, processing the task completion information in each completion queue of the interrupt message management (the task completion information may include the number of data entities in the result data of the corresponding data reading and writing task), and unshielding the interrupt channel before exiting the interrupt service program.

[0074] The present invention provides an interrupt management method. Considering that the premise for an interrupt channel to generate an interrupt message is to meet a specific condition, when the interrupt channel is omitted after the interrupt message, the specific condition of the interrupt channel "used to generate an interrupt message" still exists. Therefore, the present invention periodically judges whether the interrupt channel meets the preset interrupt generation condition, and sets the status signal to the first level state if it is satisfied, so as to send an interrupt message to the host through the interrupt channel based on the specified signal edge of the status signal jumping to the first level state, and the host can set the status signal to the second level state after processing the interrupt message. In this case, even if the host omits the interrupt message of the interrupt channel, since the host can set the status signal to the second level state after processing the interrupt message, the periodic judgment of the interrupt generation condition can make the status signal appear again with the specified signal edge and trigger the sending of the interrupt message, thereby shortening the time when the interrupt message is omitted and improving the processing efficiency of the host for the completion queue.

[0075] Based on the above embodiments:

[0076] As an optional embodiment, the interrupt generation condition of the interrupt channel in the non-aggregation mode includes: there is task completion information in the interrupt channel;

[0077] The interruption generation conditions of the interruption channel in the aggregation mode include: a quantity aggregation condition, the quantity aggregation condition means that the number of data entities currently to be processed by the interruption channel is greater than a first preset threshold;

[0078] Setting the state signal of the interrupt channel to the first level state includes:

[0079] If the interrupt channel is in a non-aggregation mode, setting the first state signal of the interrupt channel to a first level state;

[0080] If the interrupt channel is in the aggregation mode, the second state signal of the interrupt channel is set to the first level state, wherein the state signal includes a first state signal and a second state signal, the first state signal is a state signal of the interrupt on-off in the non-aggregation mode, and the second state signal is a state signal of the interrupt on-off in the aggregation mode;

[0081] Based on the specified signal edge of the status signal, an interrupt message is sent to the host through the interrupt channel including:

[0082] Sending an interrupt message to the host through the interrupt channel based on a specified signal edge of a status signal corresponding to the working mode of the interrupt channel;

[0083] In response to a processing completion signal sent by the host after processing the interrupt channel, setting the state signal of the interrupt channel to a second level state includes:

[0084] In response to a processing completion signal sent by the host after processing the interrupt channel, a state signal corresponding to the working mode of the interrupt channel is set to a second level state.

[0085] Specifically, in a computer system, the working mode of an interrupt channel can generally be set to a non-aggregation mode and an aggregation mode. In order to enable the interrupt channel to shorten the duration of interrupt message loss in both working modes, an embodiment of the present invention sets interrupt generation conditions for the two working modes, wherein the interrupt generation conditions for the interrupt channel in the aggregation mode include: quantity aggregation conditions, and the interrupt generation conditions for the interrupt channel in the non-aggregation mode include: the existence of task completion information in the interrupt channel.

[0086] Specifically, the process of generating new task completion information in the completion queue includes: after the controller moves the result data of the data reading and writing task dispatched by the host to the host memory, the task completion information of the data reading and writing task can be added to the corresponding completion queue, and the interrupt controller can send an interrupt message to the host through the interrupt channel when each completion queue managed by the interrupt channel meets certain conditions; the basic condition for the interrupt channel to generate an interrupt message in the non-aggregate mode is: new task completion information is generated in the completion queue managed by the interrupt channel. In order to enable the interrupt channel to shorten the duration of interrupt message loss in the non-aggregate mode, an interrupt generation condition of "task completion information exists in the interrupt channel" is set for the interrupt channel in the non-aggregate mode in an embodiment of the present invention.

[0087] Of course, in addition to the above examples, the interrupt generation conditions of the interrupt channel in different working modes can also be of other types, which are not limited in the embodiment of the present invention.

[0088] As an optional embodiment, the interrupt management method further includes:

[0089] When the interrupt channel is in non-aggregation mode, when a new task completion message appears in the completion queue managed by the interrupt channel, an event pulse is generated;

[0090] When the interrupt channel is in the aggregation mode, when any preset event occurs in the interrupt channel, an event-type pulse is generated, wherein the preset event includes a first event and a second event, the first event refers to: there is an error in the data entity corresponding to the task completion information of the completion queue newly added to the interrupt channel management, and the second event refers to: the task completion information of the completion queue newly added to the interrupt channel management comes from the management-type completion queue;

[0091] Based on the specified signal edge of the status signal, an interrupt message is sent to the host through the interrupt channel including:

[0092] When a specified signal edge of the status signal is detected, a status pulse is generated;

[0093] When there is at least one trigger pulse in the interrupt channel, an interrupt pulse is generated, wherein the trigger pulse includes an event-type pulse and a state-type pulse;

[0094] In response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host;

[0095] After the interrupt message of the interrupt channel is sent to the host, the interrupt message sending request of the interrupt channel is removed from the interrupt message queue.

[0096] Specifically, the above-mentioned interrupt generation conditions can be regarded as "state-type" conditions for triggering the generation of interrupt messages, and when a specific event occurs in the interrupt channel, the generation of interrupt messages can also be triggered. Therefore, each interrupt channel in the embodiment of the present invention also includes "event-type" conditions for triggering the generation of interrupt messages. For the non-aggregate mode, the event-type conditions include "a new task completion information appears in the completion queue managed by the interrupt channel", and for the aggregate mode, the event-type conditions include the first event and the second event. These event-type conditions can take into account the more comprehensive interrupt message generation requirements of the interrupt channel in different working modes.

[0097] Of course, in addition to the above examples, the event-type conditions of the interrupt channel in different working modes can also be of various types, which are not limited in the embodiment of the present invention.

[0098] Specifically, considering that the interrupt messages generated by each interrupt channel cannot be sent to the host at the same time, they need to be queued and sent to the host in sequence through an arbitration mechanism. In addition, considering that for the same interrupt channel, if multiple different types of interrupt message generation conditions (including event conditions and status conditions) are met at the same time, then in theory, a single interrupt message can trigger the host to process the completion queue at that time. Therefore, in the embodiment of the present invention, different types of trigger pulses can be generated for event conditions and status conditions respectively, that is, event pulses are generated for event conditions, and status pulses are generated for status conditions. When there is at least one trigger pulse in the interrupt channel, an interrupt pulse is generated, that is, a logical OR operation is performed on the "trigger pulses generated by various types of interrupt message generation conditions" of the interrupt channel, thereby merging multiple trigger pulses generated at the same time into one interrupt pulse, reducing the duplication of interrupt messages and reducing the pressure on the host.

[0099] As an optional embodiment, in response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host includes:

[0100] When the interrupt channel is not masked, in response to the interrupt pulse, the interrupt message sending request of the interrupt channel is added to the interrupt message queue of the host;

[0101] Interrupt management methods also include:

[0102] When the interrupt channel is masked, in response to the interrupt pulse, the digit corresponding to the interrupt channel in the preset digit list is set to the first value, so that the host processes the completion queue of the interrupt channel whose digit in the preset digit list is the first value, and after the processing is completed, the digit of the interrupt channel to be processed is set to the second value.

[0103] Specifically, considering that the host cannot receive the interrupt message sent by the interrupt channel when the interrupt channel is blocked, the embodiment of the present invention can respond to the interrupt pulse when the interrupt channel is not blocked, and add the interrupt message sending request of the interrupt channel to the interrupt message queue of the host, so that one interrupt message sending request is selected each time for response by arbitration, that is, the interrupt message corresponding to the selected interrupt message sending request is generated and sent to the host; combined with considering that the host can obtain the status of each interrupt channel through the pure query mode, the embodiment of the present invention can respond to the interrupt pulse when the interrupt channel is blocked, and set the digit corresponding to the interrupt channel in the preset digit list to the first value, so that the host processes the completion queue of the interrupt channel whose digit in the preset digit list is the first value, and after the processing is completed, the digit of the interrupt channel to be processed is set to the second value. Since the pure query mode can be initiated by the host at its own choice, the setting of the preset digit list in the embodiment of the present invention when the interrupt channel is blocked is conducive to the host timely obtaining the information that "the interrupt channel needs the host to process the completion queue", thereby further shortening the duration of interrupt message loss and improving the efficiency of the host processing the completion queue.

[0104] The preset digital list may be a PBA (Pending bit array).

[0105] To better illustrate the embodiments of the present invention, please refer to Figure 2 , Figure 2 A flow chart of another interrupt management method provided by the present invention is provided, wherein the way to generate a trigger pulse includes a way to generate an event-type pulse (including event 1 interrupt detection, output pulse and event N interrupt detection, output pulse) and a way to generate a state-type pulse (including condition 1 detection, output (first level state) state signal and condition N detection, output (first level state) state signal), for the state signal, the level can be reduced (the second level state is low level) for one cycle under the host clearing operation, and the edge of the state signal can also be detected to output a (state-type) pulse, each trigger pulse can be processed by logic OR to obtain an interrupt pulse, and when the interrupt channel is not shielded, the rising edge of the interrupt pulse is detected, and the interrupt message sending request is set to 1 (valid), and when the interrupt message sending is completed, the interrupt message sending request can be cleared to 0 (invalid); when the interrupt channel is shielded, the rising edge of the interrupt pulse is detected, and the digital position corresponding to the interrupt channel in the preset digital array is set to 1 (first value), and the digital position corresponding to the interrupt channel in the preset digital array can also be set to 0 (second value) in response to the host clearing operation.

[0106] As an optional embodiment, the interrupt management method further includes:

[0107] When the interrupt channel is not shielded, the interrupt message sending request of the interrupt channel to which the digit with the first value in the preset digit list belongs is added into the interrupt message queue of the host.

[0108] Specifically, in addition to being actively queried by the host, in order to more promptly report to the host the situation reflected by the preset digital list that "the interrupt channel requires the host to complete queue processing", in an embodiment of the present invention, when the interrupt channel is not blocked, the interrupt message sending request of the interrupt channel to which the digit with the first value in the preset digital list belongs can be added to the interrupt message queue of the host, thereby further shortening the duration of the interrupt channel losing the interrupt message.

[0109] As an optional embodiment, the interrupt generation condition of the interrupt channel in the aggregation mode further includes a time aggregation condition;

[0110] The time aggregation condition refers to: the time when the number of data entities to be processed in the interruption channel is in a preset interval is greater than a preset duration, and the preset interval refers to being greater than zero and less than a first preset threshold.

[0111] Specifically, considering that in the aggregation mode, if the number of data entities to be processed by the interrupt channel does not reach the quantity aggregation condition for a long time, then the existing number of data entities to be processed by the interrupt channel cannot be processed. Therefore, in order to cope with this situation, in an embodiment of the present invention, the interrupt generation condition of the interrupt channel in the aggregation mode also includes a time aggregation condition, so that when the time when the number of data entities to be processed by the interrupt channel is in a preset interval greater than a preset duration, a state-type pulse can be generated to trigger the generation of an interrupt pulse.

[0112] The first preset threshold value may be set independently, and the embodiment of the present invention does not limit this.

[0113] As an optional embodiment, the interrupt management method further includes:

[0114] Determine whether there is a send request loss problem in each interrupt channel in the computer system, wherein the send request loss problem refers to: the interrupt message send request loss problem caused by the saturation of the interrupt message queue of the interrupt channel;

[0115] If it exists, the special interrupt send request is added to the interrupt message queue of the host so that when the host receives the special interrupt, it can selectively control the interrupt channel to enter the aggregation mode.

[0116] Specifically, due to the limited capacity of the interrupt message queue, if too many interrupt message sending requests are generated in the computer system and the interrupt message queue is saturated, it will cause the interrupt channel to have a sending request loss problem. In order to solve this problem, the embodiment of the present invention can actively determine whether there is a sending request loss problem in each interrupt channel in the computer system. If there is a sending request loss problem in at least one interrupt channel, it can be solved by "adding a special interrupt sending request to the interrupt message queue of the host", that is, by sending a special interrupt to inform the host of the situation, so that when the host receives the special interrupt, it can selectively control the interrupt channel to enter the aggregation mode.

[0117] Among them, in order to ensure that the special interrupt sending request can be processed in time after being added to the interrupt message queue, in an embodiment of the present invention, when arbitrating and selecting each sending request in the interrupt message queue, if a special interrupt sending request is found, a special interrupt corresponding to the special interrupt sending request can be generated, and the special interrupt can be sent to the host so that the host can receive the special interrupt in time.

[0118] As an optional embodiment, determining whether there is a send request loss problem in each interrupt channel in the computer system includes:

[0119] For any interrupt channel in the computer system, determining whether the current target difference of the interrupt channel is greater than a second preset threshold, wherein the target difference refers to: the difference between the cumulative number of interrupt pulses and the number of interrupt messages sent;

[0120] If it is greater, a special interrupt sub-request corresponding to the interrupt channel is generated;

[0121] If the computer system currently has at least one interrupt channel with a special interrupt sub-request, it is determined that there is a send request loss problem in each interrupt channel in the computer system.

[0122] To better illustrate the embodiments of the present invention, please refer to Figure 3 , Figure 3A flow chart of another interrupt management method provided by the present invention is provided. In the figure, the first to nth, a total of n completion queues, can be mapped to each interrupt vector (i.e., interrupt channel) through channel mapping. For the first to mth, a total of m interrupt vectors, the interrupt vectors all include an interrupt status detection module and a generation module. There is a global passive merging detection module. The interrupt channels can send their own "number of new data and number of data reduction" to the interrupt status detection module, and can also send data reduction signals to the corresponding generation module. The "number of new data and number of data reduction" refer to the number of new data entities and the number of reductions in the completion queue managed by the interrupt channel. The interrupt status detection module can maintain the "number of data entities currently to be processed in the completion queue of the interrupt channel" according to the "number of new data and number of data reduction", and detect various event-type conditions (corresponding to generating event-type pulses) and state-type conditions (corresponding to converting the state The signal is set to the first level state), the generation module can generate a state-type pulse according to the specified signal edge of the state signal, and perform a logical OR operation on each trigger pulse to obtain an interrupt pulse, thereby processing the "interrupt message sending request" and the "preset digital array" based on the interrupt pulse, and on the other hand, the state signal can be set to the second level state through the "data reduction signal (that is, the number of data entities to be processed is reduced due to the processing of the host)", and the counter of the interrupt channel can also be maintained; the passive merge detection module can analyze the counter value of each interrupt vector (generate a special interrupt sub-request when it is greater than the second preset threshold), and perform a logical OR process on the channel of the special interrupt sub-request of each interrupt vector, thereby generating a special interrupt sending request; the arbitration module can arbitrate each interrupt sending request (interrupt message sending request and special interrupt sending request) in the mid-segment message queue, and send the corresponding interrupt to the host.

[0123] Specifically, in the embodiment of the present invention, the current target difference can be counted for each interrupt channel in the computer system, so as to identify whether the interrupt channel has the phenomenon of lost interrupt message sending request through the target difference. The target difference can be used to simply and quickly determine whether a single channel has the phenomenon of lost interrupt message sending request. When the computer system currently has at least one interrupt channel with a special interrupt sub-request, it can be determined that each interrupt channel in the computer system has a sending request loss problem, that is, a logical OR operation can be performed on the channels of the special interrupt sub-request corresponding to each target difference, and the output of the logical OR can be used as the sending end of the special interrupt sending request.

[0124] Among them, a one-to-one counter can be set for the interrupt channel, and the target difference of the interrupt channel can be maintained by the counter. When the interrupt channel generates an interrupt pulse, the counter value can be increased by 1. When the send_grant signal is valid, that is, the interrupt signal sending request is allowed, the counter value of the interrupt channel is reduced by 1, so that the target difference of the interrupt channel can be maintained by a single counter, which is low-cost and more efficient.

[0125] Of course, in addition to the counter maintenance method, there may be various types of methods for maintaining the target difference of the interrupt channel, which are not limited in the embodiment of the present invention.

[0126] Please refer to Figure 4 , Figure 4 The present invention also provides a schematic diagram of the structure of an interrupt management device, the interrupt management device comprising:

[0127] The first judgment module 41 is used to periodically judge whether the interrupt channel meets the preset interrupt generation condition, and if so, trigger the first action module, wherein the interrupt generation condition refers to a condition that requires the host to process the completion queue managed by the interrupt channel;

[0128] A first action module 42, configured to set the state signal of the interrupt channel to a first level state;

[0129] A first sending module 43 is used to send an interrupt message to the host through the interrupt channel based on a specified signal edge of the status signal, so that the host processes the completion queue managed by the interrupt channel, wherein the specified signal edge refers to: a signal edge that changes from the second level state to the first level state, and the first level state is opposite to the second level state;

[0130] The second action module 44 is used to set the state signal of the interrupt channel to a second level state in response to a processing completion signal sent by the host after processing the interrupt channel.

[0131] As an optional embodiment, the interrupt generation condition of the interrupt channel in the non-aggregation mode includes: there is task completion information in the interrupt channel;

[0132] The interruption generation conditions of the interruption channel in the aggregation mode include: a quantity aggregation condition, the quantity aggregation condition means that the number of data entities currently to be processed by the interruption channel is greater than a first preset threshold;

[0133] The first action module 42 includes:

[0134] A first setting module, configured to set a first state signal of the interrupt channel to a first level state if the interrupt channel is in a non-aggregation mode;

[0135] A second setting module is used to set a second state signal of the interrupt channel to a first level state if the interrupt channel is in an aggregation mode, wherein the state signal includes a first state signal and a second state signal, the first state signal is a state signal of the interrupt on-off in a non-aggregation mode, and the second state signal is a state signal of the interrupt on-off in an aggregation mode;

[0136] The first sending module 43 is specifically used for:

[0137] Sending an interrupt message to the host through the interrupt channel based on a specified signal edge of a status signal corresponding to the working mode of the interrupt channel;

[0138] The second action module 44 is specifically used for:

[0139] In response to a processing completion signal sent by the host after processing the interrupt channel, a state signal corresponding to the working mode of the interrupt channel is set to a second level state.

[0140] As an optional embodiment, the interrupt management device further includes:

[0141] A first generating module is used for generating an event pulse when a new task completion information appears in the completion queue managed by the interrupt channel when the interrupt channel is in a non-aggregation mode;

[0142] A second generating module is used for generating an event-type pulse when any preset event occurs in the interrupt channel when the interrupt channel is in the aggregation mode, wherein the preset event includes a first event and a second event, the first event refers to: there is an error in the data entity corresponding to the task completion information of the completion queue newly added to the interrupt channel management, and the second event refers to: the task completion information of the completion queue newly added to the interrupt channel management comes from the management-type completion queue;

[0143] The first sending module 43 includes:

[0144] A third generating module is used to generate a state type pulse when a designated signal edge of the state signal is detected;

[0145] A fourth generating module, used for generating an interrupt pulse when there is at least one trigger pulse currently in the interrupt channel, wherein the trigger pulse includes an event type pulse and a state type pulse;

[0146] A first adding module, configured to add an interrupt message sending request of the interrupt channel to an interrupt message queue of the host in response to an interrupt pulse;

[0147] The first removing module is used to remove the interrupt message sending request of the interrupt channel from the interrupt message queue after the interrupt message of the interrupt channel is sent to the host.

[0148] As an optional embodiment, the first adding module is specifically used for:

[0149] When the interrupt channel is not masked, in response to the interrupt pulse, the interrupt message sending request of the interrupt channel is added to the interrupt message queue of the host;

[0150] The interrupt management device also includes:

[0151] The third setting module is used to set the digit corresponding to the interrupt channel in the preset digit list to the first value in response to the interrupt pulse when the interrupt channel is blocked, so that the host can process the completion queue of the interrupt channel whose digit in the preset digit list is the first value, and set the digit of the interrupt channel to be processed to the second value after the processing is completed.

[0152] As an optional embodiment, the interrupt management device further includes:

[0153] The second adding module is used for adding the interrupt message sending request of the interrupt channel to which the digit with the first value in the preset digit list belongs to the interrupt message queue of the host when the interrupt channel is not shielded.

[0154] As an optional embodiment, the interrupt generation condition of the interrupt channel in the aggregation mode further includes a time aggregation condition;

[0155] The time aggregation condition refers to: the time when the number of data entities to be processed in the interruption channel is in a preset interval is greater than a preset duration, and the preset interval refers to being greater than zero and less than a first preset threshold.

[0156] As an optional embodiment, the interrupt management device further includes:

[0157] The second judgment module is used to judge whether there is a problem of sending request loss in each interrupt channel in the computer system, and if so, trigger the third adding module, wherein the problem of sending request loss refers to: the problem of interrupt message sending request loss caused by saturation of interrupt message queue in the interrupt channel;

[0158] The third adding module is used to add the special interrupt sending request to the interrupt message queue of the host, so that when the host receives the special interrupt, it can selectively control the interrupt channel to enter the aggregation mode.

[0159] For an introduction to the interrupt management device provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the interrupt management method, and the embodiment of the present invention will not be described in detail here.

[0160] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of an interrupt management device provided by the present invention, the interrupt management device comprises:

[0161] A memory 51, used for storing computer programs;

[0162] The processor 52 is used to implement the steps of the interrupt management method in the above-mentioned embodiment when executing the computer program.

[0163] For an introduction to the interrupt management device provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the interrupt management method, and the embodiment of the present invention will not be described in detail here.

[0164] To solve the above technical problems, the present invention further provides a computer-readable storage medium. The computer-readable storage medium 61 stores a computer program 62. When the computer program 62 is executed by a processor, the steps of the interrupt management method in the above embodiment are implemented.

[0165] For an introduction to the computer-readable storage medium provided in the embodiment of the present invention, please refer to the aforementioned embodiment of the interrupt management method, and the embodiment of the present invention will not be described in detail here.

[0166] A computer program product is also provided in an embodiment of the present invention, including a computer program / instruction, which implements the steps of the interrupt management method in the above embodiment when executed by a processor.

[0167] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the interrupt management method, and the embodiment of the present invention will not be described in detail here.

[0168] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the element.

[0169] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An interrupt management method, characterized in that: Interrupt controllers used in computer systems include: Periodically determine whether the interrupt channel meets a preset interrupt generation condition, wherein the interrupt generation condition refers to a condition that requires the host to process a completion queue managed by the interrupt channel; If the condition is satisfied, setting the state signal of the interrupt channel to a first level state; Based on a designated signal edge of the status signal, an interrupt message is sent to the host through the interrupt channel so that the host processes the completion queue managed by the interrupt channel, wherein the designated signal edge refers to: a signal edge that changes from a second level state to a first level state, and the first level state is opposite to the second level state; In response to a processing completion signal sent by the host after processing the interrupt channel, the state signal of the interrupt channel is set to a second level state.

2. The interrupt management method according to claim 1, characterized in that: The interruption generation conditions of the interruption channel in the non-aggregation mode include: there is task completion information in the interruption channel; The interruption generation conditions of the interruption channel in the aggregation mode include: a quantity aggregation condition, the quantity aggregation condition means that the number of data entities currently to be processed by the interruption channel is greater than a first preset threshold; Setting the state signal of the interrupt channel to a first level state includes: If the interrupt channel is in a non-aggregation mode, setting the first state signal of the interrupt channel to a first level state; If the interrupt channel is in the aggregation mode, the second state signal of the interrupt channel is set to a first level state, wherein the state signal includes a first state signal and a second state signal, the first state signal is a state signal of the interrupt on-off in the non-aggregation mode, and the second state signal is a state signal of the interrupt on-off in the aggregation mode; Based on a specified signal edge of the status signal, sending an interrupt message to the host through the interrupt channel includes: Sending an interrupt message to a host through the interrupt channel based on a specified signal edge of a status signal corresponding to the working mode of the interrupt channel; In response to a processing completion signal sent by the host after processing the interrupt channel, setting the state signal of the interrupt channel to a second level state includes: In response to a processing completion signal sent by the host after processing the interrupt channel, a state signal corresponding to the working mode of the interrupt channel is set to a second level state.

3. The interrupt management method according to claim 2, characterized in that: The interrupt management method further includes: When the interrupt channel is in a non-aggregation mode, when a new task completion information appears in the completion queue managed by the interrupt channel, an event-type pulse is generated; When the interrupt channel is in the aggregation mode, when any preset event occurs in the interrupt channel, an event-type pulse is generated, wherein the preset event includes a first event and a second event, the first event refers to: there is an error in the data entity corresponding to the task completion information of the completion queue newly added to the interrupt channel management, and the second event refers to: the task completion information of the completion queue newly added to the interrupt channel management comes from the management-type completion queue; Based on a specified signal edge of the status signal, sending an interrupt message to the host through the interrupt channel includes: When a specified signal edge of the status signal is detected, a status pulse is generated; When there is at least one trigger pulse in the interrupt channel, an interrupt pulse is generated, wherein the trigger pulse includes the event-type pulse and the state-type pulse; In response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host; After the interrupt message of the interrupt channel is sent to the host, the interrupt message sending request of the interrupt channel is removed from the interrupt message queue.

4. The interrupt management method according to claim 3, characterized in that: In response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host comprises: When the interrupt channel is not masked, in response to the interrupt pulse, adding the interrupt message sending request of the interrupt channel to the interrupt message queue of the host; The interrupt management method further includes: When the interrupt channel is masked, in response to the interrupt pulse, the digit corresponding to the interrupt channel in the preset digit list is set to the first value, so that the host processes the completion queue of the interrupt channel whose digit in the preset digit list is the first value, and after the processing is completed, the digit of the interrupt channel to be processed is set to the second value.

5. The interrupt management method according to claim 4, characterized in that: The interrupt management method further includes: When the interrupt channel is not masked, the interrupt message sending request of the interrupt channel to which the digit with the first value in the preset digit list belongs is added into the interrupt message queue of the host.

6. The interrupt management method according to claim 3, characterized in that: The interrupt generation conditions of the interrupt channel in the aggregation mode also include time aggregation conditions; The time aggregation condition means that the time when the number of data entities to be processed by the interruption channel is in a preset interval is greater than a preset duration, and the preset interval is greater than zero and less than the first preset threshold.

7. The interrupt management method according to any one of claims 3 to 6, characterized in that: The interrupt management method further includes: Determine whether there is a send request loss problem in each interrupt channel in the computer system, wherein the send request loss problem refers to: the interrupt message send request loss problem caused by the saturation of the interrupt message queue of the interrupt channel; If it exists, the special interrupt send request is added to the interrupt message queue of the host so that when the host receives the special interrupt, it can selectively control the interrupt channel to enter the aggregation mode.

8. An interrupt management device, characterized in that: include: A first judgment module is used to periodically judge whether the interrupt channel meets the preset interrupt generation condition, and if so, trigger the first action module, wherein the interrupt generation condition refers to a condition that requires the host to process the completion queue managed by the interrupt channel; A first action module, used for setting the state signal of the interrupt channel to a first level state; A first sending module is used to send an interrupt message to the host through the interrupt channel based on a specified signal edge of the status signal, so that the host processes the completion queue managed by the interrupt channel, wherein the specified signal edge refers to: a signal edge that changes from a second level state to a first level state, and the first level state is opposite to the second level state; The second action module is used to set the state signal of the interrupt channel to a second level state in response to a processing completion signal sent by the host after processing the interrupt channel.

9. An interrupt management device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the interrupt management method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the interrupt management method according to any one of claims 1 to 7 are implemented.