All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/shrinker: Only report objects with extra pinned pages as pinned
@ 2016-04-20  7:43 Chris Wilson
  2016-04-20  8:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Chris Wilson @ 2016-04-20  7:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: Akash Goel

When iterating over the bound list, we expect all objects there to have
their pages pinned (by the bound VMA). So only add those objects with
additional pin count on their pages as "pinned". These should be those
objects used for display and hardware access.

Reported-by: Akash Goel <akash.goel@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 d46388f25e04..4e4fcfa76b4c 100644
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@ -361,7 +361,7 @@ i915_gem_shrinker_oom(struct notifier_block *nb, unsigned long event, void *ptr)
 		if (!obj->base.filp)
 			continue;
 
-		if (obj->pages_pin_count)
+		if (obj->pages_pin_count > num_vma_bound(obj))
 			pinned += obj->base.size;
 		else
 			bound += obj->base.size;
-- 
2.8.0.rc3

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-20 12:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20  7:43 [PATCH] drm/i915/shrinker: Only report objects with extra pinned pages as pinned Chris Wilson
2016-04-20  8:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-04-20  8:56 ` [PATCH] " Joonas Lahtinen
2016-04-20 11:04   ` [PATCH v2 1/3] " Chris Wilson
2016-04-20 11:04     ` [PATCH v2 2/3] drm/i915/shrinker: Report "unevictable" pages Chris Wilson
2016-04-20 12:02       ` Joonas Lahtinen
2016-04-20 11:04     ` [PATCH v2 3/3] drm/i915/shrinker: Only shmemfs objects are backed by swap Chris Wilson
2016-04-20 12:07       ` Joonas Lahtinen
2016-04-20  9:03 ` ✓ Fi.CI.BAT: success for drm/i915/shrinker: Only report objects with extra pinned pages as pinned Patchwork
2016-04-20 10:23 ` Patchwork

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.