Skip to contentSkip to conversation

drm/amdgpu: support gpu recovery tests on compute rings

PATCH In review Evan Quan 4 participants 8 messages Apr 26, 2019 – Apr 29, 2019 6 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: support gpu recovery tests on compute rings

A new module parameter is added for determining whether or not to enforce timeout on compute jobs.

Change-Id If14b75977312e42dac0431072456e5b69cf1bc2f
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h       | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   | 8 ++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index e16dcee2bf75..ee624d993df7 100644
@@ -166,6 +166,7 @@ extern int amdgpu_si_support;
 #ifdef CONFIG_DRM_AMDGPU_CIK
 extern int amdgpu_cik_support;
 #endif
+extern bool amdgpu_compute_timeout_enforced;
 
 #define AMDGPU_VM_MAX_NUM_CTX			4096
 #define AMDGPU_SG_THRESHOLD			(256*1024*1024)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8 -0
index 13a68f62bcc8..91de3e90fae9 100644
@@ -140,6 +140,7 @@ struct amdgpu_mgpu_info mgpu_info = {
 };
 int amdgpu_ras_enable = -1;
 uint amdgpu_ras_mask = 0xffffffff;
+bool amdgpu_compute_timeout_enforced = false;
 
 /**
  * DOC: vramlimit (int)
@@ -234,6 +235,13 @@ module_param_named(msi, amdgpu_msi, int, 0444);
 MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 (default 10000)");
 module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);
 
+/**
+ * DOC: compute_timeout_enforced (bool)
+ * Whether or not to enforce timeout on compute jobs (1 = enable, 0 = disable). The default is 0.
+ */
+MODULE_PARM_DESC(compute_timeout_enforced, "Enforce timeout on compute jobs (1 = enable, 0 = disable (default))");
+module_param_named(compute_timeout_enforced, amdgpu_compute_timeout_enforced, bool, 0444);
+
 /**
  * DOC: dpm (int)
  * Override for dynamic power management setting (1 = enable, 0 = disable). The default is -1 (auto).
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -1
index 4dee2326b29c..4adffad04dbc 100644
@@ -453,7 +453,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
 	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
 		/* for non-sriov case, no timeout enforce on compute ring */
 		if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)
-				&& !amdgpu_sriov_vf(ring->adev))
+				&& !amdgpu_sriov_vf(ring->adev)
+				&& !amdgpu_compute_timeout_enforced)
 			timeout = MAX_SCHEDULE_TIMEOUT;
 		else
 			timeout = msecs_to_jiffies(amdgpu_lockup_timeout);
Signature · 6 lines
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Am 26.04.19 um 09:24 schrieb Evan Quan:

Quoted 2 lines

A new module parameter is added for determining whether or not to enforce timeout on compute jobs.

Can we rework that a bit and instead of a bool have a separate millisecond timeout for compute?

E.g. default is 0 and that means MAX_SCHEDULE_TIMEOUT unless we are under SRIOV. Any other value is just the timeout in milliseconds.

Christian.

Quoted 52 lines
Change-Id If14b75977312e42dac0431072456e5b69cf1bc2f
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h       | 1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   | 8 ++++++++
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
  3 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index e16dcee2bf75..ee624d993df7 100644
@@ -166,6 +166,7 @@ extern int amdgpu_si_support;
  #ifdef CONFIG_DRM_AMDGPU_CIK
  extern int amdgpu_cik_support;
  #endif
+extern bool amdgpu_compute_timeout_enforced;
 
  #define AMDGPU_VM_MAX_NUM_CTX			4096
  #define AMDGPU_SG_THRESHOLD			(256*1024*1024)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8 -0
index 13a68f62bcc8..91de3e90fae9 100644
@@ -140,6 +140,7 @@ struct amdgpu_mgpu_info mgpu_info = {
  };
  int amdgpu_ras_enable = -1;
  uint amdgpu_ras_mask = 0xffffffff;
