mm/vmscan: Free non-shmem folios without splitting them
We have to allocate memory in order to split a file-backed folio, so it's not a good idea to split them in the memory freeing path. It also doesn't work for XFS because pages have an extra reference count from page_has_private() and split_huge_page() expects that reference to have already been removed. Unfortunately, we still have to split shmem THPs because we can't handle swapping out an entire THP yet. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
Родитель
84fbbe2189
Коммит
820c4e2e6f
|
@ -1739,8 +1739,8 @@ retry:
|
||||||
/* Adding to swap updated mapping */
|
/* Adding to swap updated mapping */
|
||||||
mapping = page_mapping(page);
|
mapping = page_mapping(page);
|
||||||
}
|
}
|
||||||
} else if (unlikely(PageTransHuge(page))) {
|
} else if (PageSwapBacked(page) && PageTransHuge(page)) {
|
||||||
/* Split file THP */
|
/* Split shmem THP */
|
||||||
if (split_folio_to_list(folio, page_list))
|
if (split_folio_to_list(folio, page_list))
|
||||||
goto keep_locked;
|
goto keep_locked;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче