mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: 758910018 <758910018@qq.com>, Helge Deller <deller@gmx.de>
Cc: Zhenghui Hao <zhenghui.hao@qq.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	linux-parisc <linux-parisc@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] init, hugetlb: fix early parameter ordering
Date: Thu, 17 Sep 2026 12:21:00 +0300	[thread overview]
Message-ID: <aquw_N_dSUDy2o1G@kernel.org> (raw)
In-Reply-To: <tencent_B4700AD229B1E6D517FC751924185FD3BB07@qq.com>

(cc Helge)

And please don't post on the Linux kernel mailing lists!

On Thu, Sep 17, 2026 at 04:53:49PM +0800, 758910018 wrote:
> Hi,
> 
> > Since parisc is one of very few architectures that does not call
> > parse_early_param() from setup_arch(), I think an easier fix would be
> > local to parisc.
> 
> Agreed, that is simpler.
> 
> Whether a fix is needed at all depends on the answer to your second
> question.  If hugetlb is not needed on parisc anymore, there is nothing
> left to fix and I will drop this series.  If it stays, I will send v2
> with the change inside parisc's setup_arch(), keeping 2/2 so that the
> same kind of ordering problem would at least show up in the log.
> 
> So I will wait for the parisc maintainers on that one.
> 
> Thanks,
> Zhenghui
> 
> 
> ---Original---
> From: "Mike Rapoport"<rppt@kernel.org>
> Date: Thu, Sep 17, 2026 15:41 PM
> To: "Zhenghui Hao"<zhenghui.hao@qq.com>;
> Cc: "Andrew Morton"<akpm@linux-foundation.org>;"linux-mm"<linux-mm@kvack.org>;
> "linux-parisc"<linux-parisc@vger.kernel.org>;"linux-kernel"
> <linux-kernel@vger.kernel.org>;
> Subject: [PATCH 0/2] init, hugetlb: fix early parameter ordering
> 
> Hi,
> 
> On 2026-09-17 14:55 +0800, Zhenghui Hao wrote:
> > hugetlb records its command line parameters from early_param()
> > handlers and consumes them later from hugetlb_bootmem_alloc().
> > 
> > Commit d49004c5f0c1 ("arch, mm: consolidate initialization of nodes,
> > zones and memory map") moved that consumer into mm_core_init_early(),
> > which runs before the generic parse_early_param() call in
> > start_kernel().  Architectures that call parse_early_param() from
> > setup_arch() are not affected, but on parisc the parameters are then
> > recorded after they have already been consumed and are silently
> > dropped.
> 
> Since parisc is one of very few architectures that does not call
> parse_early_param() from setup_arch(), I think an easier fix would be
> local to parisc.
> 
> And there is another related question more to parisc maintainers: do we
> really need hugetlb on parisc these days?
> 
> > Patch 1/2 moves parse_early_param() before mm_core_init_early(),
> > together with jump_label_init() and static_call_init() so that the
> > "parameters may set static keys" guarantee still holds.
> > 
> > Patch 2/2 makes this class of ordering problem non-silent.  It cannot
> > fire once 1/2 is applied; if you would rather take only the fix,
> > please drop 2/2.
> > 
> > Not tested on parisc hardware.
> > 
> > Zhenghui Hao (2):
> >   init: parse early parameters before memory initialization
> >   hugetlb: report cmdline parameters recorded too late
> > 
> >  init/main.c  |  8 ++++----
> >  mm/hugetlb.c | 14 ++++++++++++++
> >  2 files changed, 18 insertions(+), 4 deletions(-)
> > 
> > 
> > base-commit: 9b87fdc9af2fbfcdb5c24a64139685ef80f6573f
> > -- 
> > 2.53.0
> > 
> > 
> 

-- 
Sincerely yours,
Mike.

  parent reply	other threads:[~2026-09-17  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260917062837.558251-1-zhenghui.hao@qq.com>
2026-09-17  6:28 ` [PATCH 1/2] init: parse early parameters before memory initialization Zhenghui Hao
2026-09-17  6:28 ` [PATCH 2/2] hugetlb: report cmdline parameters recorded too late Zhenghui Hao
2026-09-17  6:55 ` [PATCH 0/2] init, hugetlb: fix early parameter ordering Zhenghui Hao
2026-09-17  7:41   ` Mike Rapoport
2026-09-17  9:19     ` zhenghui.hao
2026-09-17  9:45       ` Mike Rapoport
     [not found]     ` <tencent_B4700AD229B1E6D517FC751924185FD3BB07@qq.com>
2026-09-17  9:21       ` Mike Rapoport [this message]
     [not found] ` <20260917065600.564083-1-zhenghui.hao@qq.com>
2026-09-17  6:55   ` [PATCH 1/2] init: parse early parameters before memory initialization Zhenghui Hao
2026-09-17  6:55   ` [PATCH 2/2] hugetlb: report cmdline parameters recorded too late Zhenghui Hao
2026-09-17  6:28 [PATCH 0/2] init, hugetlb: fix early parameter ordering Zhenghui Hao

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=aquw_N_dSUDy2o1G@kernel.org \
    --to=rppt@kernel.org \
    --cc=758910018@qq.com \
    --cc=akpm@linux-foundation.org \
    --cc=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=zhenghui.hao@qq.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

all inboxes | Powered by JetHome®