[PATCH v3 05/13] mm/page_vma_mapped: Add flag to page_vma_mapped_walk::flags to track device private pages
Zi Yan
ziy at nvidia.com
Wed Jan 28 08:01:15 AEDT 2026
On 23 Jan 2026, at 1:23, Jordan Niethe wrote:
> A future change will remove device private pages from the physical
> address space. This will mean that device private pages no longer have
> normal PFN and must be handled separately.
>
> Prepare for this by adding a PVMW_DEVICE_PRIVATE flag to
> page_vma_mapped_walk::flags. This indicates that
> page_vma_mapped_walk::pfn contains a device private offset rather than a
> normal pfn.
>
> Once the device private pages are removed from the physical address
> space this flag will be used to ensure a device private offset is
> returned.
>
> Signed-off-by: Jordan Niethe <jniethe at nvidia.com>
> Signed-off-by: Alistair Popple <apopple at nvidia.com>
> ---
> v1:
> - Update for HMM huge page support
> v2:
> - Move adding device_private param to check_pmd() until final patch
> v3:
> - Track device private offset in pvmw::flags instead of pvmw::pfn
> ---
> include/linux/rmap.h | 24 ++++++++++++++++++++++--
> mm/page_vma_mapped.c | 4 ++--
> mm/rmap.c | 4 ++--
> mm/vmscan.c | 2 +-
> 4 files changed, 27 insertions(+), 7 deletions(-)
>
LGTM.
Reviewed-by: Zi Yan <ziy at nvidia.com>
Best Regards,
Yan, Zi
More information about the Linuxppc-dev
mailing list