Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp819159imm; Wed, 26 Sep 2018 07:17:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cqOgH8CAhS5by4gwXfm2tAxpyg3aMPixTE3F1goEn0U2sBrQy5gXN50ZINC0QDVMIFIHo X-Received: by 2002:a17:902:47c2:: with SMTP id d2-v6mr6354769plh.317.1537971452754; Wed, 26 Sep 2018 07:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537971452; cv=none; d=google.com; s=arc-20160816; b=CAGNzi4PzPMbZs7Fpw0xLhCqoIiXkSBMCuzjIinUw3mSzVc6B87C6ImWpfXiWqFuHR yCE29v9fQtfWDOioMG0V6fqchLBgoo/dNcSyD7MyatMJtRt1cguwrwtvjT7XN0I1cAk/ eTa1XNIwcwlivvt1vC5JIKoqhtZa0ZQ+EAuIdbzD9xu1Yru9FFu0rH2idaVMbhoOY2LF lEwMA/I2Zi16sp+aI/phvPK87ZTDia3p6nkdYPrWLQCwckx7HtmUM1xMhaCpQ/OwOe/r zrYLi79OqE03cFIGa0VLiQoro5d1MwRlE25hatLZhoEpc4LDcUkBHYVhk3xAExwG+8Xp x2lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=WIumTALDyRogYEoP1QrbXd8riZBSOvTxtsNvDZrDYv4=; b=p6wUljtzVc1mrDCaQZ0k4iZA6jcvMzojIzQJYjJt9vBQh9T8mQA4slZGYmXJwlk9Zf C0gm1iXqWktKoZZGWxV3YNOV/Zg0zeZ3ecDobOBrikOonyUXTgV4BQDvADLArTdxVn9z ORvnIo6KLJZ+2cyisyUWk/pzT2jlCvDr25xocgbCsevXgaGsxIjqd/BLulc6Xl8UgM7J gMehpXY459oaUB1cGZ7m5GMmq/xVxPBLv9gZQbfEPHz0DZ+w8BFvAyH+ymjArKjuN/ZQ 7UzkTNszAt0FuzVXBolgaQxZ2XwJwuTU8pI9ee+9f5Y1aDLM9YqWQKOu8K4z81Md3nD1 TFBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ursulin-net.20150623.gappssmtp.com header.s=20150623 header.b=JPT2SYaG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33-v6si5517561pld.180.2018.09.26.07.17.10; Wed, 26 Sep 2018 07:17:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ursulin-net.20150623.gappssmtp.com header.s=20150623 header.b=JPT2SYaG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727832AbeIZU3u (ORCPT + 99 others); Wed, 26 Sep 2018 16:29:50 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36227 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727587AbeIZU3s (ORCPT ); Wed, 26 Sep 2018 16:29:48 -0400 Received: by mail-wr1-f66.google.com with SMTP id l10-v6so4057907wrp.3 for ; Wed, 26 Sep 2018 07:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WIumTALDyRogYEoP1QrbXd8riZBSOvTxtsNvDZrDYv4=; b=JPT2SYaGDJQAdW8qCCI8Q9jEFGBDA7j4NZjDU8Ytj4xtkDL2e1US6yb833ZTNryyV4 uZGZ+6YCeZTD1TRG/8K8lBpIULoeZLsTrqhMbwD9dvqiIHm98yL/J6Hu6R9k3FPfmQ7N ZY4RIAESLsO/WCcw3axTQD6eoa4KrPViyEVRHBFUM2Gjos3zzcaBLCVwD423Drsq8ca4 8TDBM1FvCGsAg2mG1+DhAICJjritQCkds3oMx40HBpUmt1v3pslJqcdtnZ+oR94Wab+a XwDVHlbIEmgZbmD7373qqUN38XqiKhW6vwzUrtQoLr9rHjvM4CcMxtarAfLdvPAMx1fv cwxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WIumTALDyRogYEoP1QrbXd8riZBSOvTxtsNvDZrDYv4=; b=hP6zS3bndxCN+iSpkTbZ8sw+MC3noP6UCgUTu/psCACQsCSHDeG8zYAA+foEctjeKq Gw2/ZnHXrNL0URATmRoIARkPSKrD4fZd0qinTtpXmOWjqcTxHjiUhuQu6tWNWdTBHZSu 5RLftQGETxqf1REppwJj1VS7twSqZZeZCDSPeJ0Y8Vs1ydQB0N6+rJB3yC/066kR0GsQ we8GhyoQjQlMO8VuwVrpiL11KA5A2e+dAvrwy8VbQDSbSD5r6zVjNyRIldReTyIszH3s vNEi+lUgJVhQ2VY1Iy4bLWtgYvYUfWZzYVDdgQNcUQRSgJ3TKfumbHuzKnW6TEnFei8x adcA== X-Gm-Message-State: ABuFfogs0G5b9ISxMYBL4hmFmjiqGB5OLEJi0XC4nDnJtVnH0tM5jRTY UFxxlQvoYuexD/VqgjGgntaMh4BquAA= X-Received: by 2002:adf:ef47:: with SMTP id c7-v6mr5262742wrp.182.1537971397006; Wed, 26 Sep 2018 07:16:37 -0700 (PDT) Received: from localhost.localdomain ([95.144.165.37]) by smtp.gmail.com with ESMTPSA id v14-v6sm3209974wmh.41.2018.09.26.07.16.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 07:16:36 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: linux-kernel@vger.kernel.org Cc: tursulin@ursulin.net, tvrtko.ursulin@linux.intel.com, Tvrtko Ursulin , Bart Van Assche , Hannes Reinecke , Johannes Thumshirn , Jens Axboe Subject: [PATCH 3/6] lib/scatterlist: Skip requesting zeroed allocations in sgl_alloc_order Date: Wed, 26 Sep 2018 15:16:22 +0100 Message-Id: <20180926141625.17727-4-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926141625.17727-1-tvrtko.ursulin@linux.intel.com> References: <20180926141625.17727-1-tvrtko.ursulin@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tvrtko Ursulin sg_init_table will clear the allocated block so requesting zeroed memory from the allocator is redundant. Signed-off-by: Tvrtko Ursulin Cc: Bart Van Assche Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Jens Axboe --- lib/scatterlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 23e53dce897d..3cc01cd82242 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -495,8 +495,7 @@ struct scatterlist *sgl_alloc_order(unsigned long length, unsigned int order, return NULL; nalloc++; } - sgl = kmalloc_array(nalloc, sizeof(struct scatterlist), - (gfp & ~GFP_DMA) | __GFP_ZERO); + sgl = kmalloc_array(nalloc, sizeof(struct scatterlist), gfp & ~GFP_DMA); if (!sgl) return NULL; -- 2.17.1