<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">BO list? No, we stop removing them from the LRU.<br>
<br>
But we still move them to the end of the LRU before releasing them.<br>
<br>
Christian.<br>
<br>
Am 15.05.19 um 16:21 schrieb Zhou, David(ChunMing):<br>
</div>
<blockquote type="cite" cite="mid:-z5t5bc-r0qydowvgp2jfwhsru6hathty0w6tmefo8lvfrqj4298bq6-53859k-e09jr8-7uhi4m-ne8q5-er44kbg5jt6sh5lbep35sue0-8jf289-u3ez2g-1jbf4vwi8mtu-b26by3izukbi-qq632i.1557930062576@email.android.com">
<meta content="text/html; charset=Windows-1252">
Isn't this patch trying to stop removing for all BOs  from bo list?<br>
<br>
-David<br>
<br>
-------- Original Message --------<br>
Subject: Re: [PATCH 11/11] drm/amdgpu: stop removing BOs from the LRU during CS<br>
From: Christian König <br>
To: "Zhou, David(ChunMing)" ,"Koenig, Christian" ,"Olsak, Marek" ,"Liang, Prike" ,<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org,amd-gfx@lists.freedesktop.org">dri-devel@lists.freedesktop.org,amd-gfx@lists.freedesktop.org</a><br>
CC: <br>
<br>
<div>[CAUTION: External Email]
<div>
<div class="moz-cite-prefix">That is a good point, but actually not a problem in practice.<br>
<br>
See the change to ttm_eu_fence_buffer_objects:<br>
<blockquote type="cite">-               ttm_bo_add_to_lru(bo);<br>
+               if (list_empty(&bo->lru))<br>
+                       ttm_bo_add_to_lru(bo);<br>
+               else<br>
+                       ttm_bo_move_to_lru_tail(bo, NULL);<br>
</blockquote>
<br>
We still move the BOs to the end of the LRU in the same order we have before, we just don't remove them when they are reserved.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 14.05.19 um 16:31 schrieb Zhou, David(ChunMing):<br>
</div>
<blockquote type="cite">
<meta content="text/html; charset=Windows-1252">
how to refresh LRU to keep the order align with bo list passed from user space?<br>
<br>
you can verify it by some games, performance could be different much between multiple runnings.<br>
<br>
-David<br>
<br>
-------- Original Message --------<br>
Subject: Re: [PATCH 11/11] drm/amdgpu: stop removing BOs from the LRU during CS<br>
From: Christian König <br>
To: "Zhou, David(ChunMing)" ,"Olsak, Marek" ,"Liang, Prike" ,<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org,amd-gfx@lists.freedesktop.org" moz-do-not-send="true">dri-devel@lists.freedesktop.org,amd-gfx@lists.freedesktop.org</a><br>
CC: <br>
<br>
<div>[CAUTION: External Email]
<div>
<div class="moz-cite-prefix">Hui? What do you mean with that?<br>
<br>
Christian.<br>
<br>
Am 14.05.19 um 15:12 schrieb Zhou, David(ChunMing):<br>
</div>
<blockquote type="cite">
<meta name="Generator" content="Microsoft Exchange
                    Server">
<style>
<!--
.EmailQuote
        {margin-left:1pt;
        padding-left:4pt;
        border-left:#800000 2px solid}
-->
</style>
<div>my only concern is how to fresh LRU when bo is from bo list.<br>
<br>
-David<br>
<br>
-------- Original Message --------<br>
Subject: [PATCH 11/11] drm/amdgpu: stop removing BOs from the LRU during CS<br>
From: Christian König <br>
To: "Olsak, Marek" ,"Zhou, David(ChunMing)" ,"Liang, Prike" ,<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org,amd-gfx@lists.freedesktop.org" moz-do-not-send="true">dri-devel@lists.freedesktop.org,amd-gfx@lists.freedesktop.org</a><br>
CC: <br>
<br>
</div>
<font size="2"><span style="font-size:11pt">
<div class="PlainText">[CAUTION: External Email]<br>
<br>
This avoids OOM situations when we have lots of threads<br>
submitting at the same time.<br>
<br>
Signed-off-by: Christian König <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com" moz-do-not-send="true">
<christian.koenig@amd.com></a><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c<br>
index fff558cf385b..f9240a94217b 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c<br>
@@ -648,7 +648,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,<br>
        }<br>
<br>
        r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true,<br>
-                                  &duplicates, true);<br>
+                                  &duplicates, false);<br>
        if (unlikely(r != 0)) {<br>
                if (r != -ERESTARTSYS)<br>
                        DRM_ERROR("ttm_eu_reserve_buffers failed.\n");<br>
--<br>
2.17.1<br>
<br>
</div>
</span></font></blockquote>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></pre>
</blockquote>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>