aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xarray.c
diff options
context:
space:
mode:
authorZi Yan <[email protected]>2024-03-22 19:33:04 +0000
committerAndrew Morton <[email protected]>2024-04-26 03:56:08 +0000
commit7262f208ca681385d133844be8a58d9b4ca185f7 (patch)
tree0dc10a8721b026c1e27d05f95377b287fcae4d50 /lib/xarray.c
parentmm: hold PTL from the first PTE while reclaiming a large folio (diff)
downloadkernel-7262f208ca681385d133844be8a58d9b4ca185f7.tar.gz
kernel-7262f208ca681385d133844be8a58d9b4ca185f7.zip
mm/migrate: split source folio if it is on deferred split list
If the source folio is on deferred split list, it is likely some subpages are not used. Split it before migration to avoid migrating unused subpages. Commit 616b8371539a6 ("mm: thp: enable thp migration in generic path") did not check if a THP is on deferred split list before migration, thus, the destination THP is never put on deferred split list even if the source THP might be. The opportunity of reclaiming free pages in a partially mapped THP during deferred list scanning is lost, but no other harmful consequence is present[1]. [1]: https://lore.kernel.org/linux-mm/[email protected]/ [[email protected]: fix an error in migrate_misplaced_folio()] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Fixes: 616b8371539a ("mm: thp: enable thp migration in generic path") Signed-off-by: Zi Yan <[email protected]> Tested-by: Baolin Wang <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Huang, Ying <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: SeongJae Park <[email protected]> Cc: Yang Shi <[email protected]> Cc: Yin Fengwei <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions