All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915: Discard objects from mm global_list after being shrunk
Date: Tue, 1 Nov 2016 08:29:03 +0000	[thread overview]
Message-ID: <6b723e8a-17f4-706b-4c8a-eaa0492a2c49@linux.intel.com> (raw)
In-Reply-To: <20161031102645.29495-4-chris@chris-wilson.co.uk>


On 31/10/2016 10:26, Chris Wilson wrote:
> In the shrinker, we can safely remove an empty object (obj->mm.pages ==
> NULL) after having discarded the pages because we are holding the
> struct_mutex.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem_shrinker.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> index 0241658af16b..b504ba091c4f 100644
> --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> @@ -226,6 +226,7 @@ i915_gem_shrink(struct drm_i915_private *dev_priv,
>  				mutex_lock(&obj->mm.lock);
>  				if (!obj->mm.pages) {
>  					__i915_gem_object_invalidate(obj);
> +					list_del_init(&obj->global_list);
>  					count += obj->base.size >> PAGE_SHIFT;
>  				}
>  				mutex_unlock(&obj->mm.lock);
>

This matches the same loop a bit higher up so from that POV:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-01  8:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 10:26 [PATCH 1/6] drm/i915: Use the full hammer when shutting down the rcu tasks Chris Wilson
2016-10-31 10:26 ` [PATCH 2/6] drm/i915: Avoid accessing request->timeline outside of its lifetime Chris Wilson
2016-10-31 17:35   ` Tvrtko Ursulin
2016-10-31 21:03     ` Chris Wilson
2016-11-01  8:43       ` Tvrtko Ursulin
2016-10-31 10:26 ` [PATCH 3/6] drm/i915: Track pages pinned due to swizzling quirk Chris Wilson
2016-11-01  8:39   ` Tvrtko Ursulin
2016-11-01  8:48     ` Chris Wilson
2016-11-01  8:52       ` Tvrtko Ursulin
2016-10-31 10:26 ` [PATCH 4/6] drm/i915: Discard objects from mm global_list after being shrunk Chris Wilson
2016-11-01  8:29   ` Tvrtko Ursulin [this message]
2016-10-31 10:26 ` [PATCH 5/6] drm/i915: Move the recently scanned objects to the tail after shrinking Chris Wilson
2016-10-31 15:26   ` Joonas Lahtinen
2016-10-31 10:26 ` [PATCH 6/6] drm/i915: Store the vma in an rbtree under the object Chris Wilson
2016-11-01  8:41   ` Tvrtko Ursulin
2016-11-01  8:50     ` Chris Wilson
2016-11-01  8:54       ` Tvrtko Ursulin
2016-11-01  9:06         ` Chris Wilson
2016-11-01  9:20           ` Tvrtko Ursulin
2016-11-01  9:45             ` Chris Wilson
2016-11-01  9:43   ` Tvrtko Ursulin
2016-11-01  9:56     ` Chris Wilson
2016-10-31 11:16 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Use the full hammer when shutting down the rcu tasks Patchwork
2016-10-31 17:15 ` [PATCH 1/6] " Tvrtko Ursulin
2016-10-31 21:05   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b723e8a-17f4-706b-4c8a-eaa0492a2c49@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.