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 11, 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 | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
index 0e7dc23f78e7..0630bd43238c 100644
@@ -1632,6 +1632,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
 			 * silent to stop fault floods.
 			 */
 			nptes = max(nptes, 1u);
+			nptes = nptes > 32 ? 32 : nptes;
 
 			trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
 						    nptes, dst, incr, upd_flags,
Signature · 1 line
2.25.1
#1 lore raw

Am 11.01.22 um 08:09 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 | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index 0e7dc23f78e7..0630bd43238c 100644

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

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -1632,6 +1632,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
  			 * silent to stop fault floods.
  			 */
  			nptes = max(nptes, 1u);
+			nptes = nptes > 32 ? 32 : nptes;

Please do something like min(nptes, 32) in the parameter list of trace_amdgpu_vm_update_ptes instead. I'm not sure if the nptes are not needed any more after this.

Then please also remove the previous workaround in amdgpu_trace.h.

Apart from that sounds like the right idea to me.

Christian.

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
  			trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
  						    nptes, dst, incr, upd_flags,