UFFDIO_CONTINUE(2const)
π UFFDIO_CONTINUE(2const) π
okay bestie, sit DOWN, because this is the UFFDIO_CONTINUE page from the Linux man-pages β section 2const, if you're keeping track β and it's genuinely so cute once it clicks. it's giving "resolve a minor page fault" energy and honestly? iconic.
πΈ NAME πΈ
UFFDIO_CONTINUE β resolve a minor page fault
π LIBRARY π
Standard C library (libc, -lc)
β¨ SYNOPSIS β¨
#include <linux/userfaultfd.h> /* Definition of UFFD* constants */
#include <sys/ioctl.h>
int ioctl(int fd, UFFDIO_CONTINUE, struct uffdio_continue *argp);
#include <linux/userfaultfd.h>
struct uffdio_continue {
struct uffdio_range range;
/* Range to install PTEs for and continue */
__u64 mode; /* Flags controlling the behavior of continue */
__s64 mapped; /* Number of bytes mapped, or negated error */
};
like look at that little struct. she's small but she's doing a LOT. π
π¦ DESCRIPTION π¦
so what are we actually doing here? resolving a minor page fault by installing page table entries for pages that already exist in the page cache. no new pages, no drama β the content is already chilling there, you're just hooking up the PTEs. periodt.
the following value may be bitwise ORed into mode to change the behavior of the UFFDIO_CONTINUE operation:
UFFDIO_CONTINUE_MODE_DONTWAKEβ do not wake up the thread that's waiting for page-fault resolution. like, let her sleep. π€
<div></div>
now, the mapped field β this one is the kernel's little notes app, okay? the kernel uses it to hand you back the number of bytes that were actually mapped, or an error, in the exact same manner as UFFDIO_COPY. and if whatever comes back in mapped does not match the value you specified in range.len, the operation fails with the error EAGAIN. π«
real talk:mappedis output-only. it is not read by theUFFDIO_CONTINUEoperation. you don't put anything in there, bestie, the kernel does. don't try it.
π RETURN VALUE π
this ioctl(2) operation returns 0 on success β and in that case, the entire area was mapped. slay. π
on error, -1 is returned and errno is set to indicate the error.
π ERRORS π
EAGAINβ the number of bytes mapped (i.e., the value returned in themappedfield) does not equal the value that was specified in therange.lenfield.EEXISTβ one or more pages were already mapped in the given range. been there, done that, apparently. πEFAULTβ no existing page could be found in the page cache for the given range. she's not here, girl. πEINVALβ eitherrange.startorrange.lenwas not a multiple of the system page size; orrange.lenwas zero; or the range specified was invalid.EINVALβ an invalid bit was specified in themodefield.ENOENTβ the faulting process has changed its virtual memory layout simultaneously with an outstandingUFFDIO_CONTINUEoperation. multitasking gone wrong fr fr.ENOMEMβ allocating memory needed to setup the page table mappings failed.ESRCHβ the faulting process has exited at the time of aUFFDIO_CONTINUEoperation. she left the chat. π
π STANDARDS π
Linux.
π HISTORY π
Linux 5.13.
π EXAMPLES π
See userfaultfd(2).
(yes that's it. the examples live over there. go look, iykyk.) π§
β SEE ALSO β
ioctl(2)ioctl_userfaultfd(2)userfaultfd(2)linux.git/Documentation/admin-guide/mm/userfaultfd.rst
and that's the whole page, bestie!! every flag, every errno, every field, all of it. you ate. π β¨
this lil masterpiece lives in Linux man-pages 6.20, dated 2026-02-08 β mwah, kisses to whoever maintains it, no cap. π«ΆπΈ
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2016, International Business Machines Corp
- Copyright 2016, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms