linux_dsm_epyc7002/drivers/gpu/drm/amd/amdgpu
John Brooks 00f06b246a drm/amdgpu: Throttle visible VRAM moves separately
The BO move throttling code is designed to allow VRAM to fill quickly if it
is relatively empty. However, this does not take into account situations
where the visible VRAM is smaller than total VRAM, and total VRAM may not
be close to full but the visible VRAM segment is under pressure. In such
situations, visible VRAM would experience unrestricted swapping and
performance would drop.

Add a separate counter specifically for moves involving visible VRAM, and
check it before moving BOs there.

v2: Only perform calculations for separate counter if visible VRAM is
    smaller than total VRAM. (Michel Dänzer)
v3: [Michel Dänzer]
* Use BO's location rather than the AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED
  flag to determine whether to account a move for visible VRAM in most
  cases.
* Use a single

	if (adev->mc.visible_vram_size < adev->mc.real_vram_size) {

  block in amdgpu_cs_get_threshold_for_moves.

Fixes: 95844d20ae (drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2))
Signed-off-by: John Brooks <john@fastquake.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-07-14 11:06:33 -04:00
..
amdgpu_acp.c
amdgpu_acp.h
amdgpu_acpi.c
amdgpu_afmt.c
amdgpu_amdkfd_gfx_v7.c drm/amdgpu: remove duplicate magic constants from amdgpu_amdkfd_gfx*.c 2017-05-31 16:48:55 -04:00
amdgpu_amdkfd_gfx_v8.c drm/amdgpu: remove duplicate magic constants from amdgpu_amdkfd_gfx*.c 2017-05-31 16:48:55 -04:00
amdgpu_amdkfd.c drm/amdgpu: move mec queue helpers to amdgpu_gfx.h 2017-06-07 18:02:06 -04:00
amdgpu_amdkfd.h drm/amdgpu: rename rdev to adev 2017-05-31 16:48:50 -04:00
amdgpu_atombios.c drm/amdgpu/atombios: add function for whether we need asic_init 2017-07-14 11:06:05 -04:00
amdgpu_atombios.h drm/amdgpu/atombios: add function for whether we need asic_init 2017-07-14 11:06:05 -04:00
amdgpu_atomfirmware.c drm/amdgpu/atomfirmware: implement vram_width for APUs 2017-07-14 11:06:18 -04:00
amdgpu_atomfirmware.h drm/amdgpu/atomfirmware: implement vram_width for APUs 2017-07-14 11:06:18 -04:00
amdgpu_atpx_handler.c
amdgpu_benchmark.c drm/amdgpu: add vm_needs_flush parameter to amdgpu_copy_buffer 2017-07-14 11:05:57 -04:00
amdgpu_bios.c drm/amdgpu/atom: fix atom_fw check 2017-07-14 11:06:17 -04:00
amdgpu_bo_list.c drm/amdgpu: Free resources of bo_list when idr_alloc fails 2017-07-14 11:06:17 -04:00
amdgpu_cgs.c drm/amd/powerplay: added grbm_idx_mutex lock/unlock to cgs v2 2017-07-14 11:06:25 -04:00
amdgpu_connectors.c
amdgpu_connectors.h
amdgpu_cs.c drm/amdgpu: Throttle visible VRAM moves separately 2017-07-14 11:06:33 -04:00
amdgpu_ctx.c drm/amdgpu: untie user ring ids from kernel ring ids v6 2017-05-31 16:49:01 -04:00
amdgpu_device.c drm/amdgpu: change gartsize default to 256MB 2017-07-14 11:06:31 -04:00
amdgpu_display.c
amdgpu_dpm.c
amdgpu_dpm.h
amdgpu_drv.c drm/amdgpu: Add vis_vramlimit module parameter 2017-07-14 11:06:32 -04:00
amdgpu_drv.h
amdgpu_encoders.c
amdgpu_fb.c drm/amdgpu: fix null point error when rmmod amdgpu. 2017-05-25 16:13:12 -04:00
amdgpu_fence.c
amdgpu_gart.c drm/amdgpu: change gartsize default to 256MB 2017-07-14 11:06:31 -04:00
amdgpu_gart.h drm/amdgpu: move GART struct and function into amdgpu_gart.h v2 2017-07-14 11:06:28 -04:00
amdgpu_gds.h
amdgpu_gem.c drm/amdgpu: remove maximum BO size limitation v2 2017-07-14 11:06:22 -04:00
amdgpu_gfx.c drm/amd/amdgpu: Rename KIQ ring to avoid spaces 2017-06-15 11:50:27 -04:00
amdgpu_gfx.h drm/amdgpu/gfx: consolidate mqd buffer setup code 2017-06-07 18:20:59 -04:00
amdgpu_gtt_mgr.c drm/amdgpu: limit the GTT manager address space 2017-07-14 11:06:30 -04:00
amdgpu_i2c.c
amdgpu_i2c.h
amdgpu_ib.c drm/amdgpu:fix world switch hang 2017-07-14 11:06:10 -04:00
amdgpu_ih.c
amdgpu_ih.h
amdgpu_ioc32.c
amdgpu_irq.c drm/amdgpu: Allow vblank_disable_immediate. 2017-07-14 11:05:51 -04:00
amdgpu_irq.h
amdgpu_job.c drm/amdgpu: allow flushing VMID0 before IB execution as well 2017-07-14 11:05:57 -04:00
amdgpu_kms.c drm/amdgpu: use TTM values instead of MC values for the info queries 2017-07-14 11:06:23 -04:00
amdgpu_mn.c
amdgpu_mode.h drm/amdgpu: remove *_mc_access from display funcs 2017-07-14 11:05:50 -04:00
amdgpu_object.c drm/amdgpu: Throttle visible VRAM moves separately 2017-07-14 11:06:33 -04:00
amdgpu_object.h
amdgpu_pll.c
amdgpu_pll.h
amdgpu_pm.c
amdgpu_pm.h
amdgpu_powerplay.c drm/amd/powerplay: fix bug fail to remove sysfs when rmmod amdgpu. 2017-07-05 13:18:50 -04:00
amdgpu_powerplay.h
amdgpu_prime.c
amdgpu_psp.c drm/amdgpu: make psp cmd buffer as a reserve memory 2017-07-14 11:06:13 -04:00
amdgpu_psp.h drm/amdgpu: make psp cmd buffer as a reserve memory 2017-07-14 11:06:13 -04:00
amdgpu_queue_mgr.c drm/amdgpu: use LRU mapping policy for SDMA engines 2017-05-31 16:49:04 -04:00
amdgpu_ring.c drm/amdgpu: Move compute vm bug logic to amdgpu_vm.c 2017-06-01 16:00:20 -04:00
amdgpu_ring.h drm/amdgpu: fix amdgpu_ring_write_multiple 2017-07-14 11:05:56 -04:00
amdgpu_sa.c
amdgpu_sync.c drm/amdgpu: Add amdgpu_sync_wait 2017-06-09 11:29:46 -04:00
amdgpu_sync.h drm/amdgpu: Add amdgpu_sync_wait 2017-06-09 11:29:46 -04:00
amdgpu_test.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
amdgpu_trace_points.c
amdgpu_trace.h drm/amdgpu: trace VM flags as 64bits 2017-07-14 11:06:01 -04:00
amdgpu_ttm.c drm/amdgpu: Add vis_vramlimit module parameter 2017-07-14 11:06:32 -04:00
amdgpu_ttm.h drm/amdgpu: move GART struct and function into amdgpu_gart.h v2 2017-07-14 11:06:28 -04:00
amdgpu_ucode.c drm/amdgpu: set firmware loading type as direct by default for raven 2017-07-14 11:06:13 -04:00
amdgpu_ucode.h drm/amdgpu: add new member in gpu_info fw 2017-06-15 11:50:22 -04:00
amdgpu_uvd.c
amdgpu_uvd.h
amdgpu_vce.c drm/amdgpu: use existing function amdgpu_bo_create_kernel 2017-06-01 16:00:21 -04:00
amdgpu_vce.h drm/amdgpu: add saved_bo to save vce 4.0 context when suspend 2017-06-01 16:00:22 -04:00
amdgpu_vcn.c
amdgpu_vcn.h
amdgpu_vf_error.c drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
amdgpu_vf_error.h drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
amdgpu_virt.c
amdgpu_virt.h drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
amdgpu_vm.c drm/amdgpu:fix world switch hang 2017-07-14 11:06:10 -04:00
amdgpu_vm.h drm/amdgpu:fix world switch hang 2017-07-14 11:06:10 -04:00
amdgpu_vram_mgr.c drm/amdgpu: Use designated initializers 2017-05-28 10:23:00 -07:00
amdgpu.h drm/amdgpu: Throttle visible VRAM moves separately 2017-07-14 11:06:33 -04:00
atom.c
atom.h
atombios_crtc.c drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating 2017-06-20 12:06:49 -04:00
atombios_crtc.h
atombios_dp.c
atombios_dp.h
atombios_encoders.c
atombios_encoders.h
atombios_i2c.c
atombios_i2c.h
ci_dpm.c Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
ci_dpm.h
ci_smc.c
cik_dpm.h
cik_ih.c
cik_ih.h
cik_sdma.c
cik_sdma.h
cik.c Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-06-16 09:56:53 +10:00
cik.h
cikd.h
clearstate_ci.h
clearstate_defs.h
clearstate_gfx9.h
clearstate_si.h
clearstate_vi.h
cz_ih.c
cz_ih.h
dce_v6_0.c drm/amdgpu: remove *_mc_access from display funcs 2017-07-14 11:05:50 -04:00
dce_v6_0.h
dce_v8_0.c drm/amdgpu: remove *_mc_access from display funcs 2017-07-14 11:05:50 -04:00
dce_v8_0.h
dce_v10_0.c drm/amdgpu: remove *_mc_access from display funcs 2017-07-14 11:05:50 -04:00
dce_v10_0.h
dce_v11_0.c drm/amdgpu: remove *_mc_access from display funcs 2017-07-14 11:05:50 -04:00
dce_v11_0.h
dce_virtual.c drm/amdgpu: remove *_mc_access from display funcs 2017-07-14 11:05:50 -04:00
dce_virtual.h
gfx_v6_0.c drm/amdgpu: Fix the exported always on CU bitmap 2017-06-29 12:43:49 -04:00
gfx_v6_0.h
gfx_v7_0.c drm/amdgpu: Fix the exported always on CU bitmap 2017-06-29 12:43:49 -04:00
gfx_v7_0.h drm/amdgpu: unify MQD programming sequence for kfd and amdgpu v2 2017-05-31 16:48:48 -04:00
gfx_v8_0.c drm/amdgpu: Changed CU reservation golden settings 2017-07-14 11:05:54 -04:00
gfx_v8_0.h drm/amdgpu: unify MQD programming sequence for kfd and amdgpu v2 2017-05-31 16:48:48 -04:00
gfx_v9_0.c drm/amdgpu/gfx9: fix driver reload with KIQ 2017-07-04 10:22:26 -04:00
gfx_v9_0.h
gfxhub_v1_0.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
gfxhub_v1_0.h drm/amdgpu: export gfxhub sw_init into gmc 2017-06-06 16:58:36 -04:00
gmc_v6_0.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
gmc_v6_0.h
gmc_v7_0.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
gmc_v7_0.h
gmc_v8_0.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
gmc_v8_0.h
gmc_v9_0.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
gmc_v9_0.h
iceland_ih.c
iceland_ih.h
iceland_sdma_pkt_open.h
Kconfig drm/amdgpu/radeon: Use radeon by default for CIK GPUs 2017-06-08 10:54:37 -04:00
kv_dpm.c
kv_dpm.h
kv_smc.c
Makefile drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
mmhub_v1_0.c drm/amdgpu: consistent name all GART related parts 2017-07-14 11:06:30 -04:00
mmhub_v1_0.h drm/amdgpu: add interface to enable/disable mmhub pg on raven 2017-06-29 12:43:45 -04:00
mmsch_v1_0.h
mxgpu_ai.c drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
mxgpu_ai.h drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
mxgpu_vi.c drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
mxgpu_vi.h drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox. 2017-07-14 11:05:52 -04:00
nbio_v6_1.c drm/amdgpu: add nbio 6.1 register init function 2017-07-14 11:06:27 -04:00
nbio_v6_1.h drm/amdgpu: add nbio 6.1 register init function 2017-07-14 11:06:27 -04:00
nbio_v7_0.c drm/amdgpu: NO KIQ usage on nbio hdp flush routine 2017-07-14 11:06:11 -04:00
nbio_v7_0.h
ObjectID.h
ppsmc.h
psp_gfx_if.h
psp_v3_1.c drm/amdgpu: remove superfluous check 2017-07-14 11:06:11 -04:00
psp_v3_1.h
psp_v10_0.c drm/amdgpu/psp: upper_32_bits/lower_32_bits for address setup 2017-06-29 12:43:48 -04:00
psp_v10_0.h
r600_dpm.h
sdma_v2_4.c
sdma_v2_4.h
sdma_v3_0.c
sdma_v3_0.h
sdma_v4_0.c drm/amdgpu: cleanup adjust_mc_addr handling v4 2017-05-31 14:16:35 -04:00
sdma_v4_0.h
si_dma.c
si_dma.h
si_dpm.c
si_dpm.h
si_enums.h
si_ih.c
si_ih.h
si_smc.c
si.c Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-06-16 09:56:53 +10:00
si.h
sid.h
sislands_smc.h
soc15_common.h drm/amdgpu: Add WREG32_SOC15_NO_KIQ macro define 2017-07-14 11:06:10 -04:00
soc15.c drm/amdgpu/soc15: init nbio registers for vega10 2017-07-14 11:06:27 -04:00
soc15.h
soc15d.h
tonga_ih.c
tonga_ih.h
tonga_sdma_pkt_open.h
uvd_v4_2.c
uvd_v4_2.h
uvd_v5_0.c
uvd_v5_0.h
uvd_v6_0.c
uvd_v6_0.h
uvd_v7_0.c drm/amd/amdgpu: Port UVD 7.0 over to new SOC15 macros 2017-06-15 11:50:32 -04:00
uvd_v7_0.h
vce_v2_0.c
vce_v2_0.h
vce_v3_0.c drm/amdgpu: Program ring for vce instance 1 at its register space 2017-05-31 14:16:37 -04:00
vce_v3_0.h
vce_v4_0.c drm/amdgpu: add saved_bo to save vce 4.0 context when suspend 2017-06-01 16:00:22 -04:00
vce_v4_0.h
vcn_v1_0.c drm/amd/amdgpu: Port VCN over to new SOC15 macros 2017-06-15 11:50:35 -04:00
vcn_v1_0.h
vega10_ih.c Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-06-16 09:56:53 +10:00
vega10_ih.h
vega10_sdma_pkt_open.h
vi_dpm.h
vi.c Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-06-16 09:56:53 +10:00
vi.h
vid.h