From patchwork Thu Aug 31 10:52:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "zhaoyang.huang" X-Patchwork-Id: 13371333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED86DC83F12 for ; Thu, 31 Aug 2023 10:53:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE4018E0015; Thu, 31 Aug 2023 06:53:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E94B68D0001; Thu, 31 Aug 2023 06:53:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D82F08E0015; Thu, 31 Aug 2023 06:53:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C8A5B8D0001 for ; Thu, 31 Aug 2023 06:53:45 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 99988A020F for ; Thu, 31 Aug 2023 10:53:45 +0000 (UTC) X-FDA: 81184089210.08.35C78BE Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by imf03.hostedemail.com (Postfix) with ESMTP id D290F20016 for ; Thu, 31 Aug 2023 10:53:42 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693479224; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=fK2fT+0mQtiDAVOV8hsOZi/uO3FFLX/np81eLTjWBdo=; b=KOnaz61OOkI/asItWFxgnTyY3JWsa9OCeas6BTDJd08VNd4Y9OlsedL/0JTVTA7AmlchzC XUY4tMCtZXLK/e8MpcrMtNrT9++XdORvQ59tqW5IwR5M2CMRsP7t83g12SNOZr6DuT5y2s XW4Ra7YL3jY/PEnKl59EIg64gQjgyts= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693479224; a=rsa-sha256; cv=none; b=VTsp4oOm/MORspSHYVJHMUaF3iMYG55rI4DWXV2dhClcUFBRd1UxAx4RnHHvvjEfPkIS1y HCi3CpX1NcONS1YliRDWrMapglkUiZ1pTDg/UMgFYSKO+o1mElDMAmqpX7OGCm4zM5KR9j INPbahx9PmKVozrTPjZAVUPvix4N+hM= Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 37VAqug1084419; Thu, 31 Aug 2023 18:52:56 +0800 (+08) (envelope-from zhaoyang.huang@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4Rbyc93TmSz2QxHbp; Thu, 31 Aug 2023 18:50:17 +0800 (CST) Received: from bj03382pcu01.spreadtrum.com (10.0.73.40) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 31 Aug 2023 18:52:55 +0800 From: "zhaoyang.huang" To: Andrew Morton , , , Zhaoyang Huang , Subject: [PATCH] mm: make __GFP_SKIP_ZERO visible to skip zero operation Date: Thu, 31 Aug 2023 18:52:52 +0800 Message-ID: <20230831105252.1385911-1-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.0.73.40] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 37VAqug1084419 X-Rspam-User: X-Stat-Signature: bw9oxenm6hppkyp3phksi1opwekxwpx7 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D290F20016 X-HE-Tag: 1693479222-41930 X-HE-Meta: U2FsdGVkX1+Jpi0sVBQbpueN8cQ9+sIZ05KIz1wpoHB5VoR3gw+4xuhHIp+x4wfvNbHzZkvZLL5r3+HdXWactzuUrnb3LULBYHX/KAnofet2neF2OJuBaxCXNSgFwQCQ/Jmc7Mze1hsQC0fmU0wgpwjbgv2Gsg8zIFXgXj8Oh3mZwDMDaLxrNwhlRasjaXtiZ+9ynCMH5m8OUOd7gNHy714M98Nl5Lex6utxQLHU3EJG4nOLRUzq46ZP8q+SViYW/AB/NrE7oGC7RGwMffW2y51Qp8m/P/NYPr6iq3E9lFsBv4fvCvft6uRTtWtZNQ/yPWECNotpIR6N+AyCHSwFzt59PAGFs63cL8Qm6y4v612x/vP8Rt3iht1SbmI7l+bhvTU0h1Ya0xNglurqHMO1rAETkVwUBLu74umwhKDngGDTHVhl58Fz6QsFfj4rEIcf0BhNQKoIG3dIwrYj+BglrVsv5dZ/7ivD9pAuUklrThc/bdRIolehEcu1GbEqp7gYYEtum8He6QVy1FO1Mfuv4pUIam3uATPtEvAkZg2/dfFw+RkdO4FGl0WjTwVwf7pm/vvrAgflDvocoleWg/qnLs+P6dGupzBMpOf2/Zq/1QraTLyrplnz0/SQhJ0z54ultv1gX7c7/ScgJ4J+XRsDdkNdMYX/eepYK1fHG9zMPH1YdtYAePDWnHQ2ejiV/bqNU95fI7wlqa09HKIKGQgB39sffwiBx4DyoaIO71Z6PfsOmNZN2tAD4i64midhxkg849PXIbmuFy2DDnD8UmrcJvmOJU93KVpdRf+sEIvuWTpCzJD154NYIOZDi5rtnJNgYmRnyZXT7QaSIldNwH95uI0c3ph8p6zvnS6PfyL/Fww9Q3RCCkzzU6b4zkoJN7lPSNqnGf1cHboLdGAbemmkjWJGjMNOthe7nYD3cHIghEEufJt7FaG93mNlcrs5XAg28iSlOQBbgUcVY4p92Q+ G5WnSOA/ Sggncf57PeLTG7IWd1zMQwtPH14vqPtBXjbjV/6BiQpSp68rnvRA2LfMtXGcwMB82gJPsWuFCw2xYxq2MVAH3Y+iu6O2crmkCNs+0/n86qNzeUC/n/yAPvBZFUwxi8pk5Tq3j9T5J8qD1uEQ43Fiygrrd5nrgTXWIhnSfOUjnDqhKF/uE6W/DWCvszxpl9zddITdTwuBmbqIXLTuR9CQR9VSQcwEMHGGpchFlfs/FptP2uRwKpB88WA8KMDPPho2TjJgdEuF2a/p+NukQmjRlOsR2UiljqnELgxyg02znSdaSwnQ7jxAjYjdxhEPeJvS7wOFKVkuEPBmk2dY1AEjrDkBj2wAmw8QTVvhvS7Ltm6U+swgYf1B5DWrh7SajUeMxSEoPhV6dEioCVMw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Zhaoyang Huang There is no explicit gfp flags to let the allocation skip zero operation when CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y. I would like to make __GFP_SKIP_ZERO be visible even if kasan is not configured. Signed-off-by: Zhaoyang Huang --- include/linux/gfp_types.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 include/linux/gfp_types.h diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h old mode 100644 new mode 100755 index d88c46ca82e1..4e9d50bba269 --- a/include/linux/gfp_types.h +++ b/include/linux/gfp_types.h @@ -46,12 +46,11 @@ typedef unsigned int __bitwise gfp_t; #define ___GFP_THISNODE 0x200000u #define ___GFP_ACCOUNT 0x400000u #define ___GFP_ZEROTAGS 0x800000u +#define ___GFP_SKIP_ZERO 0x1000000u #ifdef CONFIG_KASAN_HW_TAGS -#define ___GFP_SKIP_ZERO 0x1000000u #define ___GFP_SKIP_KASAN_UNPOISON 0x2000000u #define ___GFP_SKIP_KASAN_POISON 0x4000000u #else -#define ___GFP_SKIP_ZERO 0 #define ___GFP_SKIP_KASAN_UNPOISON 0 #define ___GFP_SKIP_KASAN_POISON 0 #endif