[PATCH v1 0/5] Prepare GPU SVM for migration of THP

Francois Dugast francois.dugast at intel.com
Thu Jul 17 13:38:22 UTC 2025


This series adds support to handle folios in GPU SVM in preparation of
THP migration of zone device pages. Major performance improvements are
expected due to skipping multiple loops that call APIs for DMA mapping,
page allocation, copy, etc. If 2MB folios are used instead of 4KB pages
some operations might be reduced by a factor of 512.

However, this cannot be exercised yet as the folio order will remain 0
until the migration code is available. This is being developed in a
separate series [1]. Once merged, a few more changes will be required
in GPU SVM to make use of it.

[1] https://lore.kernel.org/linux-mm/20250703233511.2028395-1-balbirs@nvidia.com

Francois Dugast (5):
  drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy
    functions
  drm/xe/svm: Use struct drm_pagemap_device_addr
  drm/pagemap: DMA map folios when possible
  drm/xe/migrate: Use order to calculate migration length
  drm/pagemap: Allocate folios when possible

 drivers/gpu/drm/drm_pagemap.c   | 115 +++++++++++++++++++-------------
 drivers/gpu/drm/xe/xe_migrate.c |  69 +++++++++++--------
 drivers/gpu/drm/xe/xe_migrate.h |   5 +-
 drivers/gpu/drm/xe/xe_svm.c     |  37 +++++-----
 include/drm/drm_pagemap.h       |   8 +--
 5 files changed, 140 insertions(+), 94 deletions(-)

-- 
2.43.0



More information about the Intel-xe mailing list