[PATCH 00/20] Add KFD GPUVM support for dGPUs v4

Christian König ckoenig.leichtzumerken at gmail.com
Mon Mar 19 16:39:13 UTC 2018


So coming back to this series once more.

Patch #1, #3 are Reviewed-by: Christian König <christian.koenig at amd.com>.

Patch #2, #4 - #13 and #18-#19 are Acked-by: Christian König 
<christian.koenig at amd.com>.

Patch #14: What's the difference to setting vramlimit=$size_of_bar ?

Patch #15 & #20: Why is that actually still needed? I thought we have 
fixed all dependencies and can now use the "standard" way of attaching 
fences to reservation objects to do this.

Saying so I still need to take a closer look at patch #20.

Patch #16: Looks good to me in general, but I think it would be safer if 
we grab a reference to the task structure. Otherwise grabbing pages from 
a mm_struct sounds a bit scary to me.

Patch #17: I think it would be better to allocate the node when the 
locks are not held and free it when we find that it isn't used, but no 
big deal.

Regards,
Christian.

Am 15.03.2018 um 22:27 schrieb Felix Kuehling:
> Rebased and integrated review feedback from v3:
> * Removed vm->vm_context field
> * Use uninterruptible waiting in initial PD validation to avoid ERESTARTSYS
> * Return number of successful map/unmap operations in failure cases
> * Facilitate partial retry after failed map/unmap
> * Added comments with parameter descriptions to new APIs
> * Defined AMDKFD_IOC_FREE_MEMORY_OF_GPU write-only
>
> This patch series also adds Userptr support in patches 15-20.
>
> Felix Kuehling (19):
>    drm/amdgpu: Move KFD-specific fields into struct amdgpu_vm
>    drm/amdgpu: Fix initial validation of PD BO for KFD VMs
>    drm/amdgpu: Add helper to turn an existing VM into a compute VM
>    drm/amdgpu: Add kfd2kgd interface to acquire an existing VM
>    drm/amdkfd: Create KFD VMs on demand
>    drm/amdkfd: Remove limit on number of GPUs
>    drm/amdkfd: Aperture setup for dGPUs
>    drm/amdkfd: Add per-process IDR for buffer handles
>    drm/amdkfd: Allocate CWSR trap handler memory for dGPUs
>    drm/amdkfd: Add TC flush on VMID deallocation for Hawaii
>    drm/amdkfd: Add ioctls for GPUVM memory management
>    drm/amdkfd: Kmap event page for dGPUs
>    drm/amdkfd: Add module option for testing large-BAR functionality
>    drm/amdgpu: Add MMU notifier type for KFD userptr
>    drm/amdgpu: Enable amdgpu_ttm_tt_get_user_pages in worker threads
>    drm/amdgpu: GFP_NOIO while holding locks taken in MMU notifier
>    drm/amdkfd: GFP_NOIO while holding locks taken in MMU notifier
>    drm/amdkfd: Add quiesce_mm and resume_mm to kgd2kfd_calls
>    drm/amdgpu: Add userptr support for KFD
>
> Oak Zeng (1):
>    drm/amdkfd: Populate DRM render device minor
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h         |  37 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c  |   1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c  |   1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c   | 818 ++++++++++++++++++---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c             |   2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c             |  96 ++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h             |  11 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c            |  30 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c             |  70 ++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h             |  10 +
>   drivers/gpu/drm/amd/amdkfd/kfd_chardev.c           | 532 ++++++++++++++
>   drivers/gpu/drm/amd/amdkfd/kfd_crat.c              |   3 +
>   drivers/gpu/drm/amd/amdkfd/kfd_device.c            |  40 +-
>   .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c  |  22 +-
>   drivers/gpu/drm/amd/amdkfd/kfd_events.c            |  31 +-
>   drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c       |  59 +-
>   drivers/gpu/drm/amd/amdkfd/kfd_module.c            |   7 +
>   drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c   |   2 +-
>   drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c    |   2 +-
>   drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c    |  37 +
>   drivers/gpu/drm/amd/amdkfd/kfd_priv.h              |  41 ++
>   drivers/gpu/drm/amd/amdkfd/kfd_process.c           | 314 +++++++-
>   drivers/gpu/drm/amd/amdkfd/kfd_topology.c          |   4 +
>   drivers/gpu/drm/amd/amdkfd/kfd_topology.h          |   1 +
>   drivers/gpu/drm/amd/include/kgd_kfd_interface.h    |  10 +
>   include/uapi/linux/kfd_ioctl.h                     | 122 ++-
>   26 files changed, 2090 insertions(+), 213 deletions(-)
>



More information about the amd-gfx mailing list