From: Michal Hocko <mhocko@suse.com>
To: lizhe.67@bytedance.com
Cc: Jason@zx2c4.com, akpm@linux-foundation.org, corbet@lwn.net,
keescook@chromium.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
lizefan.x@bytedance.com, mark-pk.tsai@mediatek.com,
mhiramat@kernel.org, rostedt@goodmis.org, vbabka@suse.cz,
yuanzhu@bytedance.com
Subject: Re: [PATCH v2] page_ext: introduce boot parameter 'early_page_ext'
Date: Thu, 25 Aug 2022 08:27:52 +0200 [thread overview]
Message-ID: <YwcWaO1Z5pSRRokc@dhcp22.suse.cz> (raw)
In-Reply-To: <20220825062129.92091-1-lizhe.67@bytedance.com>
On Thu 25-08-22 14:21:29, lizhe.67@bytedance.com wrote:
> On 2022-08-24 8:09 UTC, mhocko@suse.com wrote:
[...]
> >> diff --git a/init/main.c b/init/main.c
> >> index 91642a4e69be..3760c0326525 100644
> >> --- a/init/main.c
> >> +++ b/init/main.c
> >> @@ -849,6 +849,8 @@ static void __init mm_init(void)
> >> pgtable_init();
> >> debug_objects_mem_init();
> >> vmalloc_init();
> >> + /* Should be run after vmap initialization */
> >> + page_ext_init(true);
> >
> >you can just
> > if (early_page_ext)
> > page_ext_init();
> >
> >> /* Should be run before the first non-init thread is created */
> >> init_espfix_bsp();
> >> /* Should be run after espfix64 is set up. */
> >> @@ -1606,7 +1608,7 @@ static noinline void __init kernel_init_freeable(void)
> >> padata_init();
> >> page_alloc_init_late();
> >> /* Initialize page ext after all struct pages are initialized. */
> >> - page_ext_init();
> >> + page_ext_init(false);
> >
> > if (!early_page_ext)
> > page_ext_init();
>
> I think we can use an inline function instead of 'early_page_ext' here. The
> reason is that if CONFIG_PAGE_EXTENSION=n, 'early_page_ext' is undefined.
> Thought we can #define early_page_ext as false, it is ugly.
Agreed!
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2022-08-25 6:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 6:50 lizhe.67
2022-08-24 8:09 ` Michal Hocko
2022-08-25 6:21 ` lizhe.67
2022-08-25 6:27 ` 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=YwcWaO1Z5pSRRokc@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=Jason@zx2c4.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=lizhe.67@bytedance.com \
--cc=mark-pk.tsai@mediatek.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=vbabka@suse.cz \
--cc=yuanzhu@bytedance.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