From be7979d754e44b7653db96de06190595ff12fa87 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 21 Apr 2017 11:06:42 +0200 Subject: [PATCH] ioctl_userfaultfd.2: Explain the use case for UFFDIO_WAKE Reported-by: Mike Rapoport Signed-off-by: Michael Kerrisk --- man2/ioctl_userfaultfd.2 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index fd5b925d2..11628eb13 100644 --- a/man2/ioctl_userfaultfd.2 +++ b/man2/ioctl_userfaultfd.2 @@ -487,12 +487,31 @@ field. Wake up the thread waiting for page-fault resolution on a specified memory address range. +The +.B UFFDIO_WAKE +operation is used in conjunction with +.BR UFFDIO_COPY +and +.BR UFFDIO_ZEROPAGE +operations that have the +.BR UFFDIO_COPY_MODE_DONTWAKE +or +.BR UFFDIO_ZEROPAGE_MODE_DONTWAKE +bit set in the +.I mode +field. +The userfault monitor can perform several +.BR UFFDIO_COPY +and +.BR UFFDIO_ZEROPAGE +operations in a batch and then explicitly wake up the faulting thread using +.BR UFFDIO_WAKE . + The .I argp argument is a pointer to a .I uffdio_range structure (shown above) that specifies the address range. -.\" FIXME: Need more detail here. How is the UFFDIO_WAKE operation used? This .BR ioctl (2)