All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel test robot <xiaolong.ye@intel.com>,
	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: Fri, 31 Mar 2017 09:13:40 +0200	[thread overview]
Message-ID: <0b64033c-fcf2-ace1-ceff-3e0139f75bb0@suse.cz> (raw)
In-Reply-To: <20170330154026.3ca919cf3b93da81c25724c4@linux-foundation.org>

On 03/31/2017 12:40 AM, Andrew Morton wrote:
>> > 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!
>> 
>> ...
>>
>> --- 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)) ||
> 
> The result is a bit odd:
> 
> 	free_pages = move_freepages_block(zone, page, start_type,
> 						&movable_pages);
> 	/*
> 	 * Determine how many pages are compatible with our allocation.
> 	 * For movable allocation, it's the number of movable pages which
> 	 * we just obtained. For other types it's a bit more tricky.
> 	 */
> 	if (start_type == MIGRATE_MOVABLE) {
> 		alike_pages = movable_pages;
> 	} else {
> 		/*
> 		 * If we are falling back a RECLAIMABLE or UNMOVABLE allocation
> 		 * to MOVABLE pageblock, consider all non-movable pages as
> 		 * compatible. If it's UNMOVABLE falling back to RECLAIMABLE or
> 		 * vice versa, be conservative since we can't distinguish the
> 		 * exact migratetype of non-movable pages.
> 		 */
> 		if (old_block_type == MIGRATE_MOVABLE)
> 			alike_pages = pageblock_nr_pages
> 						- (free_pages + movable_pages);
> 		else
> 			alike_pages = 0;
> 	}
> 
> 	/* moving whole block can fail due to zone boundary conditions */
> 	if (!free_pages)
> 		goto single_page;
> 
> should we do `goto single_page' as soon as the move_freepages_block()
> call fails?  

Yeah, that would be more obvious. Thanks!

      reply	other threads:[~2017-03-31  7:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22  4:36 kernel test robot
2017-03-28 12:32 ` Vlastimil Babka
2017-03-30 22:40   ` Andrew Morton
2017-03-31  7:13     ` Vlastimil Babka [this message]

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=0b64033c-fcf2-ace1-ceff-3e0139f75bb0@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 \
    --subject='Re: [lkp-robot] [mm, page_alloc] b7ef62aa8a: BUG:kernel_hang_in_boot_stage' \
    /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

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.