drm/amd/amdgpu: fix performance drop when VRAM pressure
Subsystems (3)
PATCH 1/2 drm/amd/amdgpu: fix performance drop when VRAM pressure
When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -3
@@ -405,10 +405,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,if (unlikely (r !=0 ))return r; - bo->tbo.priority =ilog2 (bo->tbo.num_pages);if (kernel) - bo->tbo.priority *=2 ; - bo->tbo.priority =min (bo->tbo.priority,TTM_MAX_BO_PRIORITY -1 ); + bo->tbo.priority =1 ;if (flags &AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement &TTM_PL_FLAG_VRAM ) {
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1490665930-19814-1-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amd/amdgpu: decrease ttm bo priority number
decrease and also reserve priority number for KFD using
--- include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/ttm/ttm_bo_driver.h +1 -1
@@ -42,7 +42,7 @@#include <linux/spinlock.h> #include <linux/reservation.h> -#define TTM_MAX_BO_PRIORITY 16U +#define TTM_MAX_BO_PRIORITY 4Ustruct ttm_backend_func {/**
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1490665930-19814-2-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 2/2] drm/amd/amdgpu: decrease ttm bo priority number
Quoted 6 lines
-----Original Message-----
From: Roger.He [mailto:[email protected]]
Sent: Monday, March 27, 2017 9:52 PM
To: [email protected]
Cc: Deucher, Alexander; He, Hongbo
Subject: [PATCH 2/2] drm/amd/amdgpu: decrease ttm bo priority number
Patch title should be:
drm/ttm: decrease ttm bo priority number
With that fixed:
Quoted 25 lines
decrease and also reserve priority number for KFD using
Change-Id I9e36d292c920c034ddca53d0ec282c17b7a3cf16Signed-off-by Roger.He <[email protected]>Reviewed-by Christian König <[email protected]>--- include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/drm/ttm/ttm_bo_driver.h +1
-2@@ -42,7 +42,7 @@#include <linux/spinlock.h> #include <linux/reservation.h> -#define TTM_MAX_BO_PRIORITY 16U +#define TTM_MAX_BO_PRIORITY 4Ustruct ttm_backend_func {/** --
Quoted 1 line
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: Roger.He [mailto:[email protected]]
Sent: Monday, March 27, 2017 9:52 PM
To: [email protected]
Cc: Deucher, Alexander; He, Hongbo
Subject: [PATCH 1/2] drm/amd/amdgpu: fix performance drop when VRAM pressure
Quoted 6 lines
When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it.
Change-Id Idcd2db65be69d62bcbd7dfaa3bcf9bc964d6d122Signed-off-by Roger.He <[email protected]>Reviewed-by Christian König <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1
-3@@ -405,10 +405,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, if (unlikely(r != 0))return r; - bo->tbo.priority =ilog2 (bo->tbo.num_pages);if (kernel) - bo->tbo.priority *=2 ; - bo->tbo.priority =min (bo->tbo.priority,TTM_MAX_BO_PRIORITY - 1); + bo->tbo.priority =1 ;drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0
-1if (flags &AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement &TTM_PL_FLAG_VRAM ) { --
Quoted 1 line
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx