mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: rientjes@google.com, hughd@google.com,
	mgorman@techsingularity.net, minchan@kernel.org,
	stable@vger.kernel.org, mm-commits@vger.kernel.org
Subject: Re: [merged] mm-compaction-abort-free-scanner-if-split-fails.patch removed from -mm tree
Date: Wed, 29 Jun 2016 12:05:09 +0200	[thread overview]
Message-ID: <aeb751a9-1ee3-d071-195f-db8775d93c00@suse.cz> (raw)
In-Reply-To: <20160629081204.GC25102@js1304-P5Q-DELUXE>

On 06/29/2016 10:12 AM, Joonsoo Kim wrote:
>> @@ -1035,8 +1034,12 @@ static void isolate_freepages(struct com
>>  			continue;
>>
>>  		/* Found a block suitable for isolating free pages from. */
>> -		isolate_freepages_block(cc, &isolate_start_pfn,
>> -					block_end_pfn, freelist, false);
>> +		isolated = isolate_freepages_block(cc, &isolate_start_pfn,
>> +						block_end_pfn, freelist, false);
>> +		/* If isolation failed early, do not continue needlessly */
>> +		if (!isolated && isolate_start_pfn < block_end_pfn &&
>> +		    cc->nr_migratepages > cc->nr_freepages)
>> +			break;
>
> Hello, David.
>
> Minchan found the bug on this patch.

Was it reported in some mail to linux-mm before the patch was sent to 
Linus, or just now?

> isolate_freepages_block() could return positive number if it is
> stopped due to memory shortage. In this case, above branch would not
> catch this situation due to positive 'isolated' and go through the

Uh, right. It could have isolated something successfully and only then 
fail to isolate some more, so isolated is non-zero. I've missed this 
corner case in review :(

> following code.
>
>   if ((cc->nr_freepages >= cc->nr_migratepages) || XXX)
>   else
>           VM_BUG_ON(isolate_start_pfn < block_end_pfn);
>
> In this case, cc->nr_freepages could be lower than cc->nr_migratepages
> and isolate_start_pfn < block_end_pfn so it triggers VM_BUG_ON().
>
> If my analysis is correct, please fix it.

David?

> Thanks.
>

  reply	other threads:[~2016-06-29 10:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <57732c58.xVgPTyhpf0KHQcpw%akpm@linux-foundation.org>
2016-06-29  8:12 ` Joonsoo Kim
2016-06-29 10:05   ` Vlastimil Babka [this message]
2016-06-30  7:34     ` Joonsoo Kim

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=aeb751a9-1ee3-d071-195f-db8775d93c00@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=minchan@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=stable@vger.kernel.org \
    /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®