[Intel-gfx] [PATCH 7/7] drm/i915: Early rejection of mappable GGTT pin attempts for large bo

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Oct 9 12:26:17 UTC 2017


On Mon, 2017-10-09 at 09:44 +0100, Chris Wilson wrote:
> Currently, we reject attempting to pin a large bo into the mappable
> aperture, but only after trying to create the vma. Under debug kernels,
> repeatedly creating and freeing that vma for an oversized bo consumes
> one-third of the runtime for pwrite/pread tests is spent on
> kmalloc/kfree tracking. If we move the rejection to before creating that
> vma, we lose some accuracy of checking against the fence_size as opposed
> to object size, though the fence can never be smaller than the object.
> Note that the vma creation itself will reject an attempt to create a vma
> larger than the GTT so we can remove one redundant test.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list