summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2013-04-18 09:47:19 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-04-23 17:18:03 +1000
commit1c516a10a9301628880719a4726ba37431c0b665 (patch)
treede909673aef7a56809718a3078aaf4d011ba790c /mm
parentad9aa732ada4b0f2f926c2284327d1b5644137b6 (diff)
mm-thp-add-split-tail-pages-to-shrink-page-list-in-page-reclaim-fix
document split_huge_page_to_list Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/huge_memory.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 734c3d92a83c..6d13cfd677ca 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1800,6 +1800,13 @@ static void __split_huge_page(struct page *page,
BUG_ON(mapcount != mapcount2);
}
+/*
+ * Split a hugepage into normal pages. This doesn't change the position of head
+ * page. If @list is null, tail pages will be added to LRU list, otherwise, to
+ * @list. Both head page and tail pages will inherit mapping, flags, and so on
+ * from the hugepage.
+ * Return 0 if the hugepage is split successfully otherwise return 1.
+ */
int split_huge_page_to_list(struct page *page, struct list_head *list)
{
struct anon_vma *anon_vma;