]> Git Repo - linux.git/commit
khugepaged: allow to collapse a page shared across fork
authorKirill A. Shutemov <[email protected]>
Wed, 3 Jun 2020 23:00:20 +0000 (16:00 -0700)
committerLinus Torvalds <[email protected]>
Thu, 4 Jun 2020 03:09:46 +0000 (20:09 -0700)
commit9445689f3b6170c6145a8772eee692482199cdd6
treeab074cd2aa3bbb7fb5f6920f051b2403bb972057
parentae2c5d8042426b69c5f4a74296d1a20bb769a8ad
khugepaged: allow to collapse a page shared across fork

The page can be included into collapse as long as it doesn't have extra
pins (from GUP or otherwise).

Logic to check the refcount is moved to a separate function.  For pages in
swap cache, add compound_nr(page) to the expected refcount, in order to
handle the compound page case.  This is in preparation for the following
patch.

VM_BUG_ON_PAGE() was removed from __collapse_huge_page_copy() as the
invariant it checks is no longer valid: the source can be mapped multiple
times now.

[[email protected]: remove error message when checking external pins]
Link: http://lkml.kernel.org/r/[email protected]
[[email protected]: fix set-but-not-used warning]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Yang Shi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Tested-by: Zi Yan <[email protected]>
Reviewed-by: William Kucharski <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Acked-by: Yang Shi <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Ralph Campbell <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
mm/khugepaged.c
This page took 0.053593 seconds and 4 git commands to generate.