linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>, lizhe.67@bytedance.com
Cc: mhocko@suse.com, mhiramat@kernel.org, keescook@chromium.org,
	Jason@zx2c4.com, mark-pk.tsai@mediatek.com, rostedt@goodmis.org,
	corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	lizefan.x@bytedance.com
Subject: Re: [PATCH v4] page_ext: introduce boot parameter 'early_page_ext'
Date: Fri, 26 Aug 2022 12:49:25 +0200	[thread overview]
Message-ID: <68133fc4-7034-c07b-f14b-5b4e73e04d2c@suse.cz> (raw)
In-Reply-To: <20220825212338.e541d29ca3c4d602221f4925@linux-foundation.org>


On 8/26/22 06:23, Andrew Morton wrote:
> On Thu, 25 Aug 2022 18:27:14 +0800 lizhe.67@bytedance.com wrote:
> 
>> From: Li Zhe <lizhe.67@bytedance.com>
>> 
>> In 'commit 2f1ee0913ce5 ("Revert "mm: use early_pfn_to_nid in page_ext_init"")',
>> we call page_ext_init() after page_alloc_init_late() to avoid some panic
>> problem. It seems that we cannot track early page allocations in current
>> kernel even if page structure has been initialized early.
>> 
>> This patch introduce a new boot parameter 'early_page_ext' to resolve this
>> problem. If we pass it to kernel, function page_ext_init() will be moved
>> up and feature 'deferred initialization of struct pages' will be disabled
>> to initialize the page allocator early and prevent from the panic problem
>> above. It can help us to catch early page allocations. This is useful
>> especially when we find that the free memory value is not the same right
>> after different kernel booting.
>> 
> 
> WARNING: modpost: vmlinux.o: section mismatch in reference: early_page_ext_enabled (section: .text.unlikely) -> early_page_ext (section: .meminit.data)
> WARNING: modpost: vmlinux.o: section mismatch in reference: early_page_ext_enabled (section: .text.unlikely) -> early_page_ext (section: .meminit.data)

Hm it's a very small static inline, shouldn't exist separately anywhere.
Maybe it's due to that new debug info level thing?

Would this work instead?

----8<----
diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index 884282a7f03a..4bf4e58cf2d4 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -40,7 +40,7 @@ extern bool early_page_ext;
 extern unsigned long page_ext_size;
 extern void pgdat_page_ext_init(struct pglist_data *pgdat);
 
-static inline bool early_page_ext_enabled(void)
+static inline bool __meminit early_page_ext_enabled(void)
 {
 	return early_page_ext;
 }



  parent reply	other threads:[~2022-08-26 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 10:27 lizhe.67
2022-08-25 11:18 ` Michal Hocko
2022-08-25 12:30 ` Vlastimil Babka
2022-08-26  4:23 ` Andrew Morton
2022-08-26 10:32   ` lizhe.67
2022-08-26 10:49   ` Vlastimil Babka [this message]
2022-08-29  8:18     ` lizhe.67

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=68133fc4-7034-c07b-f14b-5b4e73e04d2c@suse.cz \
    --to=vbabka@suse.cz \
    --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=mhocko@suse.com \
    --cc=rostedt@goodmis.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