Debian Codegraph @

upstream/debian-trixie/man2/UFFDIO_WAKE.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_WAKE 2const 2024-06-14 "Linux man-pages 6.9.1"
9 .SH NAME
10 UFFDIO_WAKE
11 \-
12 wake up a thread waiting for page-fault resolution
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_WAKE, const struct uffdio_range *" argp );
22 .fi
23 .SH DESCRIPTION
24 Wake up the thread waiting for page-fault resolution on
25 a specified memory address range.
26 .P
27 The
28 .B UFFDIO_WAKE
29 operation is used in conjunction with
30 .B UFFDIO_COPY
31 and
32 .B UFFDIO_ZEROPAGE
33 operations that have the
34 .B UFFDIO_COPY_MODE_DONTWAKE
35 or
36 .B UFFDIO_ZEROPAGE_MODE_DONTWAKE
37 bit set in the
38 .I mode
39 field.
40 The userfault monitor can perform several
41 .B UFFDIO_COPY
42 and
43 .B UFFDIO_ZEROPAGE
44 operations in a batch and then explicitly wake up the faulting thread using
45 .BR UFFDIO_WAKE .
46 .SH RETURN VALUE
47 This
48 .BR ioctl (2)
49 operation returns 0 on success.
50 On error, \-1 is returned and
51 .I errno
52 is set to indicate the error.
53 .SH ERRORS
54 .TP
55 .B EINVAL
56 The
57 .I start
58 or the
59 .I len
60 field of the
61 .I ufdio_range
62 structure was not a multiple of the system page size; or
63 .I len
64 was zero; or the specified range was otherwise invalid.
65 .SH STANDARDS
66 Linux.
67 .SH HISTORY
68 Linux 4.3.
69 .SH EXAMPLES
70 See
71 .BR userfaultfd (2).
72 .SH SEE ALSO
73 .BR ioctl (2),
74 .BR ioctl_userfaultfd (2),
75 .BR UFFDIO_REGISTER (2const),
76 .BR userfaultfd (2)
77 .P
78 .I linux.git/\:Documentation/\:admin\-guide/\:mm/\:userfaultfd.rst