+bool amdgpu_compute_timeout_enforced = false;
 
  /**
   * DOC: vramlimit (int)
@@ -234,6 +235,13 @@ module_param_named(msi, amdgpu_msi, int, 0444);
  MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 (default 10000)");
  module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);
 
+/**
+ * DOC: compute_timeout_enforced (bool)
+ * Whether or not to enforce timeout on compute jobs (1 = enable, 0 = disable). The default is 0.
+ */
+MODULE_PARM_DESC(compute_timeout_enforced, "Enforce timeout on compute jobs (1 = enable, 0 = disable (default))");
+module_param_named(compute_timeout_enforced, amdgpu_compute_timeout_enforced, bool, 0444);
+
  /**
   * DOC: dpm (int)
   * Override for dynamic power management setting (1 = enable, 0 = disable). The default is -1 (auto).
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
index 4dee2326b29c..4adffad04dbc 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, · line 460

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -1
@@ -453,7 +453,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
  	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
  		/* for non-sriov case, no timeout enforce on compute ring */
  		if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)
-				&& !amdgpu_sriov_vf(ring->adev))
+				&& !amdgpu_sriov_vf(ring->adev)
+				&& !amdgpu_compute_timeout_enforced)
  			timeout = MAX_SCHEDULE_TIMEOUT;
  		else
  			timeout = msecs_to_jiffies(amdgpu_lockup_timeout);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): f9efc27c-6e0c-6a6b-e760-cba349adc63a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#4 lore raw

My concern is there is already one module parameter "lockup_timeout".
parm: lockup_timeout:GPU lockup timeout in ms > 0 (default 10000) (int)

Adding one more "timeout" seems redundant.
And that will makes the description of "lockup_timeout"(seems working for all jobs) does not match its real effect(affect only non-compute jobs).

A better way is to rename "lockup_timeout" to "non-compute lockup_timeout". But I do not think we can change existing module parameter. Right?

Regards,
Evan

Quoted 97 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Friday, April 26, 2019 3:34 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Xu, Feifei <[email protected]>; Cui, Flora <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

Am 26.04.19 um 09:24 schrieb Evan Quan:

Quoted 2 lines

A new module parameter is added for determining whether or not to enforce timeout on compute jobs.

Can we rework that a bit and instead of a bool have a separate millisecond timeout for compute?

E.g. default is 0 and that means MAX_SCHEDULE_TIMEOUT unless we are under SRIOV.
Any other value is just the timeout in milliseconds.

Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int,

Quoted 36 lines
Change-Id If14b75977312e42dac0431072456e5b69cf1bc2f
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h       | 1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   | 8 ++++++++
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
  3 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index e16dcee2bf75..ee624d993df7 100644
@@ -166,6 +166,7 @@ extern int amdgpu_si_support;
  #ifdef CONFIG_DRM_AMDGPU_CIK
  extern int amdgpu_cik_support;
  #endif
+extern bool amdgpu_compute_timeout_enforced;
 
  #define AMDGPU_VM_MAX_NUM_CTX			4096
  #define AMDGPU_SG_THRESHOLD			(256*1024*1024)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 13a68f62bcc8..91de3e90fae9 100644
@@ -140,6 +140,7 @@ struct amdgpu_mgpu_info mgpu_info = {
  };
  int amdgpu_ras_enable = -1;
  uint amdgpu_ras_mask = 0xffffffff;
+bool amdgpu_compute_timeout_enforced = false;
 
  /**
   * DOC: vramlimit (int)
@@ -234,6 +235,13 @@ module_param_named(msi, amdgpu_msi, int,

0444);

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int, · line 235

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
  MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0

(default 10000)");

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int, 0444);

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -0
  module_param_named(lockup_timeout, amdgpu_lockup_timeout, int,
 0444);
 
+/**
+ * DOC: compute_timeout_enforced (bool)
+ * Whether or not to enforce timeout on compute jobs (1 = enable, 0 =

disable). The default is 0.

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int, · line 243

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -0
+ */
+MODULE_PARM_DESC(compute_timeout_enforced, "Enforce timeout

on

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int,

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -0
+compute jobs (1 = enable, 0 = disable (default))");
+module_param_named(compute_timeout_enforced,
+amdgpu_compute_timeout_enforced, bool, 0444);
+
  /**
   * DOC: dpm (int)
   * Override for dynamic power management setting (1 = enable, 0 =

disable). The default is -1 (auto).

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
index 4dee2326b29c..4adffad04dbc 100644
@@ -453,7 +453,8 @@ int amdgpu_fence_driver_init_ring(struct

amdgpu_ring *ring,

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -1
  	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
  		/* for non-sriov case, no timeout enforce on compute ring */
  		if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)
