On 11/17/26 12:39, Mu, Zihao wrote:
> From: Thadeu Lima de Souza Cascardo <[email protected]>
>
> Stop walking on an update error, then commit existing work and complete
> the TLB and temporary page-table-list cleanup. The void commit callback
> does not overwrite the original update result.
>
> The preceding internal completion tracking orders finalization after
> the latest submitted IB, including immediate and rollover submissions.
>
> [zmu: Rebase on commit-void and the internal completion prerequisite.]
> Link:
> https://lore.kernel.org/amd-gfx/[email protected]/
> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
> Signed-off-by: Zihao Mu <[email protected]>
Yeah once more clear NAK to that!
First of all we can't flush the TLB nor free the page tables because we don't
know if they are still used or not.
What we need to do first is to make sure we commit the SDMA work before
allocating new page tables.
It would even be better to move the allocation of page tables outside of the
loop which updates the PTEs. But we need a better data structure for the page
addresses to do something like that.
Regards,
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 3b4df22c5ed..3f3c5a82fc1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1276,7 +1276,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev,
> struct amdgpu_vm *vm,
> tmp = start + num_entries;
> r = amdgpu_vm_ptes_update(¶ms, start, tmp, addr, flags);
> if (r)
> - goto error_free;
> + break;
>
> amdgpu_res_next(&cursor, num_entries * AMDGPU_GPU_PAGE_SIZE);
> start = tmp;