Skip to content

Commit 8aadeb8

Browse files
committed
drm/vmwgfx: Remove the dedicated memory accounting
vmwgfx shared very elaborate memory accounting with ttm. It was moved from ttm to vmwgfx in change f07069d ("drm/ttm: move memory accounting into vmwgfx v4") but because of complexity it was hard to maintain. Some parts of the code weren't freeing memory correctly and some were missing accounting all together. While those would be fairly easy to fix the fundamental reason for memory accounting in the driver was the ability to invoke shrinker which is part of TTM code as well (with support for unified memory hopefully coming soon). That meant that vmwgfx had a lot of code that was either unused or duplicating code from TTM. Removing this code also prevents excessive calls to global swapout which were common during memory pressure because both vmwgfx and TTM would invoke the shrinker when memory usage reached half of RAM. Fixes: f07069d ("drm/ttm: move memory accounting into vmwgfx v4") Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Martin Krastev <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 21a6732 commit 8aadeb8

27 files changed

+38
-1316
lines changed

drivers/gpu/drm/vmwgfx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_hashtab.o vmwgfx_kms.o vmwgfx_d
99
vmwgfx_cotable.o vmwgfx_so.o vmwgfx_binding.o vmwgfx_msg.o \
1010
vmwgfx_simple_resource.o vmwgfx_va.o vmwgfx_blit.o \
1111
vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \
12-
vmwgfx_devcaps.o ttm_object.o ttm_memory.o vmwgfx_system_manager.o
12+
vmwgfx_devcaps.o ttm_object.o vmwgfx_system_manager.o
1313

1414
vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o
1515
vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o

0 commit comments

Comments
 (0)