-				&& !amdgpu_sriov_vf(ring->adev))
+				&& !amdgpu_sriov_vf(ring->adev)
+				&& !amdgpu_compute_timeout_enforced)
  			timeout = MAX_SCHEDULE_TIMEOUT;
  		else
  			timeout =

msecs_to_jiffies(amdgpu_lockup_timeout);

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): MN2PR12MB334425F855709F0662BB8952E43E0-rweVpJHSKToDMgCC8P//[email protected]

#6 lore raw

Am 26.04.19 um 10:20 schrieb Quan, Evan:

Quoted 7 lines

My concern is there is already one module parameter "lockup_timeout".
parm: lockup_timeout:GPU lockup timeout in ms > 0 (default 10000) (int)

Adding one more "timeout" seems redundant.
And that will makes the description of "lockup_timeout"(seems working for all jobs) does not match its real effect(affect only non-compute jobs).

A better way is to rename "lockup_timeout" to "non-compute lockup_timeout". But I do not think we can change existing module parameter. Right?

No, that's fine. Module parameters are not part of the API which needs to stay backward compatible.

Maybe use compute_lockup_timeout and other_lockup_timeout or something similar?

Regards,
Christian.

Quoted 98 lines

Regards,
Evan

Quoted 95 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Friday, April 26, 2019 3:34 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Xu, Feifei <[email protected]>; Cui, Flora <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

Am 26.04.19 um 09:24 schrieb Evan Quan:

Quoted 2 lines

A new module parameter is added for determining whether or not to enforce timeout on compute jobs.

Can we rework that a bit and instead of a bool have a separate millisecond timeout for compute?

E.g. default is 0 and that means MAX_SCHEDULE_TIMEOUT unless we are under SRIOV.
Any other value is just the timeout in milliseconds.

Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int,

Quoted 35 lines
Change-Id If14b75977312e42dac0431072456e5b69cf1bc2f
---
   drivers/gpu/drm/amd/amdgpu/amdgpu.h       | 1 +
   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   | 8 ++++++++
   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
   3 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index e16dcee2bf75..ee624d993df7 100644
@@ -166,6 +166,7 @@ extern int amdgpu_si_support;
   #ifdef CONFIG_DRM_AMDGPU_CIK
   extern int amdgpu_cik_support;
   #endif
+extern bool amdgpu_compute_timeout_enforced;
 
   #define AMDGPU_VM_MAX_NUM_CTX			4096
   #define AMDGPU_SG_THRESHOLD			(256*1024*1024)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 13a68f62bcc8..91de3e90fae9 100644
@@ -140,6 +140,7 @@ struct amdgpu_mgpu_info mgpu_info = {
   };
   int amdgpu_ras_enable = -1;
   uint amdgpu_ras_mask = 0xffffffff;
+bool amdgpu_compute_timeout_enforced = false;
 
   /**
    * DOC: vramlimit (int)
@@ -234,6 +235,13 @@ module_param_named(msi, amdgpu_msi, int,

0444);

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int, · line 235

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
   MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0

(default 10000)");

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int, 0444);

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -0
   module_param_named(lockup_timeout, amdgpu_lockup_timeout, int,
 0444);
 
+/**
+ * DOC: compute_timeout_enforced (bool)
+ * Whether or not to enforce timeout on compute jobs (1 = enable, 0 =

disable). The default is 0.

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int, · line 243

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -0
+ */
+MODULE_PARM_DESC(compute_timeout_enforced, "Enforce timeout

on

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(msi, amdgpu_msi, int,

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -0
+compute jobs (1 = enable, 0 = disable (default))");
+module_param_named(compute_timeout_enforced,
+amdgpu_compute_timeout_enforced, bool, 0444);
+
   /**
    * DOC: dpm (int)
    * Override for dynamic power management setting (1 = enable, 0 =

disable). The default is -1 (auto).

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
index 4dee2326b29c..4adffad04dbc 100644
@@ -453,7 +453,8 @@ int amdgpu_fence_driver_init_ring(struct

amdgpu_ring *ring,

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -1
   	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
   		/* for non-sriov case, no timeout enforce on compute ring */
   		if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)
-				&& !amdgpu_sriov_vf(ring->adev))
+				&& !amdgpu_sriov_vf(ring->adev)
+				&& !amdgpu_compute_timeout_enforced)
   			timeout = MAX_SCHEDULE_TIMEOUT;
   		else
   			timeout =

msecs_to_jiffies(amdgpu_lockup_timeout);

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#7 lore raw
In reply to a message not in the archive
Quoted 7 lines · Evan

My concern is there is already one module parameter "lockup_timeout".
parm: lockup_timeout:GPU lockup timeout in ms > 0 (default 10000) (int)

Adding one more "timeout" seems redundant.
And that will makes the description of "lockup_timeout"(seems working for all jobs) does not match its real effect(affect only non-compute jobs).

A better way is to rename "lockup_timeout" to "non-compute lockup_timeout". But I do not think we can change existing module parameter. Right?

Right. Also, there are already too many amdgpu module parameters, we should try to remove some rather than adding new ones for every little thing that could be tweaked. :)

One possibility might be to optionally allow passing multiple values to lockup_timeout, e.g.

amdgpu.lockup_timeout=10000,0

The first value would need to have the same meaning as now for backwards compatibility.

Signature · 6 lines
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): cd13fa95-1a65-1c0f-01d4-0f8819da5a60-otUistvHUpPR7s880joybQ@public.gmane.org

#9 lore raw

How about an interface to change the timeout on a per engine (gfx, compute, dma, etc.) basis? amdgpu.lockup_timeout=<global>,<gfx>,<compute>,<sdma>,<decode>,<encode>
if only one parameter is given, we change it globably. If more are given, we override the global one. Could also do a sysfs interface to change it on the fly.

Alex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Michel Dänzer <[email protected]>
Sent: Friday, April 26, 2019 4:35 AM
To: Quan, Evan; Koenig, Christian
Cc: Xu, Feifei; Cui, Flora; [email protected]
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

Quoted 7 lines · Evan

My concern is there is already one module parameter "lockup_timeout".
parm: lockup_timeout:GPU lockup timeout in ms > 0 (default 10000) (int)

Adding one more "timeout" seems redundant.
And that will makes the description of "lockup_timeout"(seems working for all jobs) does not match its real effect(affect only non-compute jobs).

A better way is to rename "lockup_timeout" to "non-compute lockup_timeout". But I do not think we can change existing module parameter. Right?

Right. Also, there are already too many amdgpu module parameters, we should try to remove some rather than adding new ones for every little thing that could be tweaked. :)

One possibility might be to optionally allow passing multiple values to lockup_timeout, e.g.

amdgpu.lockup_timeout=10000,0

The first value would need to have the same meaning as now for backwards compatibility.

--
Earthling Michel Dänzer | https://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CY4PR12MB18131939EE3B152A461DDE23F73E0-rpdhrqHFk05Nhq0cRkx5WwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author
#11 lore raw

How about amdgpu.lockup_timeout=non-compute-jobs[, gfx, sdma, decode, encode][: compute-jobs] ? This will not break backward compatibility.

And I’m not sure how to map “decode” and “encode” to the uvd/vce/vcn rings.
Since there are many rings related with these IPs(uvd, uvd_enc, vce, vcn_dec, vcn_enc, vcn_jpeg). Maybe we should use IP name(uvd, vce or vcn) instead of “decode/encode”?

Regards,
Evan
From: amd-gfx <[email protected]> On Behalf Of Deucher, Alexander
Sent: 2019年4月26日 22:24
To: Michel Dänzer <[email protected]>; Quan, Evan <[email protected]>; Koenig, Christian <[email protected]>
Cc: Xu, Feifei <[email protected]>; Cui, Flora <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

