Debian Codegraph @

upstream/debian-unstable/man2/UFFDIO_CONTINUE.2const

raw
1 .\" Copyright 2016, International Business Machines Corp.
2 .\" Copyright 2016, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH UFFDIO_CONTINUE 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 UFFDIO_CONTINUE
10 \-
11 resolve a minor page fault
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/userfaultfd.h>" " /* Definition of " UFFD* " constants */"
18 .B #include <sys/ioctl.h>
19 .P
20 .BI "int ioctl(int " fd ", UFFDIO_CONTINUE, struct uffdio_continue *" argp );
21 .P
22 .B #include <linux/userfaultfd.h>
23 .P
24 .fi
25 .EX
26 .B struct uffdio_continue {
27 .B " struct uffdio_range range;"
28 /* Range to install PTEs for and continue */
29 .BR " __u64 mode;" " /* Flags controlling the behavior of continue */"
30 .BR " __s64 mapped;" " /* Number of bytes mapped, or negated error */"
31 .B };
32 .EE
33 .SH DESCRIPTION
34 Resolve a minor page fault
35 by installing page table entries
36 for existing pages in the page cache.
37 .P
38 The following value may be bitwise ORed in
39 .I mode
40 to change the behavior of the
41 .B UFFDIO_CONTINUE
42 operation:
43 .TP
44 .B UFFDIO_CONTINUE_MODE_DONTWAKE
45 Do not wake up the thread that waits for page-fault resolution.
46 .P
47 The
48 .I mapped
49 field is used by the kernel
50 to return the number of bytes that were actually mapped,
51 or an error in the same manner as
52 .BR UFFDIO_COPY .
53 If the value returned in the
54 .I mapped
55 field doesn't match the value that was specified in
56 .IR range.len ,
57 the operation fails with the error
58 .BR EAGAIN .
59 The
60 .I mapped
61 field is output-only;
62 it is not read by the
63 .B UFFDIO_CONTINUE
64 operation.
65 .SH RETURN VALUE
66 This
67 .BR ioctl (2)
68 operation returns 0 on success.
69 In this case,
70 the entire area was mapped.
71 On error, \-1 is returned and
72 .I errno
73 is set to indicate the error.
74 .SH ERRORS
75 .TP
76 .B EAGAIN
77 The number of bytes mapped
78 (i.e., the value returned in the
79 .I mapped
80 field)
81 does not equal the value that was specified in the
82 .I range.len
83 field.
84 .TP
85 .B EEXIST
86 One or more pages were already mapped in the given range.
87 .TP
88 .B EFAULT
89 No existing page could be found in the page cache for the given range.
90 .TP
91 .B EINVAL
92 Either
93 .I range.start
94 or
95 .I range.len
96 was not a multiple of the system page size;
97 or
98 .I range.len
99 was zero;
100 or the range specified was invalid.
101 .TP
102 .B EINVAL
103 An invalid bit was specified in the
104 .I mode
105 field.
106 .TP
107 .B ENOENT
108 The faulting process has changed its virtual memory layout simultaneously with
109 an outstanding
110 .B UFFDIO_CONTINUE
111 operation.
112 .TP
113 .B ENOMEM
114 Allocating memory needed to setup the page table mappings failed.
115 .TP
116 .B ESRCH
117 The faulting process has exited at the time of a
118 .B UFFDIO_CONTINUE
119 operation.
120 .SH STANDARDS
121 Linux.
122 .SH HISTORY
123 Linux 5.13.
124 .SH EXAMPLES
125 See
126 .BR userfaultfd (2).
127 .SH SEE ALSO
128 .BR ioctl (2),
129 .BR ioctl_userfaultfd (2),
130 .BR userfaultfd (2)
131 .P
132 .I linux.git/\:Documentation/\:admin\-guide/\:mm/\:userfaultfd.rst