[RFC 02/11] mm/migrate_device: flags for selecting device private THP pages
Balbir Singh
balbirs at nvidia.com
Wed Jul 9 05:25:57 UTC 2025
On 7/8/25 23:41, David Hildenbrand wrote:
> On 06.03.25 05:42, Balbir Singh wrote:
>> Add flags to mark zone device migration pages.
>>
>> MIGRATE_VMA_SELECT_COMPOUND will be used to select THP pages during
>> migrate_vma_setup() and MIGRATE_PFN_COMPOUND will make migrating
>> device pages as compound pages during device pfn migration.
>>
>> Signed-off-by: Balbir Singh <balbirs at nvidia.com>
>> ---
>> include/linux/migrate.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/include/linux/migrate.h b/include/linux/migrate.h
>> index 61899ec7a9a3..b5e4f51e64c7 100644
>> --- a/include/linux/migrate.h
>> +++ b/include/linux/migrate.h
>> @@ -167,6 +167,7 @@ static inline int migrate_misplaced_folio(struct folio *folio, int node)
>> #define MIGRATE_PFN_VALID (1UL << 0)
>> #define MIGRATE_PFN_MIGRATE (1UL << 1)
>> #define MIGRATE_PFN_WRITE (1UL << 3)
>> +#define MIGRATE_PFN_COMPOUND (1UL << 4)
>> #define MIGRATE_PFN_SHIFT 6
>> static inline struct page *migrate_pfn_to_page(unsigned long mpfn)
>> @@ -185,6 +186,7 @@ enum migrate_vma_direction {
>> MIGRATE_VMA_SELECT_SYSTEM = 1 << 0,
>> MIGRATE_VMA_SELECT_DEVICE_PRIVATE = 1 << 1,
>> MIGRATE_VMA_SELECT_DEVICE_COHERENT = 1 << 2,
>> + MIGRATE_VMA_SELECT_COMPOUND = 1 << 3,
>> };
>> struct migrate_vma {
>
> Squash that into the patch where it is actually used.
>
Will do,
Thanks,
Balbir Singh
More information about the dri-devel
mailing list