diff options
author | Tero Kristo <[email protected]> | 2023-03-10 12:04:51 +0200 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2023-03-19 12:20:49 -0400 |
commit | 08697bca9bbba15f2058fdbd9f970bd5f6a8a2e8 (patch) | |
tree | 8d2aabb1a2a00a174ad381b6953a6d70c400d06c /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
parent | 4c42f5f0d1dd20bddd9f940beb1e6ccad60c4498 (diff) |
trace/hwlat: Do not start per-cpu thread if it is already running
The hwlatd tracer will end up starting multiple per-cpu threads with
the following script:
#!/bin/sh
cd /sys/kernel/debug/tracing
echo 0 > tracing_on
echo hwlat > current_tracer
echo per-cpu > hwlat_detector/mode
echo 100000 > hwlat_detector/width
echo 200000 > hwlat_detector/window
echo 1 > tracing_on
To fix the issue, check if the hwlatd thread for the cpu is already
running, before starting a new one. Along with the previous patch, this
avoids running multiple instances of the same CPU thread on the system.
Link: https://lore.kernel.org/all/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Cc: [email protected]
Fixes: f46b16520a087 ("trace/hwlat: Implement the per-cpu mode")
Signed-off-by: Tero Kristo <[email protected]>
Acked-by: Daniel Bristot de Oliveira <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
0 files changed, 0 insertions, 0 deletions