From de6943fab34ff86e42eaf48330a676a1cedaa199 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 12 Jan 2017 08:30:06 +1300 Subject: [PATCH] userfaultfd.2: Mention some use cases Signed-off-by: Michael Kerrisk --- man2/userfaultfd.2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index 4721aa3df..52230af6a 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -252,6 +252,16 @@ portable. .SH NOTES Glibc does not provide a wrapper for this system call; call it using .BR syscall (2). + +The userfaultfd mechanism can be used as an alternative to +traditional user-space paging techniques based on the use of the +.BR SIGSEGV +signal and +.BR mmap (2). +It can also be used to implement lazy restore +for checkpoint/restore mechanisms, +as well as post-copy migration to allow (nearly) uninterrupted execution +when transferring virtual machines from one host to another. .SH EXAMPLE The program below demonstrates the use of the userfaultfd mechanism. The program creates two threads, one of which acts as the