[PATCH 22/22] drm/i915: only clear partial pt upon allocation

Matthew Auld matthew.auld at intel.com
Sat Jul 1 17:21:12 UTC 2017


If we are going to fill the entire page anyway when inserting PTEs then
there's not much point in clearing it before hand. For particularly
large objects the fill_page_dma tends to rank pretty highly in perf when
running benchmarks like gem_exec_fault, for both the non-huge and huge
cases.

Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index d643fc486451..529547d35286 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1230,7 +1230,8 @@ static int gen8_ppgtt_alloc_pd(struct i915_address_space *vm,
 			if (IS_ERR(pt))
 				goto unwind;
 
-			gen8_initialize_pt(vm, pt);
+			if (length - start < SZ_2M)
+				gen8_initialize_pt(vm, pt);
 
 			gen8_ppgtt_set_pde(vm, pd, pt, pde);
 			pd->used_pdes++;
-- 
2.9.4



More information about the Intel-gfx-trybot mailing list