From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Mike Rapoport <rppt@kernel•org>
Cc: Su Hua <suhua.tanke@gmail•com>,
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: Tue, 29 Oct 2024 07:20:39 +1100 [thread overview]
Message-ID: <20241029072039.39d850dc@canb.auug.org.au> (raw)
In-Reply-To: <CALe3CaA9cc8fagJwA5ux6-U8mKTK=DEGU1Mb3LeCeKPrUGS5ig@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3457 bytes --]
Hi all,
On Sat, 26 Oct 2024 07:36:13 +0800 Su Hua <suhua.tanke@gmail•com> wrote:
>
> Mike Rapoport <rppt@kernel•org> 于2024年10月25日周五 16:46写道:
> >
> > 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
>
> Okay, thank you.
>
> > > 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
This has returned, so I applied by hand the above discussed fix.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-10-28 20:20 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
2024-10-25 23:36 ` Su Hua
2024-10-28 20:20 ` Stephen Rothwell [this message]
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=20241029072039.39d850dc@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=rppt@kernel$(echo .)org \
--cc=suhua.tanke@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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