All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/gpusvm, drm/pagemap, drm/xe: Restructure migration in preparation for multi-device
@ 2025-04-17 10:51 Thomas Hellström
  2025-04-17 10:51 ` [PATCH 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap Thomas Hellström
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Thomas Hellström @ 2025-04-17 10:51 UTC (permalink / raw)
  To: intel-xe
  Cc: dri-devel, Thomas Hellström, himal.prasad.ghimiray, apopple,
	airlied, Simona Vetter, felix.kuehling, Matthew Brost,
	Christian König, dakr, Mrozek, Michal, Joonas Lahtinen

This patchset modifies the migration part of drm_gpusvm to drm_pagemap and
adds a populate_mm() op to drm_pagemap.

The idea is that the device that receives a pagefault determines if it wants to
migrate content and to where. It then calls the populate_mm() method of relevant
drm_pagemap.

This functionality was mostly already in place, but hard-coded for xe only without
going through a pagemap op. Since we might be dealing with separate devices moving
forward, it also now becomes the responsibilit of the populate_mm() op to
grab any necessary local device runtime pm references and keep them held while
its pages are present in an mm (struct mm_struct).

On thing to decide here is whether the populate_mm() callback should sit on a
struct drm_pagemap for now while we sort multi-device usability out or whether
we should add it (or something equivalent) to struct dev_pagemap.

Matthew Brost (1):
  drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap

Thomas Hellström (2):
  drm/pagemap: Add a populate_mm op
  drm/xe: Implement and use the drm_pagemap populate_mm op

 Documentation/gpu/rfc/gpusvm.rst     |  12 +-
 drivers/gpu/drm/Makefile             |   6 +-
 drivers/gpu/drm/drm_gpusvm.c         | 751 +-----------------------
 drivers/gpu/drm/drm_pagemap.c        | 818 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/Kconfig           |  10 +-
 drivers/gpu/drm/xe/xe_bo_types.h     |   2 +-
 drivers/gpu/drm/xe/xe_device_types.h |   2 +-
 drivers/gpu/drm/xe/xe_migrate.c      |   2 +-
 drivers/gpu/drm/xe/xe_svm.c          | 100 ++--
 drivers/gpu/drm/xe/xe_tile.h         |  11 +
 include/drm/drm_gpusvm.h             |  95 +---
 include/drm/drm_pagemap.h            | 130 +++++
 12 files changed, 1049 insertions(+), 890 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_pagemap.c

-- 
2.49.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-05-07 13:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 10:51 [PATCH 0/3] drm/gpusvm, drm/pagemap, drm/xe: Restructure migration in preparation for multi-device Thomas Hellström
2025-04-17 10:51 ` [PATCH 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap Thomas Hellström
2025-05-07 13:08   ` kernel test robot
2025-04-17 10:51 ` [PATCH 2/3] drm/pagemap: Add a populate_mm op Thomas Hellström
2025-04-17 10:51 ` [PATCH 3/3] drm/xe: Implement and use the drm_pagemap " Thomas Hellström
2025-04-17 13:02 ` ✓ CI.Patch_applied: success for drm/gpusvm, drm/pagemap, drm/xe: Restructure migration in preparation for multi-device Patchwork
2025-04-17 13:02 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-17 13:03 ` ✓ CI.KUnit: success " Patchwork
2025-04-17 13:12 ` ✓ CI.Build: " Patchwork
2025-04-17 13:14 ` ✓ CI.Hooks: " Patchwork
2025-04-17 13:15 ` ✓ CI.checksparse: " Patchwork
2025-04-17 14:03 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-04-18  4:52 ` ✓ Xe.CI.Full: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.