From: Michal Hocko <mhocko@suse.com>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
glider@google.com, "zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
ke.wang@unisoc.com
Subject: Re: [PATCH] mm: make __GFP_SKIP_ZERO visible to skip zero operation
Date: Mon, 4 Sep 2023 09:31:51 +0200 [thread overview]
Message-ID: <ZPWH53NUqTIoDcMV@dhcp22.suse.cz> (raw)
In-Reply-To: <CAGWkznGAJVZtn49zNHsMAjRSfTRR707QXYY0m8Q+yABTsiig2Q@mail.gmail.com>
On Fri 01-09-23 18:29:07, Zhaoyang Huang wrote:
> loop alex
>
> On Thu, Aug 31, 2023 at 8:16 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Thu, Aug 31, 2023 at 06:52:52PM +0800, zhaoyang.huang wrote:
> > > 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.
> >
> > This bypasses a security feature so you're going to have to do a little
> > better than "I want it".
> Thanks for pointing this out. What I want to do is to give the user a
> way to exempt some types of pages from being zeroed, which could help
> on performance issues.
Could you be more explicit about those users? Your patch doesn't add
any.
> Could we have the most safety concern admin
> use INIT_ON_FREE while the less concerned use INIT_ON_ALLOC &
> __GFP_SKIP_ZERO as a light version method?
Are you suggesting the __GFP_SKIP_ZERO would be ignored in any setups
except for init_on_alloc?
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2023-09-04 7:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 10:52 zhaoyang.huang
2023-08-31 12:16 ` 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 [this message]
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=ZPWH53NUqTIoDcMV@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=glider@google.com \
--cc=huangzhaoyang@gmail.com \
--cc=ke.wang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
--cc=zhaoyang.huang@unisoc.com \
/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