[Intel-gfx] [PATCH 06/10] drm/i915: Choose not to evict faultable objects from the GGTT

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Aug 12 10:50:56 UTC 2016


On pe, 2016-08-12 at 11:28 +0100, Chris Wilson wrote:
> @@ -1715,10 +1716,10 @@ int i915_gem_fault(struct vm_area_struct *area, struct vm_fault *vmf)
>  		goto err_unlock;
>  	}
>  
> -	/* Use a partial view if the object is bigger than the aperture. */
> -	/* Now pin it into the GTT if needed */
> -	vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0,
> -				       PIN_MAPPABLE | PIN_NONBLOCK);
> +	flags = PIN_MAPPABLE;
> +	if (obj->base.size > 2 << 20)

Magic number.

> @@ -55,6 +55,9 @@ mark_free(struct i915_vma *vma, struct list_head *unwind)
>  	if (WARN_ON(!list_empty(&vma->exec_list)))
>  		return false;
>  
> +	if (flags & PIN_NOFAULT && vma->obj->fault_mappable)
> +		return false;

The flag name is rather counter-intuitive for it describes other VMAs
rather than our new VMA...

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


More information about the Intel-gfx mailing list