# US 2015/0149667 A1 · Interrupt reduction by dynamic application buffering

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

- Number: US 2015/0149667 A1
- Document ID: US20150149667A1
- Status: Published application
- Kind: A1
- Application number: 14/089,493
- Filed: 2013-11-25
- Published: 2015-05-28
- Earliest claimed: 2013-11-25
- Assignees: Red Hat Israel, Ltd.
- Applicants: Red Hat Israel, Ltd.
- Inventors: Michael Tsirkin
- Web page: https://patentgrep.com/patent/US20150149667A1

## CPC

- G06F 13/24: using interrupt (G06F13/32 takes precedence)
- G06F 5/06: for changing the speed of data flow, i.e. speed regularising {or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor (G06F7/78 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods are disclosed for processing a queue associated with a request. An example system includes an input/output (I/O) interface that receives a request associated with a channel. The example system also includes an association module that determines whether a condition is satisfied. When the condition is determined to not be satisfied, the association module, after a hardware device completes processing the request, decrements an in-flight counter that represents a first amount of data in the channel. When the condition is determined to be satisfied, the association module, before the hardware device completes processing the request, decrements the in-flight counter.

## Claims

### Claim 1

A method of processing a request from a channel, comprising:
receiving a request associated with a channel;
determining whether a condition is satisfied;
when the condition is determined to not be satisfied:
after a hardware device completes processing the request, decrementing an in-flight counter that represents a first amount of data in the channel; and
when the condition is determined to be satisfied:
before the hardware device completes processing the request, decrementing the in-flight counter.

### Claim 2 (depends on 1)

The method of claim 1, wherein the receiving a request includes receiving the request from the channel, the method further including:
allocating a buffer for the request;
placing the buffer into a queue specific to the hardware device; and
associating the buffer with the channel.

### Claim 3 (depends on 2)

The method of claim 2, further including:
incrementing the in-flight counter based on the request, wherein the in-flight counter is specific to the channel.

### Claim 4 (depends on 2)

The method of claim 2, further including:
removing the association between the buffer and the channel.

### Claim 5 (depends on 2)

The method of claim 2, wherein the determining whether a condition is satisfied includes determining whether an amount of free space in the queue exceeds a free threshold amount.

### Claim 6 (depends on 2)

The method of claim 2, further including:
when the condition is determined to be satisfied, disabling transmit interrupts; and
when the condition is determined to not be satisfied, enabling transmit interrupts.

### Claim 7 (depends on 6)

The method of claim 6, wherein when the condition is determined to not be satisfied, receiving a transmit interrupt indicating that the hardware device has completed processing of the request, and wherein the decrementing includes after receiving the transmit interrupt, decrementing the in-flight counter.

### Claim 8 (depends on 1)

The method of claim 1, further including:
placing a set of packets associated with the request in a buffer allocated for the request, wherein the hardware device completes processing the request by processing the set of packets in the buffer.

### Claim 9 (depends on 1)

The method of claim 1, wherein the in-flight counter represents a quantity of bytes stored in the channel and based on one or more requests from the channel, and wherein the in-flight counter is incremented by a quantity of bytes allocated for the request and stored in a buffer.

### Claim 10 (depends on 1)

The method of claim 1, wherein the in-flight counter represents a quantity of packets stored in the channel and based on one or more requests from the channel, and wherein the in-flight counter is incremented by a quantity of packets allocated for the request and stored in a buffer.

### Claim 11 (depends on 1)

The method of claim 1, wherein the in-flight counter represents a quantity of buffers stored in one or more queues and based on one or more requests from the channel, and wherein the in-flight counter is incremented by one.

### Claim 12 (depends on 1)

The method of claim 1, wherein the receiving a request includes receiving a request from a channel to transmit a set of packets over a network, the method further including:
sending the request to a network device to transmit the set of packets over the network.

### Claim 13 (depends on 1)

The method of claim 1, wherein the condition is satisfied with respect to the first request, the method further including:
receiving a second request associated with a second channel;
determining that the condition is not satisfied with respect to the second request; and
after the hardware device completes processing the request, decrementing an in-flight counter that represents a second amount of data in the second channel.

### Claim 14

A system for processing a request from a channel, comprising:
an input/output (I/O) interface that receives a request associated with a channel; and
an association module that determines whether a condition is satisfied, wherein when the condition is determined to not be satisfied, the association module, after a hardware device completes processing the request, decrements an in-flight counter that represents a first amount of data in the channel, and wherein when the condition is determined to be satisfied, the association module, before the hardware device completes processing the request, decrements the in-flight counter.

### Claim 15 (depends on 14)

The system of claim 14, wherein the I/O interface receives a request from the channel, the system further including:
an allocator that allocates a buffer for the request, places the buffer into a queue specific to the hardware device, and associates the buffer with the channel.

### Claim 16 (depends on 15)

The system of claim 15, wherein the association module increments the in-flight counter based on the request and removes the association between the buffer and the channel, and wherein the in-flight counter is specific to the channel.

### Claim 17 (depends on 15)

The system of claim 15, wherein when an amount of free space in the queue exceeds a free threshold amount, the condition is satisfied, the system further including:
an interrupt controller that determines whether the condition is satisfied, wherein when the condition is determined to be satisfied, the interrupt controller disables transmit interrupts, and wherein when the condition is determined to not be satisfied, the interrupt controller enables transmit interrupts.

### Claim 18 (depends on 15)

The system of claim 15, wherein the allocator places a set of packets associated with the request in the buffer, wherein the hardware device is a network interface card that processes the request by transmitting the set of packets in the buffer over a network, and wherein when the transmit interrupts are enabled, the association module receives a transmit interrupt sent from the hardware device that indicates to the association module that the network interface card has finished processing the request.

### Claim 19 (depends on 14)

The system of claim 14, wherein the channel is at least one from the group including an application, a virtual machine, and a virtual device.

### Claim 20

A machine-readable medium comprising a plurality of machine-readable instructions that when executed by one or more processors is adapted to cause the one or more processors to perform a method comprising:
receiving a request associated with a channel;
determining whether a condition is satisfied;
when the condition is determined to not be satisfied:
after a hardware device completes processing the request, decrementing an in-flight counter that represents a first amount of data in the channel; and
when the condition is determined to be satisfied:
before the hardware device completes processing the request, decrementing the in-flight counter.
