On 9/23/26 21:33, Shahyan Soltani wrote: > Dropping these should allow the GPU to clear the root PD only when it is > required. Further testing may be required to verify this.
How familiar are you with trace points on Linux? We have the amdgpu_vm_update_ptes, amdgpu_vm_copy_ptes and amdgpu_vm_set_ptes trace points which allows you to observe if the root PD is cleared or not. Please double check if that patch here really works. My educated guess is that it doesn't and we need to improve the vm->generation handling quite a bit for this be correct. Regards, Christian. > > Signed-off-by: Shahyan Soltani <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > index 47cde5459469..1c3d3603af60 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > @@ -2640,7 +2640,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct > amdgpu_vm *vm, > vm->last_update = dma_fence_get_stub(); > vm->last_unlocked = dma_fence_get_stub(); > vm->last_tlb_flush = dma_fence_get_stub(); > - vm->generation = amdgpu_vm_generation(adev, NULL); > > mutex_init(&vm->eviction_lock); > vm->evicting = false; > @@ -2663,10 +2662,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct > amdgpu_vm *vm, > if (r) > goto error_free_root; > > - r = amdgpu_vm_pt_clear(adev, vm, root, false); > - if (r) > - goto error_free_root; > - > r = amdgpu_vm_create_task_info(vm); > if (r) > dev_dbg(adev->dev, "Failed to create task info for VM\n");
