Skip to content

Commit ec8fbb4

Browse files
committed
drm/amdgpu: make compute timeouts consistent
For kernel compute queues, align the timeout with other kernel queues (10 sec). This had previously been set higher for OpenCL when it used kernel queues, but now OpenCL uses KFD user queues which don't have a timeout limitation. This also aligns with SR-IOV which already used a shorter timeout. Additionally the longer timeout negatively impacts the user experience with kernel queues for interactive applications. Reviewed-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 991f2e0 commit ec8fbb4

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4220,18 +4220,10 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
42204220
int ret = 0;
42214221

42224222
/*
4223-
* By default timeout for non compute jobs is 10000
4224-
* and 60000 for compute jobs.
4225-
* In SR-IOV or passthrough mode, timeout for compute
4226-
* jobs are 60000 by default.
4223+
* By default timeout for jobs is 10 sec
42274224
*/
4228-
adev->gfx_timeout = msecs_to_jiffies(10000);
4225+
adev->compute_timeout = adev->gfx_timeout = msecs_to_jiffies(10000);
42294226
adev->sdma_timeout = adev->video_timeout = adev->gfx_timeout;
4230-
if (amdgpu_sriov_vf(adev))
4231-
adev->compute_timeout = amdgpu_sriov_is_pp_one_vf(adev) ?
4232-
msecs_to_jiffies(60000) : msecs_to_jiffies(10000);
4233-
else
4234-
adev->compute_timeout = msecs_to_jiffies(60000);
42354227

42364228
if (strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) {
42374229
while ((timeout_setting = strsep(&input, ",")) &&

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,12 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
362362
* The second one is for Compute. The third and fourth ones are
363363
* for SDMA and Video.
364364
*
365-
* By default(with no lockup_timeout settings), the timeout for all non-compute(GFX, SDMA and Video)
366-
* jobs is 10000. The timeout for compute is 60000.
365+
* By default(with no lockup_timeout settings), the timeout for all jobs is 10000.
367366
*/
368-
MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (default: for bare metal 10000 for non-compute jobs and 60000 for compute jobs; "
369-
"for passthrough or sriov, 10000 for all jobs. 0: keep default value. negative: infinity timeout), format: for bare metal [Non-Compute] or [GFX,Compute,SDMA,Video]; "
370-
"for passthrough or sriov [all jobs] or [GFX,Compute,SDMA,Video].");
367+
MODULE_PARM_DESC(lockup_timeout,
368+
"GPU lockup timeout in ms (default: 10000 for all jobs. "
369+
"0: keep default value. negative: infinity timeout), format: for bare metal [Non-Compute] or [GFX,Compute,SDMA,Video]; "
370+
"for passthrough or sriov [all jobs] or [GFX,Compute,SDMA,Video].");
371371
module_param_string(lockup_timeout, amdgpu_lockup_timeout, sizeof(amdgpu_lockup_timeout), 0444);
372372

373373
/**

0 commit comments

Comments
 (0)