diff options
author | Matthew Wilcox (Oracle) | 2020-08-15 19:28:51 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) | 2022-03-21 13:01:35 -0400 |
commit | 343b288834e84d0b175b20b4f48277bc33260986 (patch) | |
tree | 28ae1d5fc74b4d20b7377243a166d7de32650cf3 /mm | |
parent | 820c4e2e6f517e4c0cee703265e275e3a08992e6 (diff) |
mm/vmscan: Optimise shrink_page_list for non-PMD-sized folios
A large folio which is smaller than a PMD does not need to do the extra
work in try_to_unmap() of trying to split a PMD entry.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index d15a9f08caab..8243437e5c5f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1765,7 +1765,8 @@ retry: enum ttu_flags flags = TTU_BATCH_FLUSH; bool was_swapbacked = PageSwapBacked(page); - if (unlikely(PageTransHuge(page))) + if (PageTransHuge(page) && + thp_order(page) >= HPAGE_PMD_ORDER) flags |= TTU_SPLIT_HUGE_PMD; try_to_unmap(folio, flags); |