Received: by 10.223.185.116 with SMTP id b49csp4996671wrg; Wed, 7 Mar 2018 04:49:07 -0800 (PST) X-Google-Smtp-Source: AG47ELv7zBFBeREsjL2KKxxYHbmZKGPcA/Fht9+23tf5GUNFXG55S7J8wHgOoxpRfdUYTh85WUjd X-Received: by 10.99.109.70 with SMTP id i67mr18141591pgc.190.1520426947061; Wed, 07 Mar 2018 04:49:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520426947; cv=none; d=google.com; s=arc-20160816; b=ti7dTDGhdVRSBSOuXVI8+7hCw15Rfhu6jXm03lYq/K/JjBpCHdJL8nHuYj4T6+8mYn xqI5W80381bm0JEKVUd8foUj0KIPxQIm6VdBQvjzLqyeOyhVqFXolZa0ABOJRKFRjgGx LC1N2wd+rMQIaR3rSoKKfmah9re3yrRW8wmZwwaHYbIr6UR4z0TRatsZGZgXSeG+s3/q VBSsmESm99f88Jbo3sm+zLuXkY8ANBTYy/3clWVw7HxaVeopuZ+8ON2n5aLH5QwEr0tD IFppHIWu1s2RCGa6TIMKdUVavmMi9pj+Xa6DpYRCAegaa2XjU0CnWKmXokJk9cwkVvID 1XZw== 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:arc-authentication-results; bh=3DPk5KROal8wOnvsuYziugM6zegviEJ2BdgeuUGuHfM=; b=prmrG3wVZO0/8dtTKn9sObmKupFI2KqsJYEOrTl41ywWRk7bkUAY1+mPIjbSYgFTRb 4z3oNh911l5ceMifwvKW5J1qN6X4aQGQmafdEB9xrt1s0HC8fAT6jYIivh5T7tUYzyau nl8st2Zs7iCsI9iLU924FFpvHj9BaWLvacnEft7FUllHHUijHoK/qHLhIjVECnhO8Vfx VbGJ2gIymrn4o8GWfVY0O4+CpPtYXI2GG0D8l1nrHJI0zCKZuVAGKEXNGglnbU7Q28mr 0o5QGqp3far4J3gj33dSyOT/4XCcybP+3W+7rQRm0YTE0YOvLssE269qZKp76SPobEmU 1Sjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ursulin-net.20150623.gappssmtp.com header.s=20150623 header.b=B6/SKSpP; 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 b65si11315152pgc.567.2018.03.07.04.48.52; Wed, 07 Mar 2018 04:49:07 -0800 (PST) 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=B6/SKSpP; 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 S1754359AbeCGMrh (ORCPT + 99 others); Wed, 7 Mar 2018 07:47:37 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:46651 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067AbeCGMr3 (ORCPT ); Wed, 7 Mar 2018 07:47:29 -0500 Received: by mail-wr0-f195.google.com with SMTP id m12so2017827wrm.13 for ; Wed, 07 Mar 2018 04:47:29 -0800 (PST) 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=3DPk5KROal8wOnvsuYziugM6zegviEJ2BdgeuUGuHfM=; b=B6/SKSpPmhG2T9hkBjHOUtT7PYfriH5h+QbtwkNAIhMu29k0G+nciGVqweyY23rKPR G4kmW2aGlf8+bPN/gZSA3c/ASw7LVxMWYwko7ZJrWrOQ/pAqA/z2nvwcnJZt5vtVMTM0 EWwm7gZBuGjAuidjqkjUTUn4M2bzZXsN6lNVx+DikXAqf1OhP6tfN3/vKjigUqUQFC0b 6OABzF0Vk4dHJONAC7vNn6ZRESyhWF7fveGCE9Rt44teLK8Fv1kFaoV3Pe4gIoIuGzUP ouv3qVCt67uWxzr76+YFTomHfsJlNb/3JuyP9dipMfKz/g9otM4F6uTzeIo9sD4JlTzP u5pg== 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=3DPk5KROal8wOnvsuYziugM6zegviEJ2BdgeuUGuHfM=; b=VVBcwzSKbleWJ0bKvBDSVvBpOia28g+k2RQ8o7Jbx740TU4GjqFmuSIQ9zCujD5BZ0 R60iCtlILvetvzUgtL5F77p802P2o8FQK+LcvdJV9Qxl4josL3C8q4ZUhSU8EnYmjCOO W2sDhqoC+tAQWrx7ByRPuqxhVGnLmptmyxeh93J/RwJEYypy72fIeffOYxMZrlxVYVMH n7iBXitpOxX7Gs+60NHq1lF19iZKR4zIufI5WHW1jrX6CEg7STczKBKW3hf8bLLswwZA 0E4/VxddZMPbmWYw4r7YC9cb7TotOlrtMQZJUbbrETz2I5p8ExkWPB3Vq1sbBcVvZGsu pZ8A== X-Gm-Message-State: APf1xPAMfF9uLGHe1J3zXMP1pQCqRqGbb83Fnc6L8v2AhX+bDSpIEMXN O6cvjNVIYopRdvMLlzF/aNZBBwqd X-Received: by 10.223.150.65 with SMTP id c1mr19799290wra.167.1520426848176; Wed, 07 Mar 2018 04:47:28 -0800 (PST) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id x78sm24325756wmd.2.2018.03.07.04.47.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 04:47:27 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: linux-kernel@vger.kernel.org Cc: Tvrtko Ursulin , Bart Van Assche , Hannes Reinecke , Johannes Thumshirn , Jens Axboe Subject: [PATCH 2/6] lib/scatterlist: Skip requesting zeroed allocations in sgl_alloc_order Date: Wed, 7 Mar 2018 12:47:08 +0000 Message-Id: <20180307124712.14963-3-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180307124712.14963-1-tvrtko.ursulin@linux.intel.com> References: <20180307124712.14963-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 d61c025e38b4..9884be50a2c0 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -511,8 +511,7 @@ struct scatterlist *sgl_alloc_order(unsigned long length, unsigned int order, nent++; } - sgl = kmalloc_array(nent, sizeof(struct scatterlist), - (gfp & ~GFP_DMA) | __GFP_ZERO); + sgl = kmalloc_array(nent, sizeof(struct scatterlist), (gfp & ~GFP_DMA)); if (!sgl) return NULL; -- 2.14.1