IP Library › Granted Patent US 11,500,668
Granted Patent B2
US 11,500,668 · App. 17/071,291 · Granted Nov 15, 2022

Page fault support for virtual machine network accelerators

Inventor: Michael Tsirkin (Lexington, MA)
Assignee: Red Hat, Inc.
G06F9/45558H04L49/90G06F9/45545G06F2009/45579G06F2009/45583H04L49/9047H04L61/103
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,500,668
App. No.
17/071,291
Granted
Nov 15, 2022
Kind
B2
Abstract

Systems and methods for supporting page faults for virtual machine network accelerators. In one implementation, a processing device may receive, at a network accelerator device of a computer system, a first incoming packet from a network. The processing device may select a first buffer from a plurality of buffers associated with the network device, and may attempt to store the first incoming packet at the first buffer. Responsive to receiving a notification that the attempt to store the first incoming packet at the first buffer caused a page fault, the processing device may store the first incoming packet at a second buffer. The processing device may receive a second incoming packet, and store the second incoming packet at the first buffer. The processing device may forward, to a driver of the network accelerator device, a first identifiers of the second buffer and a second identifier of the first buffer.

Claims (58)

1. A method comprising:

receiving, by a network accelerator device of a computer system, a first incoming packet from a network;

selecting a first buffer from a plurality of buffers associated with the network accelerator device;

attempting to store the first incoming packet at the first buffer;

responsive to receiving a notification that the attempt to store the first incoming packet at the first buffer caused a page fault, storing the first incoming packet at a second buffer;

receiving a second incoming packet from the network;

storing the second incoming packet at the first buffer; and

forwarding, to a driver of the network accelerator device, a first identifier of the second buffer and a second identifier of the first buffer.

2. The method of claim 1 , wherein attempting to store the first incoming packet at the first buffer comprises:

attempting to translate a virtual address associated with the first buffer to physical address identifying a memory page in a physical memory of the computer system; and

responsive to successfully translating the virtual address to the physical address, storing the first incoming packet at the memory page.

3. The method of claim 2 , wherein the page fault is generated responsive to the memory page of the first buffer being not present in the physical memory of the computer system.

4. The method of claim 1 , wherein storing the second incoming packet at the first buffer further comprises:

retrieving, from a data structure that stores a plurality of buffer identifiers, a first buffer identifier that precedes a second buffer identifier identifying the second buffer, and wherein the first buffer identifier identifies the first buffer.

5. The method of claim 1 , further comprising:

appending the first identifier of the second buffer and the second identifier of the first buffer to a data structure that stores an order in which the buffers are to be consumed by the computer system.

6. The method of claim 1 , wherein the plurality of buffers are allocated by the driver of the network accelerator device, and wherein the driver of the network accelerator device is executed by a guest operating system of a virtual machine running on the computer system.

7. The method of claim 1 , wherein storing the first incoming packet at the second buffer further comprises:

retrieving, from a data structure that stores a plurality of buffer identifiers, a second buffer identifier that follows a first buffer identifier identifying the first buffer, and wherein the second buffer identifier identifies the second buffer.

8. A system comprising:

a memory; and

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

receive, at a network accelerator device of a computer system, a first incoming packet from a network;

select a first buffer from a plurality of buffers associated with the network accelerator device;

attempt to store the first incoming packet at the first buffer;

responsive to receiving a notification that the attempt to store the first incoming packet at the first buffer caused a page fault, store the first incoming packet at a second buffer;

receive a second incoming packet from the network;

store the second incoming packet at the first buffer; and

forward, to a driver of the network accelerator device, a first identifier of the second buffer and a second identifier of the first buffer.

9. The system of claim 8 , wherein to attempt to store the first incoming packet at the first buffer, the processing device is further to:

attempt to translate a virtual address associated with the first buffer to a physical address identifying a memory page in a physical memory of the computer system; and

responsive to successfully translating the virtual address to the physical address, store the first incoming packet at the memory page.

10. The system of claim 9 , wherein the page fault is generated responsive to the memory page of the first buffer being not present in the physical memory of the computer system.

11. The system of claim 8 , wherein to store the second incoming packet at the first buffer the processing device is further to:

retrieve, from a data structure that stores a plurality of buffer identifiers, a first buffer identifier that precedes a second buffer identifier identifying the second buffer, and wherein the first buffer identifier identifies the first buffer.

12. The system of claim 8 , wherein the processing device is further to:

append the first identifier of the second buffer and the second identifier of the first buffer to a data structure that stores an order in which the buffers are to be consumed by the computer system.

13. The system of claim 8 , wherein the plurality of buffers are allocated by the driver of the network accelerator device, and wherein the driver of the network accelerator device is executed by a guest operating system of a virtual machine running on the computer system.

14. The system of claim 8 , wherein to store the first incoming packet at the second buffer the processing device is further to:

retrieve, from a data structure that stores a plurality of buffer identifiers, a second buffer identifier that follows a first buffer identifier identifying the first buffer, and wherein the second buffer identifier identifies the second buffer.

15. A non-transitory computer-readable media storing instructions that, when executed, cause a processing device to:

receive, at a network accelerator device of a computer system, a first incoming packet from a network;

select a first buffer from a plurality of buffers associated with the network accelerator device;

attempt to store the first incoming packet at the first buffer;

responsive to receiving a notification that the attempt to store the first incoming packet at the first buffer caused a page fault, store the first incoming packet at a second buffer;

receive a second incoming packet from the network;

store the second incoming packet at the first buffer; and

forward, to a driver of the network accelerator device, a first identifier of the second buffer and a second identifier of the first buffer.

16. The non-transitory computer-readable media of claim 15 , wherein to attempt to store the first incoming packet at the first buffer, the processing device is further to:

attempt to translate a virtual address associated with the first buffer to a physical address identifying a memory page in a physical memory of the computer system; and

responsive to successfully translating the virtual address to the physical address, store the first incoming packet at the memory page.

17. The non-transitory computer-readable media of claim 16 , wherein the page fault is generated responsive to the memory page of the first buffer being not present in the physical memory of the computer system.

18. The non-transitory computer-readable media of claim 15 , wherein to store the second incoming packet at the first buffer, the processing device is further to:

retrieve, from a data structure that stores a plurality of buffer identifiers, a first buffer identifier that precedes a second buffer identifier identifying the second buffer, and wherein the first buffer identifier identifies the first buffer.

19. The non-transitory computer-readable media of claim 15 , wherein the processing device is further to:

append the first identifier of the second buffer and the second identifier of the first buffer to a data structure that stores an order in which the buffers are to be consumed by the computer system.

20. The non-transitory computer-readable media of claim 15 , wherein to store the first incoming packet at the second buffer, the processing device is further to:

retrieve, from a data structure that stores a plurality of buffer identifiers, a second buffer identifier that follows a first buffer identifier identifying the first buffer, and wherein the second buffer identifier identifies the second buffer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2020
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 054065/0942 →
Continuity (1)
Related Publication 20220121463A1 · Apr 21, 2022
Cited By (1)
US 12,197,276