From patchwork Fri Jun 22 23:33:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mandeep Singh Baines X-Patchwork-Id: 9585 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9FE9F23E55 for ; Fri, 22 Jun 2012 23:33:24 +0000 (UTC) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by fiordland.canonical.com (Postfix) with ESMTP id 5345BA188FE for ; Fri, 22 Jun 2012 23:33:24 +0000 (UTC) Received: by yhjj63 with SMTP id j63so2370906yhj.37 for ; Fri, 22 Jun 2012 16:33:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :date:message-id:x-mailer:cc:subject:x-beenthere:x-mailman-version :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=Q8pS6gELsvbMR0qQgB71DnqdxJRqNr9p129fgZAHHVo=; b=TnZcsHJFAkcxWp40cac4pCbwuzsy7IQLCKsOckiPRZRFOoFZgQ/pHNYM7JXN1CRkJd 5GD/o2gLUyV9KdJbWF3vOcGqpPBEL3sIzPcc2YhhFBobu3zWLO2pcIXQNLc43TRtxahw TVZScK6yEVYyZ1a3N6QU5gvItYqq/4ftkIXOmv7B5qt9TWTnRiBhlia7jkXqCoBLv8PB 5GkdSdKgM05SjKql6oWMQq5+jX0VXMKDVHoRD8FlonU2/+cyyEZvwux1018QgqkKfqRT ewL7VJ52bH8qz9004yfVGEIoMs+EoOZVF9GTga22Xy00qKU8KaipY7JOb3eGl0XMDRMY WDsg== Received: by 10.50.203.39 with SMTP id kn7mr3105534igc.53.1340408003573; Fri, 22 Jun 2012 16:33:23 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp89373ibb; Fri, 22 Jun 2012 16:33:22 -0700 (PDT) Received: by 10.180.106.137 with SMTP id gu9mr7987279wib.20.1340408001826; Fri, 22 Jun 2012 16:33:21 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id cj2si1578849wib.10.2012.06.22.16.33.20; Fri, 22 Jun 2012 16:33:21 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SiDLn-00074b-DS; Fri, 22 Jun 2012 23:33:15 +0000 Received: from mail-we0-f202.google.com ([74.125.82.202]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SiDLm-00074D-0L for linaro-mm-sig@lists.linaro.org; Fri, 22 Jun 2012 23:33:14 +0000 Received: by weyu7 with SMTP id u7so132867wey.1 for ; Fri, 22 Jun 2012 16:33:13 -0700 (PDT) Received: by 10.14.27.203 with SMTP id e51mr943405eea.12.1340407993690; Fri, 22 Jun 2012 16:33:13 -0700 (PDT) Received: by 10.14.27.203 with SMTP id e51mr943382eea.12.1340407993491; Fri, 22 Jun 2012 16:33:13 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id b16si29876327eeg.3.2012.06.22.16.33.13 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 22 Jun 2012 16:33:13 -0700 (PDT) Received: from msb.mtv.corp.google.com (msb.mtv.corp.google.com [172.22.72.160]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id 4B5505C0060; Fri, 22 Jun 2012 16:33:13 -0700 (PDT) Received: by msb.mtv.corp.google.com (Postfix, from userid 55285) id 945802460FE; Fri, 22 Jun 2012 16:33:12 -0700 (PDT) From: Mandeep Singh Baines To: linux-kernel@vger.kernel.org Date: Fri, 22 Jun 2012 16:33:10 -0700 Message-Id: <1340407990-5122-1-git-send-email-msb@chromium.org> X-Mailer: git-send-email 1.7.7.3 Cc: Jens Axboe , Inki Dae , Cong Wang , dri-devel@lists.freedesktop.org, Rob Clark , linaro-mm-sig@lists.linaro.org, Paul Gortmaker , Dave Airlie , Olof Johansson , Sonny Rao Subject: [Linaro-mm-sig] [PATCH] lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQkIjewqXja75x/NYXh93nyT8xp3rZ2LGHpfrQk08Of0znfhtzICwm10CQmIxfWrkFyge1T2 We are seeing a lot of sg_alloc_table allocation failures using the new drm prime infrastructure. We isolated the cause to code in __sg_alloc_table that was re-writing the gfp_flags. There is a comment in the code that suggest that there is an assumption about the allocation coming from a memory pool. This was likely true when sg lists were primarily used for disk I/O. Change-Id: I459169f56e4a9aa859661b22ec9d4e6925f99e85 Signed-off-by: Mandeep Singh Baines Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: Jens Axboe Cc: Paul Gortmaker Cc: Cong Wang Cc: Daniel Vetter Cc: Rob Clark Cc: Sumit Semwal Cc: Inki Dae Cc: Dave Airlie Cc: Sonny Rao Cc: Olof Johansson --- lib/scatterlist.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 6096e89..d09bdd8 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -279,14 +279,6 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents, if (!left) sg_mark_end(&sg[sg_size - 1]); - /* - * only really needed for mempool backed sg allocations (like - * SCSI), a possible improvement here would be to pass the - * table pointer into the allocator and let that clear these - * flags - */ - gfp_mask &= ~__GFP_WAIT; - gfp_mask |= __GFP_HIGH; prv = sg; } while (left);