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