Skip to content

Radeon memory management improvements v3

Marek Olšák dri-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/radeon: add a way to get and set initial buffer domainsdrivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_drv.c drivers/gpu/drm/radeon/radeon_gem.c +3 more+57 -10 replies
2/6drm/radeon: track memory statistics about VRAM and GTT usage and buffer movesdrivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_kms.c drivers/gpu/drm/radeon/radeon_object.c +3 more+65 -30 replies
3/6drm/radeon: deduplicate code in radeon_gem_busy_ioctldrivers/gpu/drm/radeon/radeon_gem.c+1 -120 replies
4/6drm/radeon: add buffers to the LRU list from smallest to largestdrivers/gpu/drm/radeon/radeon_cs.c+23 -00 replies
5/6drm/radeon: validate relocations in the order determined by userspacedrivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_cs.c drivers/gpu/drm/radeon/radeon_object.c +1 more+61 -160 replies
6/6drm/radeon: limit how much memory TTM can move per IB according to VRAM usagedrivers/gpu/drm/radeon/radeon_cs.c drivers/gpu/drm/radeon/radeon_object.c drivers/gpu/drm/radeon/radeon_object.h+85 -80 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchChristian König
1/6
2/6
3/6R-b
4/6R-b
5/6
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] Radeon memory management improvements v3

While updating "[PATCH 5/6] drm/radeon: validate relocations in the order determined by userspace" based on feedback, which should have been a harmless change, I discovered that the performance dropped. The problem was that list_add/move from one list to another reversed the list of relocations and the only thing which restored performance was to sort the relocation list with a stable sort. (preserve ordering of buffers whose priorities are equal). The only explanation I've come up with is that the buffers which appear sooner in the list are likely to be used more often by an IB than buffers which appear later in the list. For example, a texture used in all draw commands will most probably be somewhere at the beginning. However, a texture which appears at the end is probably only used in a
few last draw commands.

Also, the stats are changed to atomic64_t as discusssed before.

Marek