Bug 2158705

Summary: RFE: Prefer /dev/userfaultfd over userfaultfd(2) syscall
Product: Red Hat Enterprise Linux 9 Reporter: Michal Privoznik <mprivozn>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
libvirt sub component: Live Migration QA Contact: Fangge Jin <fjin>
Status: CLOSED MIGRATED Docs Contact:
Severity: unspecified    
Priority: unspecified CC: jsuchane, lcheng, lmen, virt-bugs, virt-maint
Version: 9.2Keywords: FutureFeature, MigratedToJIRA, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 2158704 Environment:
Last Closed: 2023-09-22 13:14:37 UTC Type: Story
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2158704    
Bug Blocks:    

Description Michal Privoznik 2023-01-06 08:25:13 UTC
+++ This bug was initially created as a clone of Bug #2158704 +++

Description of problem:
So far, for postcopy migration the userfaultfd(2) syscall is used. But this has couple of drawbacks (which are summarized nicely in kernel commit [1]). To resolve these, kernel came up with /dev/userfaultfd device, and this is a request to switch to that.

Please note, some scenarios where QEMU is running might be disallowing the userfaultfd(2) syscall as it is viewed as too powerful. For intsance KubeVirt [2].


1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d5de004e009add27db76c5cdc9f1f7f7dc087e7

2: https://issues.redhat.com/browse/OCPBUGS-5031

Comment 1 Michal Privoznik 2023-01-06 14:34:08 UTC
We still need to discuss the design of the feature, but one of the ideas was that libvirtd would open the file and pass FD to QEMU.

Comment 2 John Ferlan 2023-01-09 20:32:20 UTC
Also see the "work-around" of sorts in the plan for kubevirt (https://github.com/kubevirt/kubevirt/pull/8917).

Comment 3 RHEL Program Management 2023-09-22 13:12:15 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-22 13:14:37 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.