Skip to contentSkip to conversation

drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

PATCH Superseded chong li 5 participants 12 messages Nov 17, 2025 – Nov 19, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

chong li

author
#0 lore raw

PATCH 1/1 drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
 	int index = 0;
 	long timeout;
 	int ret = 0;
+	long timeout_default;
 
-	/* By default timeout for all queues is 2 sec */
+	if (amdgpu_sriov_vf(adev))
+		timeout_default = msecs_to_jiffies(10000);
+	else
+		timeout_default = msecs_to_jiffies(2000);
+	/* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
 	adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-		adev->video_timeout = msecs_to_jiffies(2000);
+		adev->video_timeout = timeout_default;
 
 	if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
 		return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-		 "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+		 "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
 		    sizeof(amdgpu_lockup_timeout), 0444);
 
Signature · 1 line
2.48.1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Some gramma comments.

After that, it is Reviewed-by: Horace Chen <[email protected]>

Thanks & Regards,
Horace.

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of chong li
Sent: Monday, November 17, 2025 2:53 PM
To: [email protected]
Cc: Koenig, Christian <[email protected]>; Li, Chong(Alan) <[email protected]>
Subject: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -1
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
        int index = 0;
        long timeout;
        int ret = 0;
+       long timeout_default;
 
-       /* By default timeout for all queues is 2 sec */
+       if (amdgpu_sriov_vf(adev))
+               timeout_default = msecs_to_jiffies(10000);
+       else
+               timeout_default = msecs_to_jiffies(2000);
+       /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
 

HC: Better to use "2sec in non-sriov"

Regards,
Horace Chen

        adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =

- adev->video_timeout = msecs_to_jiffies(2000);
+ adev->video_timeout = timeout_default;

if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
return 0;

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
 

HC: Better to use "2000 in non-sriov"

Regards,
Horace Chen

