<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:宋体;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:宋体;
color:black;}
p.emailquote, li.emailquote, div.emailquote
{mso-style-name:emailquote;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:1.0pt;
border:none;
padding:0cm;
font-size:12.0pt;
font-family:宋体;
color:black;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
{mso-style-name:x_msonormal;
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:等线;
color:black;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:等线;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:等线;color:windowtext">Any updates for the rest patches ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:等线;color:windowtext"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> Koenig, Christian
<br>
<b>Sent:</b> 2017</span><span style="font-size:11.0pt;color:windowtext">年</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">10</span><span style="font-size:11.0pt;color:windowtext">月</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">4</span><span style="font-size:11.0pt;color:windowtext">日</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">
18:56<br>
<b>To:</b> Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH 12/12] drm/amdgpu/sriov:no shadow buffer recovery<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Ah! Sorry, my fault.<br>
<br>
I've missed the "no" and thought you wanted to abandon all processing because VRAM is always lost.<br>
<br>
Going to review the remaining patches today.<br>
<br>
Christian.<br>
<br>
Am 04.10.2017 um 11:41 schrieb Liu, Monk:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="xmsonormal"><span lang="EN-US">Why ? the page tables are resided in VRAM, no need to recovery if no VRAM lost<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-size:12.0pt;font-family:宋体"> </span><span lang="EN-US"><o:p></o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="xmsonormal"><b><span lang="EN-US">From: </span></b><span lang="EN-US"><a href="mailto:ckoenig.leichtzumerken@gmail.com">Christian König</a><br>
<b>Sent: </b>2017</span>年<span lang="EN-US">10</span>月<span lang="EN-US">1</span>日
<span lang="EN-US">17:36<br>
<b>To: </b><a href="mailto:Monk.Liu@amd.com">Liu, Monk</a>; <a href="mailto:amd-gfx@lists.freedesktop.org">
amd-gfx@lists.freedesktop.org</a><br>
<b>Subject: </b>Re: [PATCH 12/12] drm/amdgpu/sriov:no shadow buffer recovery<o:p></o:p></span></p>
</div>
<p class="xmsonormal"><span lang="EN-US" style="font-size:12.0pt;font-family:宋体"> </span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US" style="font-size:10.0pt">Am 30.09.2017 um 08:03 schrieb Monk Liu:<br>
> 1, we have deadlock unresloved between shadow bo recovery<br>
> and ctx_do_release,<br>
><br>
> 2, for loose mode gpu reset we always assume VRAM not lost<br>
> so there is no need to do that from begining<br>
><br>
> Change-Id: I5259f9d943239bd1fa2e45eb446ef053299fbfb1<br>
> Signed-off-by: Monk Liu <a href="mailto:Monk.Liu@amd.com"><Monk.Liu@amd.com></a><br>
<br>
NAK, even when VRAM ist lost we must restore the page tables or <br>
otherwise no process would be able to proceed.<br>
<br>
Regards,<br>
Christian.<br>
<br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 -----------------------------<br>
> 1 file changed, 29 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> index c3f10b5..8ae7a2c 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> @@ -2840,9 +2840,7 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job)<br>
> {<br>
> int i, j, r = 0;<br>
> int resched;<br>
> - struct amdgpu_bo *bo, *tmp;<br>
> struct amdgpu_ring *ring;<br>
> - struct dma_fence *fence = NULL, *next = NULL;<br>
> <br>
> /* other thread is already into the gpu reset so just quit and come later */<br>
> if (!atomic_add_unless(&adev->in_sriov_reset, 1, 1))<br>
> @@ -2909,33 +2907,6 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job)<br>
> /* release full control of GPU after ib test */<br>
> amdgpu_virt_release_full_gpu(adev, true);<br>
> <br>
> - DRM_INFO("recover vram bo from shadow\n");<br>
> -<br>
> - ring = adev->mman.buffer_funcs_ring;<br>
> - mutex_lock(&adev->shadow_list_lock);<br>
> - list_for_each_entry_safe(bo, tmp, &adev->shadow_list, shadow_list) {<br>
> - next = NULL;<br>
> - amdgpu_recover_vram_from_shadow(adev, ring, bo, &next);<br>
> - if (fence) {<br>
> - r = dma_fence_wait(fence, false);<br>
> - if (r) {<br>
> - WARN(r, "recovery from shadow isn't completed\n");<br>
> - break;<br>
> - }<br>
> - }<br>
> -<br>
> - dma_fence_put(fence);<br>
> - fence = next;<br>
> - }<br>
> - mutex_unlock(&adev->shadow_list_lock);<br>
> -<br>
> - if (fence) {<br>
> - r = dma_fence_wait(fence, false);<br>
> - if (r)<br>
> - WARN(r, "recovery from shadow isn't completed\n");<br>
> - }<br>
> - dma_fence_put(fence);<br>
> -<br>
> for (i = j; i < j + AMDGPU_MAX_RINGS; ++i) {<br>
> ring = adev->rings[i % AMDGPU_MAX_RINGS];<br>
> if (!ring || !ring->sched.thread)<br>
<br>
<o:p></o:p></span></p>
</div>
</blockquote>
<p><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>