From: Mike Rapoport <rppt@kernel.org>
To: Su Hua <suhua.tanke@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: boot failure after merge of the memblock tree
Date: Fri, 25 Oct 2024 11:42:14 +0300 [thread overview]
Message-ID: <ZxtZ5q5HH-gu0zeQ@kernel.org> (raw)
In-Reply-To: <CALe3CaDW9vWcrukmWP+tj-ToSUh8p6==goL+B3aiGvxBDg79Ww@mail.gmail.com>
On Fri, Oct 25, 2024 at 04:33:16PM +0800, Su Hua wrote:
> Su Hua <suhua.tanke@gmail.com> 于2024年10月25日周五 16:19写道:
> >
> > Appreciate everyone.
> >
> > Mike Rapoport <rppt@kernel.org> 于2024年10月25日周五 14:57写道:
> > >
> > > Hi Stephen,
> > >
> > > On Tue, Oct 22, 2024 at 05:39:21PM +1100, Stephen Rothwell wrote:
> > > > Hi all,
> > > >
> > > > After merging the memblock tree, today's linux-next build
> > > > (powerpc_pseries_le_defconfig) failed my qemu boot test like this:
> > > >
> > > > Kernel panic - not syncing: Attempted to kill the idle task!
> > > >
> > > > Caused by commit
> > > >
> > > > ad48825232a9 ("memblock: uniformly initialize all reserved pages to MIGRATE_MOVABLE")
> > > >
> > > > I bisected the failure to this commit and have reverted it for today.
> > >
> > > Apparently set_pfnblock_flags_mask() is unhappy when called for
> > > uninitialized struct page. With the patch below
> > >
> > > qemu-system-ppc64el -M pseries -cpu power10 -smp 16 -m 32G -vga none -nographic -kernel $KERNEL
> > >
> > > boots up to mounting root filesystem.
> > >
> > > diff --git a/mm/mm_init.c b/mm/mm_init.c
> > > index 49dbd30e71ad..2395970314e7 100644
> > > --- a/mm/mm_init.c
> > > +++ b/mm/mm_init.c
> > > @@ -723,10 +723,10 @@ static void __meminit init_reserved_page(unsigned long pfn, int nid)
> > > break;
> > > }
> > >
> > > + __init_single_page(pfn_to_page(pfn), pfn, zid, nid);
> > > +
> > > if (pageblock_aligned(pfn))
> > > set_pageblock_migratetype(pfn_to_page(pfn), MIGRATE_MOVABLE);
> > > -
> > > - __init_single_page(pfn_to_page(pfn), pfn, zid, nid);
> >
> > Indeed, when #ifdef NODE_NOT_IN_PAGE_FLAGS is defined, there is no
> > problem, and this is why my
> > test environment did not reveal any issues. However, when
> > NODE_NOT_IN_PAGE_FLAGS is not defined,
> > page_to_nid needs to use page->flags to get the node ID, which depends
> > on __init_single_page for initialization.
>
> Hi Mike
> Could you please advise whether the fix for this issue should be
> submitted by you or me
> as a new patch, or should I submit a patch that adjusts the code
> position, just like this:
I've folded the update into your original commit, it's now in for-next
branch of memblock tree
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 4ba5607aaf19..5a8114fb02ae 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -723,6 +723,9 @@ static void __meminit init_reserved_page(unsigned
> long pfn, int nid)
> break;
> }
> __init_single_page(pfn_to_page(pfn), pfn, zid, nid);
> +
> + if (pageblock_aligned(pfn))
> + set_pageblock_migratetype(pfn_to_page(pfn), MIGRATE_MOVABLE);
> }
> #else
>
> Sincerely yours,
> Su
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2024-10-25 8:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 6:39 linux-next: boot failure after merge of the memblock tree Stephen Rothwell
2024-10-23 3:20 ` Su Hua
2024-10-23 22:23 ` Stephen Rothwell
2024-10-24 3:18 ` Su Hua
2024-10-25 6:53 ` Mike Rapoport
2024-10-25 8:19 ` Su Hua
2024-10-25 8:33 ` Su Hua
2024-10-25 8:42 ` Mike Rapoport [this message]
2024-10-25 23:36 ` Su Hua
2024-10-28 20:20 ` Stephen Rothwell
2024-10-29 7:15 ` Mike Rapoport
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=ZxtZ5q5HH-gu0zeQ@kernel.org \
--to=rppt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=suhua.tanke@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.