IP Library › Granted Patent US 11,392,504
Granted Patent B2
US 11,392,504 · App. 16/862,466 · Granted Jul 19, 2022

Memory page fault handling for network interface devices in a virtualized environment

Inventor: Michael Tsirkin (Lexington, MA)
Assignee: Red Hat, Inc.
G06F12/1009G06F9/45558H04L49/9021G06F2009/45583G06F2009/45595
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,392,504
App. No.
16/862,466
Granted
Jul 19, 2022
Kind
B2
Abstract

Systems and methods for supporting memory page fault handling for network devices are disclosed. In one implementation, a processing device may receive, at a network interface device of a host computer system, an incoming packet from a network. The processing device may also select a first buffer from a plurality of buffers associated with a receiving queue of the network interface device. The processing device may attempt to store the incoming packet at the first buffer of the plurality of buffers. Responsive to receiving a notification that attempting to store the incoming packet at the first buffer encountered a page fault, the processing device may assign the first buffer to a wait queue of the network interface device. The processing device may further store the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue.

Claims (54)

1. A method, comprising:

receiving, by a network interface device of a host computer system, an incoming packet from a network;

selecting a first buffer from a plurality of buffers associated with a receiving queue of the network interface device;

attempting to store the incoming packet at the first buffer of the plurality of buffers; and

responsive to receiving a notification that attempting to store the incoming packet at the first buffer encountered a page fault:

assigning the first buffer to a wait queue of the network interface device; and

storing the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue.

2. The method of claim 1 , wherein the plurality of buffers are allocated by a driver of the network interface device, and wherein the plurality of buffer are marked as available upon allocation.

3. The method of claim 2 , wherein the driver of the network interface device is executed by a guest operating system of a virtual machine running on the host computer system.

4. The method of claim 1 , wherein the network interface device comprises a Network Interface Card (NIC).

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

6. The method of claim 1 further comprising:

responsive to the page fault being handled, detecting that the memory page of the first buffer is present.

7. The method of claim 1 , wherein the receiving queue and the wait queue are allocated by the driver of the network interface device.

8. The method of claim 1 further comprising:

responsive to detecting that the page fault is handled:

removing the first buffer from the wait queue;

storing a second incoming packet at the first buffer; and

assigning the first buffer to the receiving queue.

9. The method of claim 1 , wherein responsive to storing the incoming packet at the second buffer, marking the second buffer as used.

10. The method of claim 9 , wherein responsive to detecting that the incoming packet at the second buffer has been read by the network interface device, marking the second buffer as available.

11. A system comprising:

a memory;

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

receive, at a network interface device, an incoming packet from a network;

select a first buffer from a plurality of buffers associated with a receiving queue of the network interface device;

attempt to store the incoming packet at the first buffer of the plurality of buffers; and

responsive to receiving a notification that attempting to store the incoming packet at the first buffer encountered a page fault:

assign the first buffer to a wait queue of the network interface device; and

store the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue.

12. The system of claim 11 , wherein the plurality of buffers are allocated by a driver of the network interface device, and wherein the plurality of buffer are marked as available upon allocation.

13. The system of claim 11 , wherein the page fault is generated responsive to a memory page of the first buffer being not present.

14. The system of claim 11 , wherein the processing device is further to:

responsive to the page fault being handled, detect that the memory page of the first buffer is present.

15. The system of claim 11 , wherein the processing device is further to:

responsive to detecting that the page fault is handled:

remove the first buffer from the wait queue;

store a second incoming packet at the first buffer; and

assign the first buffer to the receiving queue.

16. The system of claim 11 , wherein responsive to storing the incoming packet at the second buffer, mark the second buffer as used.

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

receive, at a network interface device, an incoming packet from a network;

select a first buffer from a plurality of buffers associated with a receiving queue of the network interface device;

attempt to store the incoming packet at the first buffer of the plurality of buffers; and

responsive to receiving a notification that attempting to store the incoming packet at the first buffer encountered a page fault:

assign the first buffer to a wait queue of the network interface device; and

store the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue.

18. The non-transitory computer-readable media of claim 17 , wherein the plurality of buffers are allocated by a driver of the network interface device, and wherein the plurality of buffer are marked as available upon allocation.

19. The non-transitory computer-readable media of claim 17 , wherein the driver of the network interface device is executed by a guest operating system of a virtual machine.

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

responsive to detecting that the page fault is handled:

remove the first buffer from the wait queue;

store a second incoming packet at the first buffer; and

assign the first buffer to the receiving queue.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 30, 2020
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 052541/0605 →
Continuity (1)
Related Publication 20210342272A1 · Nov 4, 2021