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 →
Continuity (2)
Continuation In Part 16862466 · Apr 29, 2020
Related Publication 20220350694A1 · Nov 3, 2022
References Cited (47)
US 6532525B1 · Aleksic et al. · 2003 [cited by applicant]
US 7912060B1 · Chen · 2011 [cited by examiner]
US 8255475B2 · Kagan et al. · 2012 [cited by applicant]
US 8307191B1 · Jain · 2012 [cited by applicant]
US 8402172B2 · Muppirala et al. · 2013 [cited by applicant]
US 8745276B2 · Bloch et al. · 2014 [cited by applicant]
US 8875162B2 · Agesen et al. · 2014 [cited by applicant]
US 9003171B2 · Gonion · 2015 [cited by applicant]
US 9058183B2 · Woller et al. · 2015 [cited by applicant]
US 9201793B2 · Schneider · 2015 [cited by applicant]
US 9280380B2 · Tsirkin · 2016 [cited by applicant]
US 9535855B2 · Epstein · 2017 [cited by applicant]
US 10031856B2 · Duluk, Jr. et al. · 2018 [cited by applicant]
US 10826649B1 · Yu · 2020 [cited by examiner]
US 11074206B1 · Jalal et al. · 2021 [cited by applicant]
US 11500668B2 · Tsirkin · 2022 [cited by examiner]
US 20110161620A1 · Kaminski et al. · 2011 [cited by applicant]
US 20140089450A1 · Raindel et al. · 2014 [cited by applicant]
US 20140281056A1 · Davda · 2014 [cited by examiner]
US 20140310405A1 · Pope · 2014 [cited by examiner]
US 20150212956A1 · Tsirkin et al. · 2015 [cited by applicant]
US 20150309839A1 · Lu · 2015 [cited by applicant]
US 20160077946A1 · Raikin et al. · 2016 [cited by applicant]
US 20170052916A1 · Kollu · 2017 [cited by applicant]
US 20170093677A1 · Skerry · 2017 [cited by examiner]
US 20170329655A1 · Yuan et al. · 2017 [cited by applicant]
US 20180131466A1 · DiMattia · 2018 [cited by examiner]
US 20190034208A1 · Comparan et al. · 2019 [cited by applicant]
US 20200004703A1 · Sankaran et al. · 2020 [cited by applicant]
US 20200050557A1 · Wu et al. · 2020 [cited by applicant]
US 20200059421A1 · Wang · 2020 [cited by examiner]
US 20200117605A1 · Cornett · 2020 [cited by examiner]
US 20200125518A1 · Ringe et al. · 2020 [cited by applicant]
US 20200142699A1 · Brown et al. · 2020 [cited by applicant]
US 20200310993A1 · Kumar et al. · 2020 [cited by applicant]
US 20210342272A1 · Tsirkin · 2021 [cited by applicant]
US 20210365328A1 · Zimring · 2021 [cited by examiner]
US 20220138071A1 · Edara et al. · 2022 [cited by applicant]
Ilya Lesokhin et al., “Page Fault Support for Network Controllers”, https://courses.engr.illinois.edu/ece598ms/sp2018/papers/paper254.pdf, Technion—Israel Institute of Technology; Mellanox Technologies; VMware Research,… [cited by applicant]
Network Data Buffer Management, Microsoft, https://docs.microsoft.com/en-us/windows-hardware/drivers/netcx/network-data-buffer-management, Feb. 20, 2018, 4 pgs. [cited by applicant]
Dan Siemon, “Queueing in the Linux Network Stack”, Linux Journal, LLC, https://www.linuxjournal.com/content/queueing-linux-network-stack, Sep. 23, 2013, 11 pgs. [cited by applicant]
Stephane Eranian et al., “Virtual Memory in the IA-64 Linux Kernel”, https://www.informit.com/articles/article.aspx?p=29961&seqNum=5, Informit, Nov. 8, 2002, 35 pgs. [cited by applicant]
Ilya Lesokhin, “I/O Page Faults”, http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-get.cgi/2015/MSC/MSC-2015-21.pdf, Technion—Israel Institute of Technology; Computer Science Department, Nov. 2015, 85 pgs. [cited by applicant]
Jan Christoph Nordholz, “Efficient Virtualization on Hardware with Limited Virtualization Support”, https://www.sti.tu-berlin.de/fileadmin/fg214/finished_theses/Nordholz/diplom_nordholz.pdf, Technical University Berlin … [cited by applicant]
Herrmann J., et al., “Virtualization Tuning and Optimization Guide,” Red Hat Customer Content Services, 2020, 50 Pages, Retrieved from URL: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html-s… [cited by applicant]
Oasis: “Virtual I/O Device (VIRTIO) Version 1.1,” Committee Specification Draft 01, Dec. 20, 2018, 132 Pages, Retrieved from URL: https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html. [cited by applicant]
Sembrant A., “Hiding and Reducing Memory Latency—Energy-Efficient Pipeline and Memory System Techniques,” Uppsala University, 2016, 86 Pages, Retrieved from URL: https://uu.diva-portal.org/smash/get/diva2:1040387/FULLTE… [cited by applicant]