drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1
Subsystems (3)
PATCH 1/1 drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1
The purpose of halt_if_hws_hang is to preserve GPU state for driver debugging when queue preemption fails. Issuing per-queue reset may kill wavefronts which caused the preemption failure.
Signed-off-by Jay Cornwall <[email protected]>
Cc Jonathan Kim <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -2
@@ -2327,9 +2327,9 @@ static int unmap_queues_cpsch(struct device_queue_manager *dqm,*/ mqd_mgr = dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ ];if (mqd_mgr->check_preemption_failed (mqd_mgr, dqm->packet_mgr.priv_queue->queue->mqd)) { +while (halt_if_hws_hang) +schedule ();if (reset_queues_on_hws_hang (dqm)) { -while (halt_if_hws_hang) -schedule (); dqm->is_hws_hang = true;kfd_hws_hang (dqm); retval = -ETIME ;
Signature · 1 line
2.34.1
[Public]
Quoted 8 lines
-----Original Message-----
From: Cornwall, Jay <[email protected]>
Sent: Thursday, January 16, 2025 3:41 PM
To: [email protected]
Cc: Cornwall, Jay <[email protected]>; Kim, Jonathan <[email protected]>
Subject: [PATCH] drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1
Quoted 6 lines
The purpose of
halt_if_hws_hangis to preserve GPU state for driver debugging when queue preemption fails. Issuing per-queue reset may kill wavefronts which caused the preemption failure.Signed-off-by Jay Cornwall <[email protected]>Cc Jonathan Kim <[email protected]>
Reviewed-by Jonathan Kim <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2
-2@@ -2327,9 +2327,9 @@ static int unmap_queues_cpsch(structdevice_queue_manager *dqm, */ mqd_mgr = dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ ];if (mqd_mgr->check_preemption_failed (mqd_mgr, dqm- >packet_mgr.priv_queue->queue->mqd)) { +while (halt_if_hws_hang) +schedule ();if (reset_queues_on_hws_hang (dqm)) { -while (halt_if_hws_hang) -schedule (); dqm->is_hws_hang = true;kfd_hws_hang(dqm); retval = -ETIME;--
2.34.1