All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] drm/amdkfd: Enable device private memory THP support in kfd svm driver
@ 2026-10-19 13:38 Xiaogang.Chen
  2026-10-19 13:38 ` [PATCH v3 1/3] drm/amdkfd: Add awareness of THP of device and system RAM " Xiaogang.Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Xiaogang.Chen @ 2026-10-19 13:38 UTC (permalink / raw)
  To: amd-gfx; +Cc: Xiaogang Chen

From: Xiaogang Chen <xiaogang.chen@amd.com>

Add device private THP support to migration in kfd driver by using following
work [1]. The implementation enables efficient migration of large folios 
between system memory and device-private memory.

A benchmark test shows the migration speed got improved more than 5 times
comparing to current kfd/svm driver. 

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

v2:
- Reset is_large each 4K page iteration
- Unmap the THP DMA mapping once as DMA mapping, at its real size
- Leave migrate->dst[i] zero when the source is not migrating
- Count THP migrations as HPAGE_PMD_NR pages in prange->vram_pages
- Implement folio_split and hold one svm_bo ref per subpage

v3:
- Do not migrate partial THP memory at CPU/GPU page fault handler
- re-configure compound device folio after it is release from core HMM.
  So, it can be reused by ttm as 4K pages. 
- Remove SDMA page entry FLAG(9) setting at GART page table since 
  not see noticelbe perofmance change.
  
Xiaogang Chen (3):
  drm/amdkfd: Add awareness of THP of device and system RAM in kfd svm
    driver
  drm/amdkfd: Do not migrate partial THP memory at CPU/GPU page fault
    handler
  drm/amdkfd: Enable HMM device-private THP migration in KFD SVM driver

 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 372 +++++++++++++++++++----
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c     | 119 +++++++-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.h     |  13 +
 3 files changed, 435 insertions(+), 69 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-11-16 15:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 13:38 [PATCH v3 0/3] drm/amdkfd: Enable device private memory THP support in kfd svm driver Xiaogang.Chen
2026-10-19 13:38 ` [PATCH v3 1/3] drm/amdkfd: Add awareness of THP of device and system RAM " Xiaogang.Chen
2026-11-13 23:28   ` Philip Yang
2026-11-16 15:54     ` Chen, Xiaogang
2026-10-19 13:38 ` [PATCH v3 2/3] drm/amdkfd: Do not migrate partial THP memory at CPU/GPU page fault handler Xiaogang.Chen
2026-10-19 13:38 ` [PATCH v3 3/3] drm/amdkfd: Enable HMM device-private THP migration in KFD SVM driver Xiaogang.Chen
2026-11-13 19:29   ` Philip Yang

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.