How about an interface to change the timeout on a per engine (gfx, compute, dma, etc.) basis? amdgpu.lockup_timeout=<global>,<gfx>,<compute>,<sdma>,<decode>,<encode>]
if only one parameter is given, we change it globably. If more are given, we override the global one. Could also do a sysfs interface to change it on the fly.

Alex
________________________________
From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, April 26, 2019 4:35 AM
To: Quan, Evan; Koenig, Christian
Cc: Xu, Feifei; Cui, Flora; [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

Quoted 7 lines · Evan

My concern is there is already one module parameter "lockup_timeout".
parm: lockup_timeout:GPU lockup timeout in ms > 0 (default 10000) (int)

Adding one more "timeout" seems redundant.
And that will makes the description of "lockup_timeout"(seems working for all jobs) does not match its real effect(affect only non-compute jobs).

A better way is to rename "lockup_timeout" to "non-compute lockup_timeout". But I do not think we can change existing module parameter. Right?

Right. Also, there are already too many amdgpu module parameters, we should try to remove some rather than adding new ones for every little thing that could be tweaked. :)

One possibility might be to optionally allow passing multiple values to lockup_timeout, e.g.

amdgpu.lockup_timeout=10000,0

The first value would need to have the same meaning as now for backwards compatibility.

--
Earthling Michel Dänzer | https://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): MN2PR12MB33449498B5CD10D9CC0EAE56E4380-rweVpJHSKToDMgCC8P//[email protected]

#13 lore raw

maybe just:
amdgpu.lockup_timeout=<global>,<gfx>,<compute>,<sdma>,<video>
I don't think we really need separate timeouts for all the different video related engines.

Alex
________________________________
From: Quan, Evan
Sent: Sunday, April 28, 2019 1:37 AM
To: Deucher, Alexander; Michel Dänzer; Koenig, Christian
Cc: Xu, Feifei; Cui, Flora; [email protected]
Subject: RE: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

How about amdgpu.lockup_timeout=non-compute-jobs[, gfx, sdma, decode, encode][: compute-jobs] ?

This will not break backward compatibility.

And I’m not sure how to map “decode” and “encode” to the uvd/vce/vcn rings.

Since there are many rings related with these IPs(uvd, uvd_enc, vce, vcn_dec, vcn_enc, vcn_jpeg).

Maybe we should use IP name(uvd, vce or vcn) instead of “decode/encode”?

Regards,

Evan

From: amd-gfx <[email protected]> On Behalf Of Deucher, Alexander
Sent: 2019年4月26日 22:24
To: Michel Dänzer <[email protected]>; Quan, Evan <[email protected]>; Koenig, Christian <[email protected]>
Cc: Xu, Feifei <[email protected]>; Cui, Flora <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

How about an interface to change the timeout on a per engine (gfx, compute, dma, etc.) basis?

amdgpu.lockup_timeout=<global>,<gfx>,<compute>,<sdma>,<decode>,<encode>]

if only one parameter is given, we change it globably. If more are given, we override the global one. Could also do a sysfs interface to change it on the fly.

Alex

________________________________

From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, April 26, 2019 4:35 AM
To: Quan, Evan; Koenig, Christian
Cc: Xu, Feifei; Cui, Flora; [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: support gpu recovery tests on compute rings

Quoted 7 lines · Evan

My concern is there is already one module parameter "lockup_timeout".
parm: lockup_timeout:GPU lockup timeout in ms > 0 (default 10000) (int)

Adding one more "timeout" seems redundant.
And that will makes the description of "lockup_timeout"(seems working for all jobs) does not match its real effect(affect only non-compute jobs).

A better way is to rename "lockup_timeout" to "non-compute lockup_timeout". But I do not think we can change existing module parameter. Right?

Right. Also, there are already too many amdgpu module parameters, we should try to remove some rather than adding new ones for every little thing that could be tweaked. :)

One possibility might be to optionally allow passing multiple values to lockup_timeout, e.g.

amdgpu.lockup_timeout=10000,0

The first value would need to have the same meaning as now for backwards compatibility.

--
Earthling Michel Dänzer | https://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx