drm: Branch 'master'

[email protected] (Chunming Zhou) Thu, 8 Feb 2018 06:37:00 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 amdgpu/amdgpu_vamgr.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit d07be74a4afe9d22f987aca7e8e84cccaa210248
Author: Chunming Zhou <[email protected]>
Date:   Thu Feb 8 14:35:26 2018 +0800

    amdgpu: fix inefficient vamgr algorithm
    
    issue: UMD allocates top 4GB, but don't do anything, just reserve top 4GB space,
    but the performance of VP13 drops from 162fps to 99fps.
    
    root cause:
    our va hole list of vamgr is too long by time going.
    
    fix:
    reusing old hole as much as possible can make the list shortest.
    
    result:
    performance recovers as non-list path, next patch will remove non-list code path.
    
    Signed-off-by: Chunming Zhou <[email protected]>
    Reviewed-by: Christian König <[email protected]>

diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index ab425ef7..a2852b55 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -80,9 +80,7 @@ amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
 		return AMDGPU_INVALID_VA_ADDRESS;
 
 	pthread_mutex_lock(&mgr->bo_va_mutex);
-	/* TODO: using more appropriate way to track the holes */
-	/* first look for a hole */
-	LIST_FOR_EACH_ENTRY_SAFE(hole, n, &mgr->va_holes, list) {
+	LIST_FOR_EACH_ENTRY_SAFE_REV(hole, n, &mgr->va_holes, list) {
 		if (base_required) {
 			if (hole->offset > base_required ||
 			    (hole->offset + hole->size) < (base_required + size))

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--
_______________________________________________
Dri-patches mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-patches