<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">Reviewed-by: Yong Zhao <Yong.Zhao@amd.com></span><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Felix Kuehling <Felix.Kuehling@amd.com><br>
<b>Sent:</b> Monday, November 25, 2019 4:28 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> [PATCH 1/1] drm/amdgpu: Raise KFD unpinned system memory limit</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Allow KFD applications to use more unpinned system memory through<br>
HMM.<br>
<br>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c<br>
index e43a95514b41..b6d1958d514f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c<br>
@@ -85,7 +85,7 @@ static bool check_if_add_bo_to_vm(struct amdgpu_vm *avm,<br>
 }<br>
 <br>
 /* Set memory usage limits. Current, limits are<br>
- *  System (TTM + userptr) memory - 3/4th System RAM<br>
+ *  System (TTM + userptr) memory - 15/16th System RAM<br>
  *  TTM memory - 3/8th System RAM<br>
  */<br>
 void amdgpu_amdkfd_gpuvm_init_mem_limits(void)<br>
@@ -98,7 +98,7 @@ void amdgpu_amdkfd_gpuvm_init_mem_limits(void)<br>
         mem *= si.mem_unit;<br>
 <br>
         spin_lock_init(&kfd_mem_limit.mem_limit_lock);<br>
-       kfd_mem_limit.max_system_mem_limit = (mem >> 1) + (mem >> 2);<br>
+       kfd_mem_limit.max_system_mem_limit = mem - (mem >> 4);<br>
         kfd_mem_limit.max_ttm_mem_limit = (mem >> 1) - (mem >> 3);<br>
         pr_debug("Kernel memory limit %lluM, TTM limit %lluM\n",<br>
                 (kfd_mem_limit.max_system_mem_limit >> 20),<br>
-- <br>
2.24.0<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cyong.zhao%40amd.com%7C808d3732d1d74a7cd05208d771ee6f9b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637103141200385929&amp;sdata=yywimvE%2FuidOPQb9IYLZi95MbfnFrW0Swmp11iYi4%2BI%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cyong.zhao%40amd.com%7C808d3732d1d74a7cd05208d771ee6f9b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637103141200385929&amp;sdata=yywimvE%2FuidOPQb9IYLZi95MbfnFrW0Swmp11iYi4%2BI%3D&amp;reserved=0</a></div>
</span></font></div>
</div>
</body>
</html>