All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <yasu.isimatu@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	zhongjiang@huawei.com, Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: skip if required_kernelcore is larger than totalpages
Date: Wed, 14 Oct 2015 11:28:57 +0800	[thread overview]
Message-ID: <561DCBF9.4050000@huawei.com> (raw)
In-Reply-To: <561DC30C.70909@cn.fujitsu.com>

On 2015/10/14 10:50, Tang Chen wrote:

> Hi, Qiu
> 
> The patch seems OK to me. Only one little concern below.
> 
> On 10/12/2015 09:37 AM, Xishi Qiu wrote:
>> On 2015/10/9 23:41, Yasuaki Ishimatsu wrote:
>>
>>> On Thu, 8 Oct 2015 10:21:05 +0800
>>> Xishi Qiu <qiuxishi@huawei.com> wrote:
>>>
>>>> If kernelcore was not specified, or the kernelcore size is zero
>>>> (required_movablecore >= totalpages), or the kernelcore size is larger
>>> Why does required_movablecore become larger than totalpages, when the
>>> kernelcore size is zero? I read the code but I could not find that you
>>> mention.
>>>
>> If user only set boot option movablecore, and the value is larger than
>> totalpages, the calculation of kernelcore is zero, but we can't fill
>> the zone only with kernelcore, so skip it.
>>
>> I have send a patch before this patch.
>> "fix overflow in find_zone_movable_pfns_for_nodes()"
>>         ...
>>           required_movablecore =
>>               roundup(required_movablecore, MAX_ORDER_NR_PAGES);
>> +        required_movablecore = min(totalpages, required_movablecore);
>>           corepages = totalpages - required_movablecore;
>>         ...
> 
> 
> So if required_movablecore >= totalpages, there won't be any ZONE_MOVABLE.
> How about add a warning or debug info to tell the user he has specified a
> too large movablecore, and it is ignored ?
> 
> Thanks.

Yes, but I don't think is is necessary, user should know the total memory
before he set the boot option.

Thanks,
Xishi Qiu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <yasu.isimatu@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Mel Gorman <mgorman@suse.de>,
	"David Rientjes" <rientjes@google.com>, <zhongjiang@huawei.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: skip if required_kernelcore is larger than totalpages
Date: Wed, 14 Oct 2015 11:28:57 +0800	[thread overview]
Message-ID: <561DCBF9.4050000@huawei.com> (raw)
In-Reply-To: <561DC30C.70909@cn.fujitsu.com>

On 2015/10/14 10:50, Tang Chen wrote:

> Hi, Qiu
> 
> The patch seems OK to me. Only one little concern below.
> 
> On 10/12/2015 09:37 AM, Xishi Qiu wrote:
>> On 2015/10/9 23:41, Yasuaki Ishimatsu wrote:
>>
>>> On Thu, 8 Oct 2015 10:21:05 +0800
>>> Xishi Qiu <qiuxishi@huawei.com> wrote:
>>>
>>>> If kernelcore was not specified, or the kernelcore size is zero
>>>> (required_movablecore >= totalpages), or the kernelcore size is larger
>>> Why does required_movablecore become larger than totalpages, when the
>>> kernelcore size is zero? I read the code but I could not find that you
>>> mention.
>>>
>> If user only set boot option movablecore, and the value is larger than
>> totalpages, the calculation of kernelcore is zero, but we can't fill
>> the zone only with kernelcore, so skip it.
>>
>> I have send a patch before this patch.
>> "fix overflow in find_zone_movable_pfns_for_nodes()"
>>         ...
>>           required_movablecore =
>>               roundup(required_movablecore, MAX_ORDER_NR_PAGES);
>> +        required_movablecore = min(totalpages, required_movablecore);
>>           corepages = totalpages - required_movablecore;
>>         ...
> 
> 
> So if required_movablecore >= totalpages, there won't be any ZONE_MOVABLE.
> How about add a warning or debug info to tell the user he has specified a
> too large movablecore, and it is ignored ?
> 
> Thanks.

Yes, but I don't think is is necessary, user should know the total memory
before he set the boot option.

Thanks,
Xishi Qiu


  reply	other threads:[~2015-10-14  3:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  2:21 [PATCH] mm: skip if required_kernelcore is larger than totalpages Xishi Qiu
2015-10-08  2:21 ` Xishi Qiu
2015-10-09 15:41 ` Yasuaki Ishimatsu
2015-10-09 15:41   ` Yasuaki Ishimatsu
2015-10-12  1:37   ` Xishi Qiu
2015-10-12  1:37     ` Xishi Qiu
2015-10-14  2:50     ` Tang Chen
2015-10-14  2:50       ` Tang Chen
2015-10-14  3:28       ` Xishi Qiu [this message]
2015-10-14  3:28         ` Xishi Qiu
2015-10-14  4:03         ` Tang Chen
2015-10-14  4:03           ` Tang Chen
2015-10-16 16:58     ` Yasuaki Ishimatsu
2015-10-16 16:58       ` Yasuaki Ishimatsu
2015-10-14  2:31 ` David Rientjes
2015-10-14  2:31   ` David Rientjes

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=561DCBF9.4050000@huawei.com \
    --to=qiuxishi@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=rientjes@google.com \
    --cc=tangchen@cn.fujitsu.com \
    --cc=yasu.isimatu@gmail.com \
    --cc=zhongjiang@huawei.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.