diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2016-03-15 17:56:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 19:55:16 -0400 |
commit | d7206a70af5c094446927b5dea8704f0f96303e3 (patch) | |
tree | 3cf439ab82a213e8e8ea0053869e621285b7244f /mm | |
parent | cecf257b62e39eab0e802e91c62ae5679673db02 (diff) |
mm/madvise: update comment on sys_madvise()
Some new MADV_* advices are not documented in sys_madvise() comment. So
let's update it.
[akpm@linux-foundation.org: modifications suggested by Michal]
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Chen Gong <gong.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/madvise.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mm/madvise.c b/mm/madvise.c index 6a7711436c5b..a01147359f3b 100644 --- a/mm/madvise.c +++ b/mm/madvise.c | |||
@@ -639,14 +639,28 @@ madvise_behavior_valid(int behavior) | |||
639 | * some pages ahead. | 639 | * some pages ahead. |
640 | * MADV_DONTNEED - the application is finished with the given range, | 640 | * MADV_DONTNEED - the application is finished with the given range, |
641 | * so the kernel can free resources associated with it. | 641 | * so the kernel can free resources associated with it. |
642 | * MADV_FREE - the application marks pages in the given range as lazy free, | ||
643 | * where actual purges are postponed until memory pressure happens. | ||
642 | * MADV_REMOVE - the application wants to free up the given range of | 644 | * MADV_REMOVE - the application wants to free up the given range of |
643 | * pages and associated backing store. | 645 | * pages and associated backing store. |
644 | * MADV_DONTFORK - omit this area from child's address space when forking: | 646 | * MADV_DONTFORK - omit this area from child's address space when forking: |
645 | * typically, to avoid COWing pages pinned by get_user_pages(). | 647 | * typically, to avoid COWing pages pinned by get_user_pages(). |
646 | * MADV_DOFORK - cancel MADV_DONTFORK: no longer omit this area when forking. | 648 | * MADV_DOFORK - cancel MADV_DONTFORK: no longer omit this area when forking. |
649 | * MADV_HWPOISON - trigger memory error handler as if the given memory range | ||
650 | * were corrupted by unrecoverable hardware memory failure. | ||
651 | * MADV_SOFT_OFFLINE - try to soft-offline the given range of memory. | ||
647 | * MADV_MERGEABLE - the application recommends that KSM try to merge pages in | 652 | * MADV_MERGEABLE - the application recommends that KSM try to merge pages in |
648 | * this area with pages of identical content from other such areas. | 653 | * this area with pages of identical content from other such areas. |
649 | * MADV_UNMERGEABLE- cancel MADV_MERGEABLE: no longer merge pages with others. | 654 | * MADV_UNMERGEABLE- cancel MADV_MERGEABLE: no longer merge pages with others. |
655 | * MADV_HUGEPAGE - the application wants to back the given range by transparent | ||
656 | * huge pages in the future. Existing pages might be coalesced and | ||
657 | * new pages might be allocated as THP. | ||
658 | * MADV_NOHUGEPAGE - mark the given range as not worth being backed by | ||
659 | * transparent huge pages so the existing pages will not be | ||
660 | * coalesced into THP and new pages will not be allocated as THP. | ||
661 | * MADV_DONTDUMP - the application wants to prevent pages in the given range | ||
662 | * from being included in its core dump. | ||
663 | * MADV_DODUMP - cancel MADV_DONTDUMP: no longer exclude from core dump. | ||
650 | * | 664 | * |
651 | * return values: | 665 | * return values: |
652 | * zero - success | 666 | * zero - success |