drm/amdgpu: resvert "disable bulk moves for now"
Subsystems (2)
PATCH 1/1 drm/amdgpu: resvert "disable bulk moves for now"
This reverts commit a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a.
The changes to fix this should have landed in 5.1.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -2
@@ -603,14 +603,12 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,struct ttm_bo_global *glob = adev->mman.bdev.glob;struct amdgpu_vm_bo_base *bo_base; -#if 0 if (vm->bulk_moveable) {spin_lock (&glob->lru_lock);ttm_bo_bulk_move_lru_tail (&vm->lru_bulk_move);spin_unlock (&glob->lru_lock);return ; } -#endif memset (&vm->lru_bulk_move,0 ,sizeof (vm->lru_bulk_move));
Signature · 6 lines
2.17.1 _______________________________________________ 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): 20190912101535.71686-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
RB on it to go ahead.
-David
Quoted 18 lines · Christian König
This reverts commit
a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a.The changes to fix this should have landed in 5.1.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-1@@ -603,14 +603,12 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,struct ttm_bo_global *glob = adev->mman.bdev.glob;struct amdgpu_vm_bo_base *bo_base; -#if 0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev, · line 614
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-1if (vm->bulk_moveable) {spin_lock (&glob->lru_lock);ttm_bo_bulk_move_lru_tail (&vm->lru_bulk_move);spin_unlock (&glob->lru_lock);return ; } -#endif memset (&vm->lru_bulk_move,0 ,sizeof (vm->lru_bulk_move));
_______________________________________________
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): f0b19f35-5852-8cbe-2256-e769169d8884-5C7GfCeVMHo@public.gmane.org
Just to double check: We do have that enabled in the DKMS package for a while and doesn't encounter any more problems with it, correct?
Thanks,
Christian.
Am 12.09.19 um 16:02 schrieb Chunming Zhou:
Quoted 31 lines
RB on it to go ahead.
-David
Quoted 26 lines · Christian König
This reverts commit
a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a.The changes to fix this should have landed in 5.1.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-2@@ -603,14 +603,12 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,struct ttm_bo_global *glob = adev->mman.bdev.glob;struct amdgpu_vm_bo_base *bo_base; -#if 0 if (vm->bulk_moveable) {spin_lock (&glob->lru_lock);ttm_bo_bulk_move_lru_tail (&vm->lru_bulk_move);spin_unlock (&glob->lru_lock);return ; } -#endif
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev, · line 614
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0memset (&vm->lru_bulk_move,0 ,sizeof (vm->lru_bulk_move));
_______________________________________________
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): df915c16-198d-502d-6eed-975a0471ec13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
I dont know dkms status,anyway, we should submit this one as early as possible.
-------- 原始邮件 --------
主题:Re: [PATCH] drm/amdgpu: resvert "disable bulk moves for now" 发件人:Christian König
收件人:"Zhou, David(ChunMing)" ,[email protected] 抄送:
Just to double check: We do have that enabled in the DKMS package for a while and doesn't encounter any more problems with it, correct?
Thanks,
Christian.
Am 12.09.19 um 16:02 schrieb Chunming Zhou:
Quoted 31 lines
RB on it to go ahead.
-David
Quoted 26 lines · Christian König
This reverts commit
a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a.The changes to fix this should have landed in 5.1.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-2@@ -603,14 +603,12 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,struct ttm_bo_global *glob = adev->mman.bdev.glob;struct amdgpu_vm_bo_base *bo_base; -#if 0 if (vm->bulk_moveable) {spin_lock (&glob->lru_lock);ttm_bo_bulk_move_lru_tail (&vm->lru_bulk_move);spin_unlock (&glob->lru_lock);return ; } -#endif
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev, · line 614
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0memset (&vm->lru_bulk_move,0 ,sizeof (vm->lru_bulk_move));
_______________________________________________
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): ayyik7-bhm0th-f76qzcrx4nuhoz097-fqib6y-d00kkm-l8swdj-bb0hlq-6hyzem-xpderd-hmxy8m-n7py9m2f0bz2o58vot2offja-ec4pyzuy9pjm-235qpt-69n2k9ugq2z1gpw45e-vjjmkviqgdj4.1568301521040-2ueSQiBKiTY7tOexoI0I+QC/[email protected]
Hello,
Applying this locally, the issue we were seeing with very high submit times in high-end workloads seems largely gone. My methodology is to measure the total time spent in DRM_IOCTL_AMDGPU_CS with strace -T for the whole first scene of the Shadow of the Tomb Raider benchmark, and divide by the frame count in that scene to get an idea of how much CPU time is spent in submissions per frame. More details below.
On a Vega20 system with a 3900X, at High settings (~6 gigs of VRAM usage according to UMR, no contention):
- 5.2.14: 1.1ms per frame in CS
- 5.2.14 + LRU bulk moves: 0.6ms per frame in CS
On a Polaris10 system with a i7-7820X, at Very High Settings (7.7G/8G VRAM used, no contention):
- 5.2.15: 12.03ms per frame in CS (!)
- 5.2.15 + LRU bulk moves: 1.35ms per frame in CS
The issue is largely addressed. 1.35ms is still higher than I'd expect, but it's still pretty reasonable. Note that on many of our usecases, submission happens in a separate thread and doesn't typically impact overall frame time/latency if you have extra CPU cores to work with. However it very negatively affects performance as soon as the CPU gets saturated, and burns a ton of power.
Thanks!
- Pierre-Loup
Methodology details:
# Mesa patched to kill() itself with SIGCONT in vkQueuePresent to act as a frame marker in-band with the strace data.
# strace collection:
strace -f -p 13113 -e ioctl,kill -o sottr_first_scene_vanilla -T
# frame count:
cat sottr_first_scene_vanilla | grep kill\( | wc -l 616
# total time spent in _CS:
cat sottr_first_scene_vanilla | grep AMDGPU_CS | grep -v unfinished | tr -s ' ' | cut -d ' ' -f7 | tr -d \< | tr -d \> | xargs | tr ' ' '+' | bc 7.411782
# seconds to milliseconds, then divide by frame count
(gdb) p 7.41 * 1000.0 / 616.0
$1 = 12.029220779220779
Quoted 48 lines · David(ChunMing)
I dont know dkms status,anyway, we should submit this one as early as possible.
-------- 原始邮件 --------
主题:Re: [PATCH] drm/amdgpu: resvert "disable bulk moves for now" 发件人:Christian König
收件人:"Zhou, David(ChunMing)" ,[email protected] 抄送:Just to double check: We do have that enabled in the DKMS package for a while and doesn't encounter any more problems with it, correct?
Thanks,
Christian.Am 12.09.19 um 16:02 schrieb Chunming Zhou:
Quoted 7 lines
RB on it to go ahead.
-David
Quoted 2 lines · Christian König
This reverts commit
a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a.Quoted 8 lines
Review
Quoted 8 lines
The changes to fix this should have landed in 5.1.
Signed-off-by Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 2 --1 file changed, 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.cQuoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_move_to_lru_tail(struct
Quoted 4 lines
index
48349e4f0701..fd3fbaa73fa3100644drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0@@ -603,14 +603,12 @@ void amdgpu_vm_move_to_lru_tail(struct
amdgpu_device*adev,Quoted 12 lines
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-2struct ttm_bo_global *glob = adev->mman.bdev.glob; struct amdgpu_vm_bo_base *bo_base; -#if 0 if (vm->bulk_moveable) { spin_lock(&glob->lru_lock);ttm_bo_bulk_move_lru_tail (&vm->lru_bulk_move); spin_unlock(&glob->lru_lock); return; } -#endif
Quoted 8 lines
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_move_to_lru_tail(struct · line 614
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0memset(&vm->lru_bulk_move, 0, sizeof(vm->lru_bulk_move));_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx