Skip to contentSkip to conversation

drm/amdgpu: limit the number of dst address in trace

PATCH In review Somalapuram Amaranath 2 participants 2 messages Jan 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: limit the number of dst address in trace

trace_amdgpu_vm_update_ptes trace unable to log when nptes too large

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
index 0e7dc23f78e7..f367fcc5c535 100644
@@ -1634,7 +1634,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
 			nptes = max(nptes, 1u);
 
 			trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
-						    nptes, dst, incr, upd_flags,
+						    min(nptes, 32u), dst, incr, upd_flags,
 						    vm->task_info.pid,
 						    vm->immediate.fence_context);
 			amdgpu_vm_update_flags(params, to_amdgpu_bo_vm(pt),
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Am 17.01.22 um 07:32 schrieb Somalapuram Amaranath:

Quoted 12 lines

trace_amdgpu_vm_update_ptes trace unable to log when nptes too large

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index 0e7dc23f78e7..f367fcc5c535 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params, · line 1637

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -1634,7 +1634,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
  			nptes = max(nptes, 1u);
 
  			trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
-						    nptes, dst, incr, upd_flags,
+						    min(nptes, 32u), dst, incr, upd_flags,

You still need to remove the same workaround in amdgpu_trace.h.

E.g. something like this:

drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +0 -0
index d855cb53c7e0..a48b34d4ce31 100644
@@ -358,11 +358,10 @@ TRACE_EVENT(amdgpu_vm_update_ptes,

                        }
        ),
        TP_printk("pid:%u vm_ctx:0x%llx start:0x%010llx end:0x%010llx," -                 " flags:0x%llx, incr:%llu, dst:\n%s%s", __entry->pid, +                 " flags:0x%llx, incr:%llu, dst:\n%s", __entry->pid, __entry->vm_ctx, __entry->start, __entry->end, __entry->flags, __entry->incr, __print_array( -                 __get_dynamic_array(dst), min(__entry->nptes, 32u), 8), -                 __entry->nptes > 32 ? "..." : "")
+                 __get_dynamic_array(dst), __entry->nptes, 8)) );

 TRACE_EVENT(amdgpu_vm_set_ptes,

Regards,
Christian.

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
  						    vm->task_info.pid,
  						    vm->immediate.fence_context);
  			amdgpu_vm_update_flags(params, to_amdgpu_bo_vm(pt),