IP Library Granted Patent US 11,422,959
Granted Patent B1
US 11,422,959 · App. 17/185,294 · Granted Aug 23, 2022

System to use descriptor rings for I/O communication

Inventor: Michael Tsirkin (Yokneam, IL)
Assignee: Red Hat, Inc.
G06F13/20G06F9/45558G06F13/4282G06F2009/45579G06F2213/0026
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,422,959
App. No.
17/185,294
Granted
Aug 23, 2022
Kind
B1
Abstract

A system and method for input/output communication is disclosed. In one embodiment, a virtual device identifies a queue including a plurality of input/output (I/O) descriptors, each of the plurality of I/O descriptors representing one of: an active descriptor associated with an active I/O request or an executed descriptor that is associated with an executed I/O request. The virtual device retrieves, from a first index in the queue, one or more active descriptors associated with an I/O request. The virtual device executes the I/O request. The virtual device writes a first executed descriptor to a second index in the queue, where the first executed descriptor indicates the I/O request has been executed. The virtual device updates the second index to an initial position in the queue responsive to a predetermined condition.

Claims (44)

1. A system, comprising:

a memory; and

a processing device, coupled to the memory, the processing device to:

identify, by a virtual device, a queue comprising a plurality of input/output (I/O) descriptors, each of the plurality of I/O descriptors representing one of: an active descriptor associated with an active I/O request or an executed descriptor that is associated with an executed I/O request;

retrieve, from a first index in the queue, one or more active descriptors associated with an I/O request;

execute, by the virtual device, the I/O request;

write a first executed descriptor to a queue position identified by a second index, wherein the first executed descriptor indicates the I/O request has been executed; and

update the second index to an initial position in the queue responsive to determining that a predetermined condition is satisfied.

2. The system of claim 1 , wherein to determine that the predetermined condition is satisfied, the processing device is further to:

determining that the virtual device has processed an active descriptor in a last position in the queue.

3. The system of claim 1 , wherein the size of the queue is equal to a size of a PCI express packet.

4. The system of claim 1 , wherein the processing device is further to: maintain, by the virtual device, a list of active descriptors corresponding to pending requests.

5. The system of claim 1 , wherein the processing device is further to: write, by a driver, the active descriptors for the request to execute one or more operations by the physical device associated with the virtual device.

6. The system of claim 1 , wherein the processing device is further to:

responsive to writing an active descriptor, send, by a driver, a notification to the virtual device to notify that the active descriptor is available to be processed.

7. The system of claim 6 , wherein the driver operates within a kernel space of a virtual machine.

8. A method, comprising:

identifying, by a virtual device, a queue comprising a plurality of input/output (I/O) descriptors, each of the plurality of I/O descriptors representing one of: an active descriptor associated with an active I/O request or an executed descriptor that is associated with an executed I/O request;

retrieving, from a first position in the queue, one or more active descriptors associated with an I/O request;

executing, by the virtual device, the I/O request;

writing an executed descriptor to a second position in the queue, wherein the executed descriptor indicates that the I/O request has been executed;

incrementing, by a number of the one or more active descriptors associated with the I/O request, a counter representing a number of active descriptors in the queue that are executed;

responsive to determining that the counter reaches a predefined threshold value, decrementing the counter by the predefined threshold value; and

updating the second position in the queue to an initial position.

9. The method of claim 8 , wherein the predefined threshold value includes a size of the queue or a size of a PCI express packet.

10. The method of claim 8 , further comprising:

maintaining, by the virtual device, a list of active descriptors corresponding to requests yet to be executed.

11. The method of claim 8 , further comprising: writing, by a driver, the active descriptors for the request to execute one or more operations by the physical device associated with the virtual device.

12. The method of claim 8 , further comprising: responsive to writing at a last position in the queue, writing, by a driver, a next active descriptor to the initial position in the queue.

13. The method of claim 8 , further comprising:

responsive to writing an active descriptor, sending, by a driver, a notification to the virtual device to notify that the active descriptor is available to be processed.

14. The method of claim 13 , wherein the driver operates within a kernel space of a virtual machine.

15. A non-transitory machine-readable storage medium including instructions that, when executed by a processing device, cause the processing device to:

identify, by a virtual device, a queue comprising a plurality of input/output (I/O) descriptors, each of the plurality of I/O descriptors representing one of: an active descriptor associated with an active I/O request or an executed descriptor that is associated with an executed I/O request;

retrieve, from a first index in the queue, one or more active descriptors associated with an I/O request;

execute, by the virtual device, the I/O request;

write a first executed descriptor to a second index in the queue, wherein the first executed descriptor indicates the I/O request has been executed; and

update the second index to an initial position in the queue responsive to a predetermined condition.

16. The non-transitory machine-readable storage medium of claim 15 , wherein the predetermined condition comprises: a determination that the virtual device has processed an active descriptor in a last position in the queue.

17. The non-transitory machine-readable storage medium of claim 15 , wherein the size of the queue is equal to a size of a PCI express packet.

18. The non-transitory machine-readable storage medium of claim 15 , wherein the processing device is further to: maintain, by the virtual device, a list of active descriptors corresponding to requests yet to be executed.

19. The non-transitory machine-readable storage medium of claim 15 , wherein the processing device is further to: write, by a driver, the active descriptors for the request to execute one or more operations by the physical device associated with the virtual device.

20. The non-transitory machine-readable storage medium of claim 15 , wherein the processing device is further to:

responsive to writing an active descriptor, send, by a driver, a notification to the virtual device to notify that the active descriptor is available to be processed.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 25, 2021
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 055414/0586 →