mbox series

[0/1] Large folio migration fix and questions on migration stats

Message ID 20231009203231.1715845-1-zi.yan@sent.com (mailing list archive)
Headers show
Series Large folio migration fix and questions on migration stats | expand

Message

Zi Yan Oct. 9, 2023, 8:32 p.m. UTC
From: Zi Yan <ziy@nvidia.com>

I am adding support for >0 folio compaction and find the
VM_BUG_ON(!list_empty(&cc->migratepages)) in compact_zone() can be triggered
when a large folio is tried to be migrated, split, and its split base
pages are not migrated. The fix is in patch 1. In the upstream tree,
large folios can be migrated via move_pages() syscall and there is no
VM_BUG_ON in do_move_pages_to_node() but pages left in the source page
list will not be returned to LRU lists. This is from my code inspection
and I have not reproduced it on upstream tree yet.

In addition, I wonder if we need to add any large folio migration stats in
addition to existing THP migration stats, at least for large folio split
stats. Otherwise, large folio migrations seem to happen without any
notice.

Thanks.

Zi Yan (1):
  mm/migrate: correct nr_failed in migrate_pages_sync()

 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)