diff mbox

[1/2] drm/i915: Remove self-harming shrink_all on get_pages_gtt fail

Message ID 20161010114959.18321-2-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Oct. 10, 2016, 11:49 a.m. UTC
When we notice the system under memory pressure, we try to evict some
driver pages before asking the VM to shrink all caches. As a final step
in that process, we tried to evict everything, including active buffers.
This is harming ourselves, and we can mix shrinking all caches as well
as our residual buffers (after the first pass of trying to shrink just
our own buffers).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Michał Winiarski Oct. 10, 2016, 12:52 p.m. UTC | #1
On Mon, Oct 10, 2016 at 12:49:58PM +0100, Chris Wilson wrote:
> When we notice the system under memory pressure, we try to evict some
> driver pages before asking the VM to shrink all caches. As a final step
> in that process, we tried to evict everything, including active buffers.
> This is harming ourselves, and we can mix shrinking all caches as well
> as our residual buffers (after the first pass of trying to shrink just
> our own buffers).
 
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 1 -
>  1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 38a183faf9a7..ca1a5a5c6f19 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2246,7 +2246,6 @@  i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
 			 * our own buffer, now let the real VM do its job and
 			 * go down in flames if truly OOM.
 			 */
-			i915_gem_shrink_all(dev_priv);
 			page = shmem_read_mapping_page(mapping, i);
 			if (IS_ERR(page)) {
 				ret = PTR_ERR(page);