From patchwork Mon Oct 10 11:49:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9369363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E9CA607FD for ; Mon, 10 Oct 2016 11:50:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10843294AE for ; Mon, 10 Oct 2016 11:50:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04D4F29642; Mon, 10 Oct 2016 11:50:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9D3ED294AE for ; Mon, 10 Oct 2016 11:50:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34F246E4D6; Mon, 10 Oct 2016 11:50:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-x242.google.com (mail-qk0-x242.google.com [IPv6:2607:f8b0:400d:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 523B26E4D6 for ; Mon, 10 Oct 2016 11:50:06 +0000 (UTC) Received: by mail-qk0-x242.google.com with SMTP id n189so6579531qke.1 for ; Mon, 10 Oct 2016 04:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=OQHdZQJiOoRXbWoY0kQWtRUmSGL6WCX6BP7p3QyGmno=; b=ukQ0C3ggVQoSZZGCcPylPIr08J6fkuFz7E7SqhtgO866gAXXm3RfBqSW1zPp7bf4IH lq4b2OdFjWhMPKFGg1+uCXdQ5MrXdkgSeM7Fm8GRgRV3Eko/T+8sxa2clj9j4mbYY41m ASXF8Gxga449bpMREiVMrflkxxHV53d3hAp2DnYAoGM0T42fImn9rkcRr+KmBE5U/xJZ HyI9x6UDBt9iOrpZwXGiopEIVTEADhJkpqausy+mBbjht1N6l6gl+ewNjZFrVRyDo75R RUc6fKEAb4lGwaZamQqadKg6buiBayONTtDgkmSoU+nPVrP/+nZO27rRO3anEu3iCXJ8 lhSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=OQHdZQJiOoRXbWoY0kQWtRUmSGL6WCX6BP7p3QyGmno=; b=MSvXv24GsG6xRzKMejMHv12lhAQupkPj8hJjb4NXWng7M44Zs3Ls2u/tge08Yr5t0G DRtX60Ieh5ust0JtxcUlD6lT6wqs4pbwYuxyE0LHCWyvNQW42dItYc8VKGbeQpVEfu12 Br/DKlom57NK13fCD3Jqhp8WunMsZd3TTVvG9LRGULUNr/DVYE8JlbBidVORPo+uE3Lm pbI8z5YOwQ7ellyAKVVkHZrysHmlF7s22HuJ0UIjejY3NGBZYT0EYUeHjQxONWPjFCpc cxrqq1k0Lz5eLrVRoHw94EFEbkKuejyIO23Zn/GKAo+AasW/eQvbYzD4xktcbMptHC4B BpdA== X-Gm-Message-State: AA6/9RlUmCyWl4lNDr+AO/jMNo9VOxq81gnKDN4eVwfLGutY7LtnNJGN3Jybffn2DpYdCw== X-Received: by 10.194.85.193 with SMTP id j1mr6570000wjz.23.1476100205382; Mon, 10 Oct 2016 04:50:05 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id zz9sm39624651wjb.36.2016.10.10.04.50.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2016 04:50:04 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Mon, 10 Oct 2016 12:49:58 +0100 Message-Id: <20161010114959.18321-2-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161010114959.18321-1-chris@chris-wilson.co.uk> References: <20161010114959.18321-1-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 1/2] drm/i915: Remove self-harming shrink_all on get_pages_gtt fail X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: MichaƂ Winiarski --- drivers/gpu/drm/i915/i915_gem.c | 1 - 1 file changed, 1 deletion(-) 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);