From: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>
To: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>,
Zhaoyang Huang <huangzhaoyang@gmail.com>, <ke.wang@unisoc.com>
Subject: [PATCH] mm: make __GFP_SKIP_ZERO visible to skip zero operation
Date: Thu, 31 Aug 2023 18:52:52 +0800 [thread overview]
Message-ID: <20230831105252.1385911-1-zhaoyang.huang@unisoc.com> (raw)
From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
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 <zhaoyang.huang@unisoc.com>
---
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
--
2.25.1
next reply other threads:[~2023-08-31 10:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 10:52 zhaoyang.huang [this message]
2023-08-31 12:16 ` [PATCH] mm: make __GFP_SKIP_ZERO visible to skip zero operation Matthew Wilcox
2023-09-01 10:29 ` Zhaoyang Huang
2023-09-01 12:55 ` Alexander Potapenko
2023-09-01 18:32 ` Kees Cook
2023-09-04 7:54 ` Michal Hocko
2023-09-04 17:34 ` Linus Torvalds
2023-09-04 18:22 ` Eric Biggers
2023-09-05 2:25 ` Alistair Popple
2023-09-06 14:17 ` Alexander Potapenko
2023-09-04 7:31 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230831105252.1385911-1-zhaoyang.huang@unisoc.com \
--to=zhaoyang.huang@unisoc.com \
--cc=akpm@linux-foundation.org \
--cc=huangzhaoyang@gmail.com \
--cc=ke.wang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).