*/
MODULE_PARM_DESC(lockup_timeout,
- "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+ "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");

HC: Better to use "2000 in non-sriov"

Regards,
Horace Chen

module_param_string(lockup_timeout, amdgpu_lockup_timeout,

                    sizeof(amdgpu_lockup_timeout), 0444);

--
2.48.1

maintainer
#2 lore raw
In reply to chong li

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
 	int index = 0;
 	long timeout;
 	int ret = 0;
+	long timeout_default;
 
-	/* By default timeout for all queues is 2 sec */
+	if (amdgpu_sriov_vf(adev))
+		timeout_default = msecs_to_jiffies(10000);
+	else
+		timeout_default = msecs_to_jiffies(2000);
+	/* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
 	adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-		adev->video_timeout = msecs_to_jiffies(2000);
+		adev->video_timeout = timeout_default;
 
 	if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
 		return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-		 "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+		 "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
 		    sizeof(amdgpu_lockup_timeout), 0444);
 
#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
maintainer
#4 lore raw

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
#5 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value ,
they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s,
when customer load 8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
maintainer
#6 lore raw

Hi Chong,

yeah and exactly that argumentation is not correct.

We have to guarantee a min minimum response time and that is what the timeout is all about.

And it doesn't matter if the available HW time is split between 1,2,4 or 8 virtual functions. The minimum reponse time we need to guarantee is still the same, it's just that the available HW time is lowered.

So as long as we don't have an explicit customer request which asks for longer default timeouts this change is rejected.

Regards,
Christian.

Quoted 123 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value ,
they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s,
when customer load 8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
#7 lore raw
Quoted 10 lines · Christian König

Hi Chong,

yeah and exactly that argumentation is not correct.

We have to guarantee a min minimum response time and that is what the timeout is all about.

And it doesn't matter if the available HW time is split between 1,2,4 or 8 virtual functions. The minimum reponse time we need to guarantee is still the same, it's just that the available HW time is lowered.

So as long as we don't have an explicit customer request which asks for longer default timeouts this change is rejected.

I think the change makes sense. It needs to be longer to compensate for the world switch latency. 0.5 seconds of runtime is probably too short for many larger workloads.

Alex

Quoted 129 lines

Regards,
Christian.

Quoted 123 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value ,
they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s,
when customer load 8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
maintainer
#8 lore raw
Quoted 9 lines · Alex Deucher
Quoted 7 lines · Christian König

Hi Chong,

yeah and exactly that argumentation is not correct.

We have to guarantee a min minimum response time and that is what the timeout is all about.

Quoted 7 lines
Quoted 3 lines

And it doesn't matter if the available HW time is split between 1,2,4 or 8 virtual functions. The minimum reponse time we need to guarantee is still the same, it's just that the available HW time is lowered.

So as long as we don't have an explicit customer request which asks for longer default timeouts this change is rejected.

I think the change makes sense. It needs to be longer to compensate for the world switch latency. 0.5 seconds of runtime is probably too short for many larger workloads.

The calculation that you have a 0.5 second timeout because the HW is shared among 4 VF doesn't make sense.

It's just that each VF has 1/4 of the calculation power of the PF, but we also don't increase the timeout for slower physical HW either.

The timeout is there to guarantee a certain response time and that comes from both customer requirements as well as requirements of the Linux memory management.

And at least the memory management doesn't care if you have a virtual function or physical hardware, you have to complete all operations in a certain time or otherwise the system can run into a panic during low memory situations.

What could be is that we have customers who don't care about OOM situations and want this longer timeout, but that is then on their own risk.

We certainly shouldn't increase the timeout to something unreasonable just because some CI system is failing.

Regards,
Christian.

Quoted 132 lines

Alex

Quoted 129 lines

Regards,
Christian.

Quoted 123 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value ,
they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s,
when customer load 8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
#9 lore raw
Quoted 15 lines · Christian König
Quoted 13 lines · Alex Deucher
Quoted 10 lines · Christian König

Hi Chong,

yeah and exactly that argumentation is not correct.

We have to guarantee a min minimum response time and that is what the timeout is all about.

And it doesn't matter if the available HW time is split between 1,2,4 or 8 virtual functions. The minimum reponse time we need to guarantee is still the same, it's just that the available HW time is lowered.

So as long as we don't have an explicit customer request which asks for longer default timeouts this change is rejected.

Quoted 8 lines
Quoted 3 lines

I think the change makes sense. It needs to be longer to compensate for the world switch latency. 0.5 seconds of runtime is probably too short for many larger workloads.

The calculation that you have a 0.5 second timeout because the HW is shared among 4 VF doesn't make sense.

It's just that each VF has 1/4 of the calculation power of the PF, but we also don't increase the timeout for slower physical HW either.

But in this case, it doesn't actually reflect the GPU time spent on the job, it only reflects a percentage of it so it's not really an apples to apples comparison with non-SR-IOV. That said, from a wall clock perspective, it does reflect the time spent even if you only got a percentage of that time.

Alex

Quoted 144 lines

The timeout is there to guarantee a certain response time and that comes from both customer requirements as well as requirements of the Linux memory management.

And at least the memory management doesn't care if you have a virtual function or physical hardware, you have to complete all operations in a certain time or otherwise the system can run into a panic during low memory situations.

What could be is that we have customers who don't care about OOM situations and want this longer timeout, but that is then on their own risk.

We certainly shouldn't increase the timeout to something unreasonable just because some CI system is failing.

Regards,
Christian.

Quoted 132 lines

Alex

Quoted 129 lines

Regards,
Christian.

Quoted 123 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value ,
they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s,
when customer load 8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
maintainer
#10 lore raw
Quoted 23 lines · Alex Deucher
Quoted 21 lines · Christian König
Quoted 9 lines · Alex Deucher
Quoted 7 lines · Christian König

Hi Chong,

yeah and exactly that argumentation is not correct.

We have to guarantee a min minimum response time and that is what the timeout is all about.

Quoted 7 lines
Quoted 3 lines

And it doesn't matter if the available HW time is split between 1,2,4 or 8 virtual functions. The minimum reponse time we need to guarantee is still the same, it's just that the available HW time is lowered.

So as long as we don't have an explicit customer request which asks for longer default timeouts this change is rejected.

I think the change makes sense. It needs to be longer to compensate for the world switch latency. 0.5 seconds of runtime is probably too short for many larger workloads.

The calculation that you have a 0.5 second timeout because the HW is shared among 4 VF doesn't make sense.

Quoted 8 lines
Quoted 2 lines

It's just that each VF has 1/4 of the calculation power of the PF, but we also don't increase the timeout for slower physical HW either.

But in this case, it doesn't actually reflect the GPU time spent on the job, it only reflects a percentage of it so it's not really an apples to apples comparison with non-SR-IOV. That said, from a wall clock perspective, it does reflect the time spent even if you only got a percentage of that time.

Yeah, exactly that's the point. The GPU time spend on the job is irrelevant.

What matters is the wall clock because that is what external perception is based on as well.

See for the kernel it doesn't matter how fast the computation on the device is, you need to be able to reclaim the memory occupied by submission in a reasonable amount of time and for that even 2 seconds is absolutely borderline.

The 10 second timeout we had before should actually have tainted the kernel as unstable. Thinking about it more that is probably exactly what we should do when a customer even manually sets a timeout longer than 2 seconds.

Christian.

Quoted 147 lines

Alex

Quoted 144 lines

The timeout is there to guarantee a certain response time and that comes from both customer requirements as well as requirements of the Linux memory management.

And at least the memory management doesn't care if you have a virtual function or physical hardware, you have to complete all operations in a certain time or otherwise the system can run into a panic during low memory situations.

What could be is that we have customers who don't care about OOM situations and want this longer timeout, but that is then on their own risk.

We certainly shouldn't increase the timeout to something unreasonable just because some CI system is failing.

Regards,
Christian.

Quoted 132 lines

Alex

Quoted 129 lines

Regards,
Christian.

Quoted 123 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value ,
they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s,
when customer load 8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 73 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 45 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov, 2000 not in sriov. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);
 
#11 lore raw
In reply to Christian König

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

" It is explicitely requested by customers that we only have a 2 second timeout."

What scenarios are these customers using the GPU for? sriov or non-sriov?

After changing the default timeout value to 2 sec:

bare-metal or pass-through mode:
these customers have 2 sec timeout limits, this is ok.

sriov mode:
AMD gpu device can only work in 1vf mode(2 sec timeout), and 2vf mode(1 sec timeout). Many customers use 12vf mode(NV32 VDI) and 8vf mode(Alibaba Mi308), after they update driver with your patch, they will meet gpu reset repeatedly. We should fix this issue before customer complaints.

Solution:
If the customers you contact need use gpu in sriov mode, Please guide them to config the timeout value with the correct way.

get vf number when they load gim driver, and calculate "timeout_value", as 2 * vf_num. then "modprobe amdgpu lockup_timeout=timeout_value".

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 6:41 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

yeah and exactly that argumentation is not correct.

We have to guarantee a min minimum response time and that is what the timeout is all about.

And it doesn't matter if the available HW time is split between 1,2,4 or 8 virtual functions. The minimum reponse time we need to guarantee is still the same, it's just that the available HW time is lowered.

So as long as we don't have an explicit customer request which asks for longer default timeouts this change is rejected.

Regards,
Christian.

Quoted 133 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

what I mean is:
in sriov mode, when customer need limit timeout value , they should set the "lockup_timeout" according to the vf number they load.

Why:

The real timeout value in sriov for each vf is " lockup_timeout / vf_number",

As you said they want to limit the timeout to 2s, when customer load
8vf, they should set the "lockup_timeout" to 16s, 4vf need set "lockup_timeout" to 8s.

(After we test, when value "lockup_timeout" set to 2s, the 4vf mode can't work as each vf only get 0.5s)

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 5:31 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Cc: Chen, Horace <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Hi Chong,

that is not a valid justification.

What customer requirement is causing this SDMA timeout?

When it is just your CI system then change the CI system.

As long as you can't come up with a customer requirement this change is rejected.

Regards,
Christian.

Quoted 80 lines · Chong(Alan)

[AMD Official Use Only - AMD Internal Distribution Only]

Hi, Christian.

In multiple vf mode( in our CI environment the vf number is 4), the timeout value is shared across all vfs. After timeout value change to 2s, each vf only get 0.5s, cause sdma ring timeout and trigger gpu reset.

Thanks,
Chong.

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, November 18, 2025 4:34 PM
To: Li, Chong(Alan) <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: in sriov multiple vf mode, 2 seconds timeout is not enough for sdma job

Clear NAK to this patch.

It is explicitely requested by customers that we only have a 2 second timeout.

So you need a very good explanation to have that changed for SRIOV.

Regards,
Christian.

Quoted 51 lines · chong li
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -2
index 69c29f47212d..4ab755eb5ec1 100644
@@ -4341,10 +4341,15 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
      int index = 0;
      long timeout;
      int ret = 0;
+     long timeout_default;
 
-     /* By default timeout for all queues is 2 sec */
+     if (amdgpu_sriov_vf(adev))
+             timeout_default = msecs_to_jiffies(10000);
+     else
+             timeout_default = msecs_to_jiffies(2000);
+     /* By default timeout for all queues is 10 sec in sriov, 2 sec
+ not in sriov*/
      adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
-             adev->video_timeout = msecs_to_jiffies(2000);
+             adev->video_timeout = timeout_default;
 
      if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
              return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5 -2
index f508c1a9fa2c..43bdd6c1bec2 100644
@@ -358,10 +358,10 @@ module_param_named(svm_default_granularity, amdgpu_svm_default_granularity, uint
  * [GFX,Compute,SDMA,Video] to set individual timeouts.
  * Negative values mean infinity.
  *
- * By default(with no lockup_timeout settings), the timeout for all queues is 2000.
+ * By default(with no lockup_timeout settings), the timeout for all queues is 10000 in sriov, 2000 not in sriov.
  */
 MODULE_PARM_DESC(lockup_timeout,
-              "GPU lockup timeout in ms (default: 2000. 0: keep default value. negative: infinity timeout), format: [single value for all] or [GFX,Compute,SDMA,Video].");
+              "GPU lockup timeout in ms (default: 10000 in sriov,
+ 2000 not in sriov. 0: keep default value. negative: infinity
+ timeout), format: [single value for all] or
+ [GFX,Compute,SDMA,Video].");
 module_param_string(lockup_timeout, amdgpu_lockup_timeout,
                  sizeof(amdgpu_lockup_timeout), 0444);