On Fri, 24 Feb 2012 21:13:39 +0000, Chris Wilson <[email protected]> wrote: > Currently, we only bump the LRU of an object when we bind into the GTT > for a page-fault. As the object may be used many times before its > mapping is zapped, we do not mark it as active as frequently as we > should. Userspace should be calling set-to-GTT-domain before each > pointer deference and so is a good place to perform the LRU bump.
> @@ -2883,6 +2873,7 @@ i915_gem_object_flush_cpu_write_domain(struct
> drm_i915_gem_object *obj)
> int
> i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool
> write)
> {
> + drm_i915_private_t *dev_priv = obj->base.dev->dev_private;
> uint32_t old_write_domain, old_read_domains;
> int ret;
>
> @@ -2923,6 +2914,9 @@ i915_gem_object_set_to_gtt_domain(struct
> drm_i915_gem_object *obj, bool write)
> old_read_domains,
> old_write_domain);
>
> + /* And bump the LRU for this access */
> + list_move_tail(&obj->mm_list, &dev_priv->mm.inactive_list);
I don't think you know that !obj->active here. For example, going to
GTT read of something that was currently active and in the SAMPLER read
domain.
pgpSEsBwx9QjV.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
