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: 137278 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c792:0:b0:3f2:4152:657d with SMTP id b18csp175089vqu; Thu, 31 Aug 2023 04:29:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjjgh+4vzrKvbANOHZGQaLKbOiCZOVecbotE+aHWIfL+VSFHTEzBaPDSWTasv0tKCRIY+w X-Received: by 2002:a2e:9cc2:0:b0:2bc:d6d8:8ab5 with SMTP id g2-20020a2e9cc2000000b002bcd6d88ab5mr3429907ljj.24.1693481346157; Thu, 31 Aug 2023 04:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693481346; cv=none; d=google.com; s=arc-20160816; b=mVrixQm3UNIS9TcXOa5AKb2QRLSHWHBH+HqMYMwWoe3ec0cESzlKmRxVmp7cwP7gbJ KK4gcIawAOrz8hBxJFElrhGn3kmL0/9l1VdPLGjaF+Ak1g7SHmmA5GgxpMSyckPuvYxO 0YiHpKIPKt3PDKKYnAq0fzICPy7e496Gl0+m4wv1ntdZ95NJbz+9pP+5pzzho+o9OnpC a3mh/AH2Pa5cm0gWq1H7m3rYAvialB8TwqrnsqmCMkL2mLF6Ery2lRs3734I7YPNhPN0 5y1oT8zgVMTHU5/SJB2Rer1Cd78yfZKqpkbCUbQIAkVf/dJrWTIspvB90QsNIxT20KYf oTvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=fK2fT+0mQtiDAVOV8hsOZi/uO3FFLX/np81eLTjWBdo=; fh=qHlexhjWvVJsRpKSkuwqQGwTFBTL3i13+DIQuUhRsxM=; b=IYJo5VA8vsQuU/XZq1qanEt8LREOQu1kXupmpfsJvkwQQr3kOhTS8NaCKrZi/tIU0r dRG/PzBjwL2eksmH6LkVxa64lW7eoTYMbxA1R9LzIfp3uL6Hc6MdvKozoUU2prDu7K5O +6O43JavAeS4b8t5pCMiJqj1kb3WQteF8MclhBzpAfDOk0GKOqfBWtv7FUiZUrXtMeIq JBVWhZuFeuZRwRcUpZjUpDgOwTxFT/E/SycCUFvQVsHX2xnNIRdGrBxXPxnlDXvf1tUA vvP3ChTM/5kOpIXu4IKXwdRrE9WqVPljM62ZTAilErTlfcu4yoOuaCn5JmthH3J55Fg9 VQgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rn18-20020a170906d93200b0099317a3240esi832115ejb.396.2023.08.31.04.28.39; Thu, 31 Aug 2023 04:29:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242971AbjHaKx4 (ORCPT + 99 others); Thu, 31 Aug 2023 06:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbjHaKxz (ORCPT ); Thu, 31 Aug 2023 06:53:55 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6679ECF4 for ; Thu, 31 Aug 2023 03:53:51 -0700 (PDT) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775743896032001351 X-GMAIL-MSGID: 1775743896032001351 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