<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - AMD Internal Distribution Only]<br>
</p>
<br>
<div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi Felix,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks. Patch v2 is submitted. It should make sure error returned even if remove_queue_mes is success.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Could you pleas help to review it again?</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" id="Signature">
<p>Thanks.</p>
<p> </p>
<p>Best regard,</p>
<p>Yifan Zha</p>
<p> </p>
</div>
<div id="appendonsend"></div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Kuehling, Felix <Felix.Kuehling@amd.com><br>
<b>Sent:</b> Thursday, March 6, 2025 8:23 AM<br>
<b>To:</b> Zha, YiFan(Even) <Yifan.Zha@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Cc:</b> Chang, HaiJun <HaiJun.Chang@amd.com>; Chen, Horace <Horace.Chen@amd.com>; Yin, ZhenGuo (Chris) <ZhenGuo.Yin@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amd/amdkfd: Evict all queues even HWS remove queue failed</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText"><br>
On 2025-03-05 00:42, Yifan Zha wrote:<br>
> [Why]<br>
> If reset is detected and kfd need to evict working queues, HWS moving queue will be failed.<br>
> Then remaining queues are not evicted and in active state.<br>
><br>
> After reset done, kfd uses HWS to termination remaining activated queues but HWS is resetted.<br>
> So remove queue will be failed again.<br>
><br>
> [How]<br>
> Keep removing all queues even if HWS returns failed.<br>
> It will not affect cpsch as it checks reset_domain->sem.<br>
><br>
> Signed-off-by: Yifan Zha <Yifan.Zha@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1 -<br>
> 1 file changed, 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c<br>
> index f3f2fd6ee65c..b213a845bd5b 100644<br>
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c<br>
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c<br>
> @@ -1223,7 +1223,6 @@ static int evict_process_queues_cpsch(struct device_queue_manager *dqm,<br>
> if (retval) {<br>
> dev_err(dev, "Failed to evict queue %d\n",<br>
> q->properties.queue_id);<br>
> - goto out;<br>
<br>
Is every subsequent call to remove_queue_mes guaranteed to also return <br>
an error? If not, you need a way to make sure an error is returned if <br>
any queue failed to be removed even if the last queue succeeded.<br>
<br>
Regards,<br>
Felix<br>
<br>
<br>
> }<br>
> }<br>
> }<br>
</div>
</span></font></div>
</div>
</body>
</html>