From: Oscar Salvador <osalvador@suse.de>
To: Linxu Fang <fanglinxu@huawei.com>
Cc: akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz,
pavel.tatashin@microsoft.com, linux-mm@kvack.org
Subject: Re: [PATCH] mem-hotplug: fix node spanned pages when we have a node with only zone_movable
Date: Tue, 2 Apr 2019 17:00:22 +0200 [thread overview]
Message-ID: <20190402150022.fqy53o2tono6afwu@d104.suse.de> (raw)
In-Reply-To: <20190402145708.7b2xp3cc72vqqlzl@d104.suse.de>
On Tue, Apr 02, 2019 at 04:57:11PM +0200, Oscar Salvador wrote:
> On Tue, Apr 02, 2019 at 12:11:16PM +0800, Linxu Fang wrote:
> > commit <342332e6a925> ("mm/page_alloc.c: introduce kernelcore=mirror
> > option") and series patches rewrote the calculation of node spanned
> > pages.
> > commit <e506b99696a2> (mem-hotplug: fix node spanned pages when we have a
> > movable node), but the current code still has problems,
> > when we have a node with only zone_movable and the node id is not zero,
> > the size of node spanned pages is double added.
> > That's because we have an empty normal zone, and zone_start_pfn or
> > zone_end_pfn is not between arch_zone_lowest_possible_pfn and
> > arch_zone_highest_possible_pfn, so we need to use clamp to constrain the
> > range just like the commit <96e907d13602> (bootmem: Reimplement
> > __absent_pages_in_range() using for_each_mem_pfn_range()).
>
> So, let me see if I understood this correctly:
>
> When calling zone_spanned_pages_in_node() for any node which is not node 0,
>
> > *zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
> > *zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
>
> will actually set zone_start_pfn/zone_end_pfn to the values from node0's
> ZONE_NORMAL?
Of course, I meant when calling it being zone_type == ZONE_NORMAL.
--
Oscar Salvador
SUSE L3
next prev parent reply other threads:[~2019-04-02 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 4:11 Linxu Fang
2019-04-02 14:57 ` Oscar Salvador
2019-04-02 15:00 ` Oscar Salvador [this message]
2019-04-03 4:06 ` f00440829
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=20190402150022.fqy53o2tono6afwu@d104.suse.de \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=fanglinxu@huawei.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=pavel.tatashin@microsoft.com \
--cc=vbabka@suse.cz \
/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