IP Library Granted Patent US 12,197,276
Granted Patent B2
US 12,197,276 · App. 17/864,001 · Granted Jan 14, 2025

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

Inventor: Michael Tsirkin (Lexington, MA)
Assignee: Red Hat, Inc.
G06F11/0793G06F11/073G06F11/0787
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 12,197,276
App. No.
17/864,001
Granted
Jan 14, 2025
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 (38)

1. A method, comprising:

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

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

attempting, by the network interface device, to store the incoming packet at the first buffer of the plurality of buffers; and

responsive to detecting an error while attempting to store the incoming packet at the first buffer, storing, by the network interface device, the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue, wherein the error is represented by a page fault generated responsive to a memory page of the first buffer being not present in a physical memory of the host computer system.

2. The method of claim 1 , wherein the plurality of buffers are allocated by a driver of the network interface device.

3. The method of claim 1 , wherein the plurality of buffers are allocated by the network interface device in a memory residing in the network interface device.

4. The method of claim 1 , wherein the plurality of buffers are allocated by a hypervisor running on the host computer system.

5. The method of claim 1 , wherein the plurality of buffers are allocated by a guest operating system of a virtual machine (VM) running on the host computer system.

6. The method of claim 1 , further comprising:

responsive to handling of the page fault having been completed, detecting that the memory page of the first buffer is present.

7. The method of claim 1 , further comprising:

responsive to detecting that the page fault is handled:

storing a second incoming packet at the first buffer; and

assigning the first buffer to the receiving queue.

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

9. The method of claim 8 , 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.

10. A system comprising:

a memory;

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

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

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

attempt, by the network interface device, to store the incoming packet at the first buffer of the plurality of buffers; and

responsive to detecting an error while attempting to store the incoming packet at the first buffer, store, by the network interface device, the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue, wherein the error is represented by a page fault generated responsive to a memory page of the first buffer being not present in a physical memory of the host computer system.

11. The system of claim 10 , wherein the plurality of buffers are allocated by a driver of the network interface device.

12. The system of claim 10 , wherein the plurality of buffers are allocated by the network interface device in a memory residing in the network interface device.

13. The system of claim 10 , wherein the plurality of buffers are allocated by a hypervisor running on the host computer system.

14. The system of claim 10 , wherein the plurality of buffers are allocated by a guest operating system of a virtual machine (VM) running on the host computer system.

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

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

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

attempt, by the network interface device, by a network interface device to store the incoming packet at the first buffer of the plurality of buffers; and

responsive to detecting an error while attempting to store the incoming packet at the first buffer, store, by the network interface device, the incoming packet at a second buffer of the plurality of buffers associated with the receiving queue, wherein the error is represented by a page fault generated responsive to a memory page of the first buffer being not present in a physical memory of the host computer system.

16. The non-transitory computer-readable media of claim 15 , wherein the plurality of buffers are allocated by one of: a driver of the network interface device, the network interface device in a memory residing in the network interface device, a hypervisor running on the host computer system, or a guest operating system of a virtual machine (VM) running on the host computer system.

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

responsive to detecting that the page fault is handled:

store a second incoming packet at the first buffer; and

assign the first buffer to the receiving queue.

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 Jul 14, 2022
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 060507/0747 →