public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Akash Goel <akash.goel@intel.com>
Subject: Re: [PATCH v2 1/3] drm/i915/shrinker: Account for unshrinkable unbound pages
Date: Tue, 05 Apr 2016 10:57:25 +0300	[thread overview]
Message-ID: <1459843045.5564.1.camel@linux.intel.com> (raw)
In-Reply-To: <1459777603-23618-2-git-send-email-chris@chris-wilson.co.uk>

On ma, 2016-04-04 at 14:46 +0100, Chris Wilson wrote:
> Since we only attempt to purge an object if can_release_pages() report
> true, we should also only add it to the count of potential recoverable
> pages when can_release_pages() is true.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

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

> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Akash Goel <akash.goel@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> index d3c473ffb90a..e391ee3ec486 100644
> --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> @@ -246,7 +246,7 @@ i915_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc)
>  
>  	count = 0;
>  	list_for_each_entry(obj, &dev_priv->mm.unbound_list, global_list)
> -		if (obj->pages_pin_count == 0)
> +		if (can_release_pages(obj))
>  			count += obj->base.size >> PAGE_SHIFT;
>  
>  	list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-05  7:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 13:46 vmap purge notifier for exhaustion of the vmalloc arena Chris Wilson
2016-04-04 13:46 ` [PATCH v2 1/3] drm/i915/shrinker: Account for unshrinkable unbound pages Chris Wilson
2016-04-05  7:57   ` Joonas Lahtinen [this message]
2016-04-04 13:46 ` [PATCH v2 2/3] mm/vmap: Add a notifier for when we run out of vmap address space Chris Wilson
2016-04-05  8:01   ` Joonas Lahtinen
2016-04-04 13:46 ` [PATCH v2 3/3] drm/i915/shrinker: Hook up vmap allocation failure notifier Chris Wilson
2016-04-05  8:19   ` Joonas Lahtinen
2016-04-05  9:03     ` Chris Wilson
2016-04-05  9:22     ` [PATCH] drm/i915/shrinker: Refactor common uninterruptible locking Chris Wilson
2016-04-05 10:02       ` Joonas Lahtinen
2016-04-05 10:59         ` Chris Wilson
2016-04-04 15:26 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/shrinker: Account for unshrinkable unbound pages Patchwork
2016-04-05 10:08 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/3] drm/i915/shrinker: Account for unshrinkable unbound pages (rev2) Patchwork

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=1459843045.5564.1.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=akash.goel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox