Re: [PATCH] drm/amdkfd: handle duplicate BOs in reserve_bo_and_cond_vms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 13, 2024 at 10:36:28AM +0200, Tomáš Trnka wrote:
> From: Lang Yu <Lang.Yu@xxxxxxx>
> 
> [ Upstream commit 2a705f3e49d20b59cd9e5cc3061b2d92ebe1e5f0 ]
> 
> Observed on gfx8 ASIC where KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM is used.
> Two attachments use the same VM, root PD would be locked twice.
> 
> [   57.910418] Call Trace:
> [   57.793726]  ? reserve_bo_and_cond_vms+0x111/0x1c0 [amdgpu]
> [   57.793820]  amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu+0x6c/0x1c0 [amdgpu]
> [   57.793923]  ? idr_get_next_ul+0xbe/0x100
> [   57.793933]  kfd_process_device_free_bos+0x7e/0xf0 [amdgpu]
> [   57.794041]  kfd_process_wq_release+0x2ae/0x3c0 [amdgpu]
> [   57.794141]  ? process_scheduled_works+0x29c/0x580
> [   57.794147]  process_scheduled_works+0x303/0x580
> [   57.794157]  ? __pfx_worker_thread+0x10/0x10
> [   57.794160]  worker_thread+0x1a2/0x370
> [   57.794165]  ? __pfx_worker_thread+0x10/0x10
> [   57.794167]  kthread+0x11b/0x150
> [   57.794172]  ? __pfx_kthread+0x10/0x10
> [   57.794177]  ret_from_fork+0x3d/0x60
> [   57.794181]  ? __pfx_kthread+0x10/0x10
> [   57.794184]  ret_from_fork_asm+0x1b/0x30
> 
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3007
> Tested-by: Tomáš Trnka <trnka@xxxxxxx>
> Signed-off-by: Lang Yu <Lang.Yu@xxxxxxx>
> Reviewed-by: Felix Kuehling <felix.kuehling@xxxxxxx>
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx # 6.6.x only
> Signed-off-by: Tomáš Trnka <trnka@xxxxxxx>
> [TT: trivially adjusted for 6.6 which does not have commit 05d249352f
>      (third argument to drm_exec_init removed)]
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Now queued up, thanks.

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux