From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 2/5] drm/i915: Bump the inactive LRU on set-to-GTT-domain Date: Mon, 27 Feb 2012 10:50:49 -0800 Message-ID: <87k438jek6.fsf@eliezer.anholt.net> References: <1330118022-5701-1-git-send-email-chris@chris-wilson.co.uk> <1330118022-5701-3-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0715239504==" Return-path: In-Reply-To: <1330118022-5701-3-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0715239504== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Fri, 24 Feb 2012 21:13:39 +0000, Chris Wilson = 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_i= 915_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 =3D obj->base.dev->dev_private; > uint32_t old_write_domain, old_read_domains; > int ret; >=20=20 > @@ -2923,6 +2914,9 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_g= em_object *obj, bool write) > old_read_domains, > old_write_domain); >=20=20 > + /* 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. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9L0IkACgkQHUdvYGzw6vfeBACdG0QUsBz1YFPmNz5/407NcHUW MGYAn0JtQjKPVgp3F3eIG1SrX3NpUi+g =1nj7 -----END PGP SIGNATURE----- --=-=-=-- --===============0715239504== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0715239504==--