Debian Codegraph @

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

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