Skip to contentSkip to conversation

drm/radeon: Use two-ended allocation with a 512kb threshold

PATCH In review Lauri Kasanen 1 participant 1 message Mar 31, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 drm/radeon: Use two-ended allocation with a 512kb threshold

This decreases eviction by up to 20%, by improving the fragmentation quality. No harm in normal cases that fit VRAM fully (PTS gaming suite).

In some cases, even the VRAM-fitting cases improved slightly (openarena, urban terror).

512kb was measured as the most optimal threshold for 3d workloads common to radeon. Other drivers may need different thresholds according to their workloads.

---
 drivers/gpu/drm/radeon/radeon_ttm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_ttm.c +2 -1
index c8a8a51..1aef339 100644
@@ -710,7 +710,8 @@ int radeon_ttm_init(struct radeon_device *rdev)
 			       &radeon_bo_driver,
 			       rdev->ddev->anon_inode->i_mapping,
 			       DRM_FILE_PAGE_OFFSET,
-			       rdev->need_dma32);
+			       rdev->need_dma32,
+			       512 * 1024);
 	if (r) {
 		DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
 		return r;
Signature · 1 line
1.8.3.1