All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Drop the unbound page cache upon idling
@ 2017-11-14 19:11 Chris Wilson
  2017-11-14 19:11 ` [PATCH 2/2] drm/i915: Remove temporary allocation of dma addresses when rotating Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2017-11-14 19:11 UTC (permalink / raw)
  To: intel-gfx

When the GPU is idle, we can take a breather and release our hold on our
many caches. One such cache is that we keep objects pinned in memory
even when they are no longer accessible by the GPU, that cache is held
until the system comes under memory pressure. As we are idle, we can be
reasonably confident that the pages will not be used again in the near
future, so let the system know it can recover the memory for its own
purposes.

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a7979b74ce21..8a9efc50e9d9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3373,6 +3373,9 @@ i915_gem_idle_work_handler(struct work_struct *work)
 	intel_engines_park(dev_priv);
 	i915_gem_timelines_mark_idle(dev_priv);
 
+	/* Discard all currently unused caching of obj->mm.pages */
+	i915_gem_shrink(dev_priv, -1UL, NULL, I915_SHRINK_UNBOUND);
+
 	GEM_BUG_ON(!dev_priv->gt.awake);
 	dev_priv->gt.awake = false;
 	rearm_hangcheck = false;
-- 
2.15.0

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

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

end of thread, other threads:[~2017-11-16 11:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 19:11 [PATCH 1/2] drm/i915: Drop the unbound page cache upon idling Chris Wilson
2017-11-14 19:11 ` [PATCH 2/2] drm/i915: Remove temporary allocation of dma addresses when rotating Chris Wilson
2017-11-16 10:43   ` Joonas Lahtinen
2017-11-16 11:17     ` Chris Wilson
2017-11-14 19:50 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Drop the unbound page cache upon idling Patchwork
2017-11-14 22:44 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-16 10:11 ` [PATCH 1/2] " Joonas Lahtinen

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.