On Fri, Jan 13, 2017 at 09:47:08AM +0200, Joonas Lahtinen wrote: > On ke, 2017-01-11 at 21:09 +0000, Chris Wilson wrote: > > + > > + mutex_lock(&i915->drm.struct_mutex); > > + drm_mm_for_each_hole(node, &ggtt->base.mm, this_start, this_end) { > > + u64 this_size; > > + > > + if (ggtt->base.mm.color_adjust) > > + ggtt->base. mm.color_adjust(node, 0, > > + &this_start, &this_end); > > + > > + this_size = this_end - this_start; > > + if (this_size > hole_size) { > > + hole_size = this_size; > > + hole_start = this_start; > > + hole_end = this_end; > > + } > > + } > > + pr_info("Found GGTT hole [%llx, %llx], size %llx\n", > > + hole_start, hole_end, hole_size); > > + GEM_BUG_ON(hole_start >= hole_end); > > + > > Why not just walk all the holes big enough to accommodate GTT_PAGE_SIZE > for better coverage? But for just one hole, with above; My interest in test was focused on what happens at the edges. The test tries to put objects of different sizes next to the edge, and see if we overstepped in the PTE insertion. Looking at the object next below that was to try and hit different pagetable boundaries, as the pattern is slightly different to the earlier tests. In particular I'm trying to reproduce the NULL pointer dereferences seen in gen8_ppgtt_insert_pte and gen6_ppgtt_insert_pte, but unsucessfully so far. Anyway, in regards to this test I was looking for multiple pages, but that is no reason not to use all holes and just timeout. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx