userfaultfd.2: Mention some use cases

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-01-12 08:30:06 +13:00
parent 6d3e02a507
commit de6943fab3
1 changed files with 10 additions and 0 deletions

View File

@ -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