Skip to contentSkip to conversation

drm/amdgpu: extend MAX_KIQ_REG_TRY to 1000

PATCH In review Jiawei Gu 3 participants 5 messages Feb 8, 2021

Subsystems (2)
lore
Share & tools
lore

Jiawei Gu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: extend MAX_KIQ_REG_TRY to 1000

Extend retry times of KIQ to avoid starvation situation caused by long time full access of GPU by other VFs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
index 639db32c1383..e0c797a5f739 100644
@@ -288,7 +288,7 @@ enum amdgpu_kiq_irq {
 
 #define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
 #define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
-#define MAX_KIQ_REG_TRY 80 /* 20 -> 80 */
+#define MAX_KIQ_REG_TRY 1000
 
 int amdgpu_device_ip_set_clockgating_state(void *dev,
 					   enum amd_ip_block_type block_type,
Signature · 6 lines
2.17.1

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

Am 08.02.21 um 06:45 schrieb Jiawei Gu:

Quoted 2 lines

Extend retry times of KIQ to avoid starvation situation caused by long time full access of GPU by other VFs.

In what units is that? We also need the KIQ during interrupt handling and that looks like *way* to big for that.

Christian.

Quoted 11 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -0
index 639db32c1383..e0c797a5f739 100644

drivers/gpu/drm/amd/amdgpu/amdgpu.h enum amdgpu_kiq_irq { · line 294

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
@@ -288,7 +288,7 @@ enum amdgpu_kiq_irq {
 
  #define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
  #define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
-#define MAX_KIQ_REG_TRY 80 /* 20 -> 80 */
+#define MAX_KIQ_REG_TRY 1000
 
  int amdgpu_device_ip_set_clockgating_state(void *dev,
  					   enum amd_ip_block_type block_type,

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

#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

Hi Christian,

That's how many times it would retry before give up.
And we always skip this retry routine if we are in interrupt, so it's fine for interrupt condition.

Best regards,
Jiawei

-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, February 8, 2021 5:28 PM
To: Gu, JiaWei (Will) <[email protected]>; [email protected]
Cc: Deng, Emily <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: extend MAX_KIQ_REG_TRY to 1000

Am 08.02.21 um 06:45 schrieb Jiawei Gu:

Quoted 2 lines

Extend retry times of KIQ to avoid starvation situation caused by long time full access of GPU by other VFs.

In what units is that? We also need the KIQ during interrupt handling and that looks like *way* to big for that.

Christian.

Quoted 12 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -0
index 639db32c1383..e0c797a5f739 100644

drivers/gpu/drm/amd/amdgpu/amdgpu.h enum amdgpu_kiq_irq { · line 294

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
@@ -288,7 +288,7 @@ enum amdgpu_kiq_irq {
 
  #define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
  #define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
-#define MAX_KIQ_REG_TRY 80 /* 20 -> 80 */
+#define MAX_KIQ_REG_TRY 1000
 
  int amdgpu_device_ip_set_clockgating_state(void *dev,
  					   enum amd_ip_block_type block_type,

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

#3 lore raw

Hi Jiawei,

ok in this case it's fine with me.

Just please also get a reviewed-by from somebody which has more KIQ background than I have.

Thanks,
Christian.

Am 08.02.21 um 11:00 schrieb Gu, JiaWei (Will):

Quoted 41 lines

[AMD Official Use Only - Internal Distribution Only]

Hi Christian,

That's how many times it would retry before give up.
And we always skip this retry routine if we are in interrupt, so it's fine for interrupt condition.

Best regards,
Jiawei

-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, February 8, 2021 5:28 PM
To: Gu, JiaWei (Will) <[email protected]>; [email protected]
Cc: Deng, Emily <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: extend MAX_KIQ_REG_TRY to 1000

Am 08.02.21 um 06:45 schrieb Jiawei Gu:

Quoted 2 lines

Extend retry times of KIQ to avoid starvation situation caused by long time full access of GPU by other VFs.

In what units is that? We also need the KIQ during interrupt handling and that looks like *way* to big for that.

Christian.

Quoted 17 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
index 639db32c1383..e0c797a5f739 100644
@@ -288,7 +288,7 @@ enum amdgpu_kiq_irq {
 
   #define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
   #define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
-#define MAX_KIQ_REG_TRY 80 /* 20 -> 80 */
+#define MAX_KIQ_REG_TRY 1000
 
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu.h enum amdgpu_kiq_irq { · line 294

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -0
   int amdgpu_device_ip_set_clockgating_state(void *dev,
   					   enum amd_ip_block_type block_type,

_______________________________________________
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

Reviewed-by
#4 lore raw

[AMD Official Use Only - Internal Distribution Only]

Quoted 76 lines

-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, February 8, 2021 6:05 PM
To: Gu, JiaWei (Will) <[email protected]>; Koenig, Christian <[email protected]>; [email protected]
Cc: Deng, Emily <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: extend MAX_KIQ_REG_TRY to 1000

Hi Jiawei,

ok in this case it's fine with me.

Just please also get a reviewed-by from somebody which has more KIQ background than I have.

Thanks,
Christian.

Am 08.02.21 um 11:00 schrieb Gu, JiaWei (Will):

Quoted 6 lines

[AMD Official Use Only - Internal Distribution Only]

Hi Christian,

That's how many times it would retry before give up.
And we always skip this retry routine if we are in interrupt, so it's fine for

interrupt condition.

Quoted 12 lines

Best regards,
Jiawei

-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, February 8, 2021 5:28 PM
To: Gu, JiaWei (Will) <[email protected]>; [email protected]
Cc: Deng, Emily <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: extend MAX_KIQ_REG_TRY to 1000

Quoted 4 lines

Am 08.02.21 um 06:45 schrieb Jiawei Gu:

Quoted 2 lines

Extend retry times of KIQ to avoid starvation situation caused by long time full access of GPU by other VFs.

In what units is that? We also need the KIQ during interrupt handling and

that looks like *way* to big for that.

Quoted 15 lines

Christian.

Quoted 12 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -0
index 639db32c1383..e0c797a5f739 100644
@@ -288,7 +288,7 @@ enum amdgpu_kiq_irq {
 
Quoted 7 lines

drivers/gpu/drm/amd/amdgpu/amdgpu.h enum amdgpu_kiq_irq {

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
   #define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
   #define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
-#define MAX_KIQ_REG_TRY 80 /* 20 -> 80 */
+#define MAX_KIQ_REG_TRY 1000
 
   int amdgpu_device_ip_set_clockgating_state(void *dev,
      enum amd_ip_block_type

block_type,

Quoted 5 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-

gfx&amp;data=04%7C01%7CEm

Quoted 1 line

ily.Deng%40amd.com%7Cd3ba1ae698ec408da87f08d8cc18f7b1%7C3dd8961fe 4884e

Quoted 1 line
Quoted 9 lines

608e11a82d994e183d%7C0%7C0%7C637483754906300007%7CUnknown%7CT WFpbGZsb3

Quoted 1 line

d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% 3D%7

Quoted 1 line

C1000&amp;sdata=%2FLrBdotkzcAepWTBazik9S9ah5ul48DvtCNKN3wYyQU%3 D&amp;r

Quoted 1 line

eserved=0

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