[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yv3r6Y1vh+6AbY4+@dhcp22.suse.cz>
Date: Thu, 18 Aug 2022 09:36:09 +0200
From: Michal Hocko <mhocko@...e.com>
To: lizhe.67@...edance.com
Cc: akpm@...ux-foundation.org, mhiramat@...nel.org, vbabka@...e.cz,
keescook@...omium.org, Jason@...c4.com, mark-pk.tsai@...iatek.com,
rostedt@...dmis.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, lizefan.x@...edance.com, yuanzhu@...edance.com
Subject: Re: [PATCH] page_ext: move up page_ext_init() to catch early page
allocation if DEFERRED_STRUCT_PAGE_INIT is n
On Mon 15-08-22 20:09:54, lizhe.67@...edance.com wrote:
> From: Li Zhe <lizhe.67@...edance.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 move up page_ext_init() to catch early page allocations when
> DEFERRED_STRUCT_PAGE_INIT is n. After this patch, we only need to turn
> DEFERRED_STRUCT_PAGE_INIT to n then we are able to analyze the early page
> allocations. This is useful especially when we find that the free memory
> value is not the same right after different kernel booting.
is this actually useful in practice? I mean who is going to disable
DEFERRED_STRUCT_PAGE_INIT and recompile the kernel for debugging early
allocations?
I do see how debugging those early allocations might be useful but that
would require a boot time option to be practical IMHO. Would it make
sense to add a early_page_ext parameter which would essentially disable
the deferred ipage initialization. That should be quite trivial to
achieve (just hook into defer_init AFAICS).
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists