madvise.2: Minor fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2011-09-19 03:31:45 +02:00
parent e8dd3ed2f1
commit 3d4b49b0a1
1 changed files with 7 additions and 5 deletions

View File

@ -29,10 +29,10 @@
.\" MADV_UNMERGEABLE
.\" 2010-06-15, Andi Kleen, Add documentation of MADV_HWPOISON.
.\" 2010-06-19, Andi Kleen, Add documentation of MADV_SOFT_OFFLINE.
.\" 2011-09-18, Doug Goldstein <cardoe@cardoe.com>
.\" Document MADV_HUGEPAGE and MADV_NOHUGEPAGE
.\"
.\" FIXME: Linux 2.6.38 added MADV_HUGEPAGE and MADV_NOHUGEPAGE
.\"
.TH MADVISE 2 2010-06-20 "Linux" "Linux Programmer's Manual"
.TH MADVISE 2 2011-09-18 "Linux" "Linux Programmer's Manual"
.SH NAME
madvise \- give advice about use of memory
.SH SYNOPSIS
@ -213,16 +213,18 @@ and
.IR length .
.TP
.BR MADV_HUGEPAGE " (since Linux 2.6.38)"
.\" http://lwn.net/Articles/358904/
.\" https://lwn.net/Articles/423584/
Enables Transparent Huge Pages (THP) for pages in the range specified by
.I addr
and
.IR length .
Currently Transparent Huge Pages only work with private anonymous pages (see
Currently, Transparent Huge Pages only work with private anonymous pages (see
.BR mmap (2)).
The kernel will regularly scan the areas marked as huge page candidates
to replace them with huge pages.
The kernel will also allocate huge pages directly when the region is
naturally aligned to the huge page size. (see
naturally aligned to the huge page size (see
.BR posix_memalign (2)).
This feature is primarily aimmed at applications that use large mappings of
data and access large regions of that memory at a time (e.g. virtualization