drm/amdkfd: print unmap queue status for RAS poison consumption (v2)
Subsystems (3)
PATCH 1/1 drm/amdkfd: print unmap queue status for RAS poison consumption (v2)
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +7 -4
@@ -105,8 +105,6 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :
@@ -130,10 +128,15 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { +pr_warn ("RAS poison consumption, unmap queue flow succeeds: client id %d\n" , + client_id);amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, false); -else + }else { +pr_warn ("RAS poison consumption, fallback to gpu reset flow: client id %d\n" , + client_id);amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, true); + } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,
Signature · 1 line
2.35.1
Dear Tao,
Thank you for the patch.
Am 21.03.22 um 10:38 schrieb Tao Zhou:
Quoted 24 lines
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-2@@ -105,8 +105,6 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev, · line 133
Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +3
-1@@ -130,10 +128,15 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { +pr_warn ("RAS poison consumption, unmap queue flow succeeds: client id %d\n" , + client_id);
succeeded? As it’s a success message, should it be an informational message?
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev, · line 136
Quoted 4 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, false); - else + }else { + pr_warn("RAS poison consumption, fallback to gpu reset flow: client id %d\n",
Fall back.
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev, · line 138
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id);amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, true);
Could the log be moved somehow to the handler?
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev, · line 142
Quoted 4 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,
Unrelated to the patch, at least I as user, would wish these warnings to be more elaborate, telling me, what the problem is, what effects it has, and what to do to fix it.
Kind regards,
Paul
[AMD Official Use Only]
Quoted 51 lines
-----Original Message-----
From: Paul Menzel <[email protected]>
Sent: Monday, March 21, 2022 6:47 PM
To: Zhou1, Tao <[email protected]>
Cc: [email protected]; Zhang, Hawking <[email protected]>; Kuehling, Felix <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: print unmap queue status for RAS poison consumption (v2)Dear Tao,
Thank you for the patch.
Am 21.03.22 um 10:38 schrieb Tao Zhou:
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void
Quoted 16 lines
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-0@@ -105,8 +105,6 @@ static voidevent_interrupt_poison_consumption(struct
kfd_dev*dev,drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-2if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :@@ -130,10 +128,15 @@ static voidevent_interrupt_poison_consumption(struct
kfd_dev*dev,drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev,
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { + pr_warn("RAS poison consumption, unmap queue flow succeeds:client id %d\n",
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 133
Quoted 1 line
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id);succeeded? As it’s a success message, should it be an informational message?
[Tao] thanks, will change to use succeeded before push. Although it reports success, poison consumption is not a usual event.
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 134
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-0amdgpu_amdkfd_ras_poison_consumption_handler(dev->adev,false);
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev,
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1-else + }else { + pr_warn("RAS poison consumption, fallback to gpu reset flow:client
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 137
Quoted 1 line
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+id %d\n",
Quoted 7 lines
Fall back.
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 139
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id); amdgpu_amdkfd_ras_poison_consumption_handler(dev->adev,true);
Could the log be moved somehow to the handler?
[Tao] Could not. Unmap queue isn’t called in the handler and client_id isn't transferred to the handler.
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev, · line 142
Quoted 5 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,Unrelated to the patch, at least I as user, would wish these warnings to be more elaborate, telling me, what the problem is, what effects it has, and what to do to fix it.
[Tao] It's difficult. You need a document instead of dmesg log to tell you all the details.
Quoted 5 lines
Kind regards,
Paul
[AMD Official Use Only]
Regards,
Hawking
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Monday, March 21, 2022 17:38
To: [email protected]; Zhang, Hawking <[email protected]>; Kuehling, Felix <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdkfd: print unmap queue status for RAS poison consumption (v2)
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +7 -4
@@ -105,8 +105,6 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :
@@ -130,10 +128,15 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { +pr_warn ("RAS poison consumption, unmap queue flow succeeds: client id %d\n" , + client_id);amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, false); -else + }else { +pr_warn ("RAS poison consumption, fallback to gpu reset flow: client id %d\n" , + client_id);amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, true); + } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,
--
2.35.1
Quoted 24 lines · Tao Zhou
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-2@@ -105,8 +105,6 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev, · line 133
Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +3
-1@@ -130,10 +128,15 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { +pr_warn ("RAS poison consumption, unmap queue flow succeeds: client id %d\n" , + client_id);
As discussed in another patch, I understand that pr_* is the legacy usage in the file. But it won't be helpful for this case with multiple devices. Would suggest to change to dev_info() - the message here and below seems informational about the handling of this situation rather than warning of something bad.
Thanks,
Lijo
Quoted 11 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +4
-1amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, false); - else + }else { +pr_warn ("RAS poison consumption, fallback to gpu reset flow: client id %d\n" , + client_id);amdgpu_amdkfd_ras_poison_consumption_handler (dev->adev, true); + } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,
[AMD Official Use Only]
Quoted 54 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, March 21, 2022 7:21 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Kuehling, Felix <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: print unmap queue status for RAS poison consumption (v2)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void
Quoted 16 lines · Tao Zhou
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-0@@ -105,8 +105,6 @@ static voidevent_interrupt_poison_consumption(struct
kfd_dev*dev,drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-2if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :@@ -130,10 +128,15 @@ static voidevent_interrupt_poison_consumption(struct
kfd_dev*dev,drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev,
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { + pr_warn("RAS poison consumption, unmap queue flow succeeds:client id %d\n",
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 133
Quoted 1 line
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id);As discussed in another patch, I understand that pr_* is the legacy usage in the file. But it won't be helpful for this case with multiple devices. Would suggest to change to
dev_info()- the message here and below seems informational about the handling of this situation rather than warning of something bad.
Quoted 2 lines
Thanks,
Lijo
[Tao] I'll replace pr_warn with dev_info. I think we need a dedicated cleanup to retire all pr format message in amdgpu. RAS poison consumption is a special event should be paid attention to, I think a waning is also reasonable.
Quoted 15 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 134
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-0amdgpu_amdkfd_ras_poison_consumption_handler(dev->adev,false);
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev,
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1-else + }else { + pr_warn("RAS poison consumption, fallback to gpu reset flow:client id %d\n",
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 138
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id); amdgpu_amdkfd_ras_poison_consumption_handler(dev->adev,true);
Quoted 5 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,
Am 2022-03-21 um 23:17 schrieb Zhou1, Tao:
Quoted 57 lines
[AMD Official Use Only]
Quoted 53 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, March 21, 2022 7:21 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Kuehling, Felix <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: print unmap queue status for RAS poison consumption (v2)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void
Quoted 16 lines · Tao Zhou
Print the status out when it passes, and also tell user gpu reset is triggered when we fallback to legacy way.
v2: make the message more explicitly.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-0@@ -105,8 +105,6 @@ static voidevent_interrupt_poison_consumption(struct
kfd_dev*dev,drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-2if (old_poison)return ; -pr_warn ("RAS poison consumption handling: client id %d\n" , client_id); -switch (client_id) {case SOC15_IH_CLIENTID_SE0SH :case SOC15_IH_CLIENTID_SE1SH :@@ -130,10 +128,15 @@ static voidevent_interrupt_poison_consumption(struct
kfd_dev*dev,drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev,
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1/* resetting queue passes, do page retirement without gpu reset * resetting queue fails, fallback to gpu reset solution */ -if (!ret) +if (!ret) { + pr_warn("RAS poison consumption, unmap queue flow succeeds:client id %d\n",
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 133
Quoted 1 line
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id);As discussed in another patch, I understand that pr_* is the legacy usage in the file. But it won't be helpful for this case with multiple devices. Would suggest to change to
dev_info()- the message here and below seems informational about the handling of this situation rather than warning of something bad.
Quoted 4 lines
Quoted 2 lines
Thanks,
Lijo[Tao] I'll replace
pr_warnwithdev_info. I think we need a dedicated cleanup to retire all pr format message in amdgpu. RAS poison consumption is a special event should be paid attention to, I think a waning is also reasonable.
Or you could make the "unmap success" case a dev_info and the "gpu reset" case a dev_warn.
Either way, v3 of your patch looks good to me and is
Regards,
Felix
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 134
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +0
-0amdgpu_amdkfd_ras_poison_consumption_handler(dev->adev,false);
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void event_interrupt_poison_consumption(struct kfd_dev *dev,
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +2
-1-else + }else { + pr_warn("RAS poison consumption, fallback to gpu reset flow:client id %d\n",
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c static void · line 138
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ client_id); amdgpu_amdkfd_ras_poison_consumption_handler(dev->adev,true);
Quoted 5 lines
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +1
-0+ } } static bool event_interrupt_isr_v9(struct kfd_dev *dev,