summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorWendy Liang <wendy.liang@amd.com>2026-07-18 01:34:09 -0700
committerLizhi Hou <lizhi.hou@amd.com>2026-07-19 18:23:40 -0700
commit488f4902e1deba4d507b4b8c25547a366f5dac63 (patch)
tree7ead3aea8c2d41cd8b7d812ca4169abb3212707f /tools/perf/scripts/python
parenta3fdf74ffa5966e5b4a17f1e9c5687f73bb0d536 (diff)
accel/amdxdna: Fix command timeout race
When two commands enter aie2_sched_job_timedout() concurrently, both check the timeout detection state. The first scheduler thread observes tdr_status as SIGNALED and updates it to WAIT. The second thread then observes the updated state instead of the original SIGNALED state, which may cause the command timeout to be handled incorrectly. Replace tdr_status with last_signal_ts, which records the timestamp of the last driver signal. Timeout detection now only reads last_signal_ts and never modifies it, allowing multiple serialized detect() calls under dev_lock to evaluate the same signal timestamp independently. If there is not any new job scheduled or completed within tdr_timeout_ms, the command will timeout. Fixes: 9022f010977f ("accel/amdxdna: Check for device hang on job timeout") Signed-off-by: Wendy Liang <wendy.liang@amd.com> Reviewed-by: Max Zhen <max.zhen@amd.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://patch.msgid.link/20260718083409.1825940-1-lizhi.hou@amd.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions