The conversion is quite straightforward, just replace the page API to the corresponding folio API. migrate_pages() and unmap_and_move() mostly work with folios (head pages) only. One question is about THP. Which is converted to large folio in the patchset. This is generally OK, because the code can work with arbitrary order large folio at most times. But some THP related statistics (such as THP_MIGRATION_SUCCESS, etc.) are converted for large folio with arbitrary order too. Do we really care about the order of large folio? Do we need to be backward compatible strictly? Best Regards, Huang, Ying