# US 2014/0195708 A1 · Determining when to throttle interrupts to limit interrupt processing to an interrupt processing time period

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0195708 A1
- Document ID: US20140195708A1
- Status: Published application
- Kind: A1
- Application number: 13/734,770
- Filed: 2013-01-04
- Published: 2014-07-10
- Earliest claimed: 2013-01-04
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Steven E. Klein; Timothy J. Van Patten
- Web page: https://patentgrep.com/patent/US20140195708A1

## CPC

- G06F 13/28: using burst mode transfer, e.g. direct memory access {DMA}, cycle steal (G06F13/32 takes precedence)
- G06F 9/4812: {by interrupt, e.g. masked}
- G06F 13/24: using interrupt (G06F13/32 takes precedence)
- G06F 2213/2404: Generation of an interrupt or a group of interrupts after a predetermined number of interrupts
- G06F 2213/2406: Generation of an interrupt or a group of interrupts after a fixed or calculated time elapses
- G06F 2213/2408: Reducing the frequency of interrupts generated from peripheral to a CPU
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are a computer program product, system, and method for determining when to throttle interrupts to limit interrupt processing to an interrupt processing time. Upon receiving interrupts from the hardware device, a determination is made as to whether a number of received interrupts exceeds an interrupt threshold during a interrupt tracking time period. If so, an interrupt throttling state is set to a first value indicating to only process interrupts during an interrupt processing time period. Interrupts from the hardware device are processed during the interrupt time period when the interrupt throttling state is set to the first value. Interrupts received from the hardware are masked during a processing of a scan loop of operations while the interrupt throttling has the first value and the interrupt processing time period has expired, wherein the masked interrupts are not processed while processing the scan loop of operations.

## Claims

### Claim 1

A computer program product for managing interrupts from a hardware device, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that is executed to perform operations in the network adaptor, the operations comprising:
receiving interrupts from the hardware device;
determining whether a number of received interrupts exceeds an interrupt threshold during a interrupt tracking time period;
setting an interrupt throttling state to a first value indicating to only process interrupts during an interrupt processing time period in response to determining that the number of received interrupts exceeds an interrupt threshold;
processing interrupts from the hardware device during the interrupt time period when the interrupt throttling state is set to the first value; and
masking interrupts received from the hardware during a processing of a scan loop of operations while the interrupt throttling has the first value and the interrupt processing time period has expired, wherein the masked interrupts are not processed while processing the scan loop of operations.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the computer program product is executed by a processor in a network adaptor having a plurality of ports, wherein the hardware comprises at least one DMA engine to process I/O requests for the ports and wherein the interrupts comprise error interrupts detected by DMA engine.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the operations of receiving the interrupts, determining whether the number of interrupts exceeds the interrupt threshold, setting the interrupt throttling state, processing the interrupts during the interrupt time period, processing the scan loop of operations, and masking the interrupts are performed by an interrupt handling processor, wherein the scan loop of operations are performed by the interrupt handling processor and at least one non-interrupt handling processor, and wherein the at least one non-interrupt handling processor processes scan loop operations without handling interrupts from the hardware device.

### Claim 4 (depends on 3)

The computer program product of claim 3, wherein the operations further comprise:
reassigning ports assigned to the interrupt handling processor to the at least one non-interrupt handling processor in response to setting the interrupt throttling state to the first value.

### Claim 5 (depends on 4)

The computer program product of claim 4, wherein the operations further comprise:
reassigning ports reassigned from the interrupt handling processor to the at least one non-interrupt handling processor back to the interrupt handling processor in response to determining that an interrupt has not been received for an interrupt lapse time period.

### Claim 6 (depends on 3)

The computer program product of claim 3, wherein the processors further perform operations comprising:
processing the scan loop of operations; and
in response to processing the scan loop of operations, performing:
determining whether the interrupt throttling state comprises the first value or a second value;
determining whether the processor processing the scan loop of operations comprises the interrupt handling processor;
processing interrupts when processing the scan loop of operations in response to determining that the interrupt throttling state has a second value and that the processor processing the scan loop of operations comprises the interrupt handling processor; and
processing the scan loop of operations without processing interrupts in response to determining that the interrupt throttling state has the second value or that the processor processing the scan loop of operations comprises one of the non-interrupt handling processors.

### Claim 7 (depends on 3)

The computer program product of claim 3, wherein during the processing of the scan loop of operations signaling the at least one non-interrupt handling processor that the interrupt handling processor is active.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the operations further comprise:
determining that an interrupt has not been received for a interrupt lull time period;
setting the interrupt throttling state to a second value in response to determining that the interrupt has not been received for the interrupt lull time period; and
processing interrupts received from the hardware device when processing the scan loop when the interrupt throttling state indicates the second value.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the operations of determining that the interrupt has not been received for the interrupt lull time period and setting the interrupt throttling state to the second value are performed when processing the scan loop of operations.

### Claim 10 (depends on 1)

The computer program product of claim 1, wherein the operations during the scan loop comprise:
determining whether the interrupt throttling state indicates the first value, wherein interrupts are processed from the hardware device during the interrupt time period in response to determining that the interrupt throttling state indicates the first value, and wherein the determination of whether the number of received interrupts exceeds the interrupt threshold is performed in response to determining that the interrupt throttling state indicates a second value; and
restarting the interrupt tracking time period in response to determining that the interrupt is received after the interrupt tracking time period has expired.

### Claim 11

A system for managing interrupts from a hardware device, comprising:
a processor executing code to perform operations, the operations comprising:
receiving interrupts from the hardware device;
determining whether a number of received interrupts exceeds an interrupt threshold during a interrupt tracking time period;
setting an interrupt throttling state to a first value indicating to only process interrupts during an interrupt processing time period in response to determining that the number of received interrupts exceeds an interrupt threshold;
processing interrupts from the hardware device during the interrupt time period when the interrupt throttling state is set to the first value; and
masking interrupts received from the hardware during a processing of a scan loop of operations while the interrupt throttling has the first value and the interrupt processing time period has expired, wherein the masked interrupts are not processed while processing the scan loop of operations.

### Claim 12 (depends on 11)

The system of claim 11, further comprising:
a network adaptor having a plurality of ports, wherein the processor is in the network adaptor, and wherein the hardware comprises at least one DMA engine to process I/O requests for the ports and wherein the interrupts comprise error interrupts detected by DMA engine.

### Claim 13 (depends on 11)

The system of claim 11, wherein the processor comprises an interrupt handling processor performing the operations of receiving the interrupts, determining whether the number of interrupts exceeds the interrupt threshold, setting the interrupt throttling state, processing the interrupts during the interrupt time period, processing the scan loop of operations, and masking the interrupts, further comprising:
at least one non-interrupt handling processor, wherein the scan loop of operations are performed by the interrupt handling processor and the at least one non-interrupt handling processor, and wherein the at least one non-interrupt handling processor processes scan loop operations without handling interrupts from the hardware device.

### Claim 14 (depends on 13)

The system of claim 13, wherein the operations performed by the interrupt handling processor further comprise:
reassigning ports assigned to the interrupt handling processor to the at least one non-interrupt handling processor in response to setting the interrupt throttling state to the first value.

### Claim 15 (depends on 13)

The system of claim 13, wherein the interrupt and non-interrupt handling processors further perform:
processing the scan loop of operations; and
in response to processing the scan loop of operations, performing:
determining whether the interrupt throttling state comprises the first value or a second value;
determining whether the processor processing the scan loop of operations comprises the interrupt handling processor;
processing interrupts when processing the scan loop of operations in response to determining that the interrupt throttling state has a second value and that the processor processing the scan loop of operations comprises the interrupt handling processor; and
processing the scan loop of operations without processing interrupts in response to determining that the interrupt throttling state has the second value or that the processor processing the scan loop of operations comprises one of the non-interrupt handling processors.

### Claim 16 (depends on 11)

The system of claim 11, wherein the operations further comprise:
determining that an interrupt has not been received for a interrupt lull time period;
setting the interrupt throttling state to a second value in response to determining that the interrupt has not been received for the interrupt lull time period; and
processing interrupts received from the hardware device when processing the scan loop when the interrupt throttling state indicates the second value.

### Claim 17 (depends on 11)

The system of claim 11, wherein the operations during the scan loop comprise:
determining whether the interrupt throttling state indicates the first value, wherein interrupts are processed from the hardware device during the interrupt time period in response to determining that the interrupt throttling state indicates the first value, and wherein the determination of whether the number of received interrupts exceeds the interrupt threshold is performed in response to determining that the interrupt throttling state indicates a second value; and
restarting the interrupt tracking time period in response to determining that the interrupt is received after the interrupt tracking time period has expired.

### Claim 18

A method for managing interrupts from a hardware device, comprising:
receiving interrupts from the hardware device;
determining whether a number of received interrupts exceeds an interrupt threshold during a interrupt tracking time period;
setting an interrupt throttling state to a first value indicating to only process interrupts during an interrupt processing time period in response to determining that the number of received interrupts exceeds an interrupt threshold;
processing interrupts from the hardware device during the interrupt time period when the interrupt throttling state is set to the first value; and
masking interrupts received from the hardware during a processing of a scan loop of operations while the interrupt throttling has the first value and the interrupt processing time period has expired, wherein the masked interrupts are not processed while processing the scan loop of operations.

### Claim 19 (depends on 18)

The method of claim 18, wherein the method is performed by a processor in a network adaptor having a plurality of ports, wherein the hardware comprises at least one DMA engine to process I/O requests for the ports and wherein the interrupts comprise error interrupts detected by DMA engine.

### Claim 20 (depends on 18)

The method of claim 18, wherein the operations of receiving the interrupts, determining whether the number of interrupts exceeds the interrupt threshold, setting the interrupt throttling state, processing the interrupts during the interrupt time period, processing the scan loop of operations, and masking the interrupts are performed by an interrupt handling processor, wherein the scan loop of operations are performed by the interrupt handling processor and at least one non-interrupt handling processor, and wherein the at least one non-interrupt handling processor processes scan loop operations without handling interrupts from the hardware device.

### Claim 21 (depends on 20)

The method of claim 20, further comprising:
reassigning ports assigned to the interrupt handling processor to the at least one non-interrupt handling processor in response to setting the interrupt throttling state to the first value.

### Claim 22 (depends on 20)

The method of claim 20, further comprising:
processing the scan loop of operations;
in response to processing the scan loop of operations, performing:
determining whether the interrupt throttling state comprises the first value or a second value;
determining whether the processor processing the scan loop of operations comprises the interrupt handling processor;
processing interrupts when processing the scan loop of operations in response to determining that the interrupt throttling state has a second value and that the processor processing the scan loop of operations comprises the interrupt handling processor; and
processing the scan loop of operations without processing interrupts in response to determining that the interrupt throttling state has the second value or that the processor processing the scan loop of operations comprises one of the non-interrupt handling processors.

### Claim 23 (depends on 18)

The computer program product of claim 18, wherein the operations further comprise:
determining that an interrupt has not been received for a interrupt lull time period;
setting the interrupt throttling state to a second value in response to determining that the interrupt has not been received for the interrupt lull time period; and
processing interrupts received from the hardware device when processing the scan loop when the interrupt throttling state indicates the second value.

### Claim 24 (depends on 18)

The computer program product of claim 18, wherein the operations during the scan loop comprise:
determining whether the interrupt throttling state indicates the first value, wherein interrupts are processed from the hardware device during the interrupt time period in response to determining that the interrupt throttling state indicates the first value, and wherein the determination of whether the number of received interrupts exceeds the interrupt threshold is performed in response to determining that the interrupt throttling state indicates a second value; and
restarting the interrupt tracking time period in response to determining that the interrupt is received after the interrupt tracking time period has expired.
