From: Vlastimil Babka <vbabka@suse.cz>
To: kernel test robot <xiaolong.ye@intel.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Mel Gorman <mgorman@techsingularity.net>,
Johannes Weiner <hannes@cmpxchg.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
David Rientjes <rientjes@google.com>,
LKML <linux-kernel@vger.kernel.org>,
lkp@01.org
Subject: Re: [lkp-robot] [mm, page_alloc] b7ef62aa8a: BUG:kernel_hang_in_boot_stage
Date: Tue, 28 Mar 2017 14:32:29 +0200 [thread overview]
Message-ID: <59d71b35-d556-4fc9-ee2e-1574259282fd@suse.cz> (raw)
In-Reply-To: <20170322043611.GJ26669@yexl-desktop>
On 03/22/2017 05:36 AM, kernel test robot wrote:
>
> FYI, we noticed the following commit:
>
> commit: b7ef62aa8a7aebb156ce093e3215fb821426fc1b ("mm, page_alloc: split smallest stolen page in fallback")
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
>
> in testcase: boot
>
> on test machine: qemu-system-x86_64 -enable-kvm -m 512M
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
> +------------------------------------------------------------------+------------+------------+
> | | f7b7744467 | b7ef62aa8a |
> +------------------------------------------------------------------+------------+------------+
> | boot_successes | 0 | 0 |
> | boot_failures | 4 | 4 |
> | invoked_oom-killer:gfp_mask=0x | 4 | |
> | Mem-Info | 4 | |
> | Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 4 | |
> | BUG:kernel_hang_in_boot_stage | 0 | 4 |
> +------------------------------------------------------------------+------------+------------+
>
>
>
> [ 2.398650] BTRFS: selftest: Running find delalloc tests
> [ 2.413373] tsc: Refined TSC clocksource calibration: 2260.994 MHz
> [ 2.414891] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x209745a29ae, max_idle_ns: 440795217760 ns
>
> Elapsed time: 460
> BUG: kernel hang in boot stage
Thanks, I was able to reproduce and debug this.
Andrew, please apply the following -fix. There will be conflicts on later
patches, but with trivial resolution (pages -> free_pages). Thanks!
----8<----
commit 20a10571d2b020a3e0dee7ff236dadf4efe23026
Author: Vlastimil Babka <vbabka@suse.cz>
Date: Tue Mar 28 14:17:08 2017 +0200
mm, page_alloc: split smallest stolen page in fallback-fix
The lkp-robot reported a test case stuck on boot due to the patch [1] which
was due to endless loop in the modified __rmqueue(). It blindly expected that
move_freepages_block() will succeed, but that can fail due to last pageblock
pfn not belonging to the same zone as the fallback candidate page.
This fix checks the result of move_freepages_block() and steals the single
candidate page if it fails, which was also effectively done before [1].
[1] mmotm: mm-page_alloc-split-smallest-stolen-page-in-fallback.patch
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index fd7f865320c5..664cf85c51a3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1977,6 +1977,9 @@ static void steal_suitable_fallback(struct zone *zone, struct page *page,
goto single_page;
pages = move_freepages_block(zone, page, start_type);
+ /* moving whole block can fail due to zone boundary conditions */
+ if (!pages)
+ goto single_page;
/* Claim the whole block if over half of it is free */
if (pages >= (1 << (pageblock_order-1)) ||
next prev parent reply other threads:[~2017-03-28 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 4:36 [lkp-robot] [mm, page_alloc] b7ef62aa8a: BUG:kernel_hang_in_boot_stage kernel test robot
2017-03-28 12:32 ` Vlastimil Babka [this message]
2017-03-30 22:40 ` Andrew Morton
2017-03-31 7:13 ` Vlastimil Babka
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=59d71b35-d556-4fc9-ee2e-1574259282fd@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mgorman@techsingularity.net \
--cc=rientjes@google.com \
--cc=sfr@canb.auug.org.au \
--cc=xiaolong.ye@intel.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