lkml.org 
[lkml]   [2020]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC 1/2] mm/memory_hotplug: no need to init new pgdat with node_start_pfn
From
Date
On 21.04.20 14:30, Michal Hocko wrote:
> Sorry for the late reply
>
> On Thu 16-04-20 12:47:06, David Hildenbrand wrote:
>> A hotadded node/pgdat will span no pages at all, until memory is moved to
>> the zone/node via move_pfn_range_to_zone() -> resize_pgdat_range - e.g.,
>> when onlining memory blocks. We don't have to initialize the
>> node_start_pfn to the memory we are adding.
>
> You are right that the node is empty at this phase but that is already
> reflected by zero present pages (hmm, I do not see spanned pages to be
> set 0 though). What I am missing here is why this is an improvement. The
> new node is already visible here and I do not see why we hide the
> information we already know.

"information we already know" - no, not before we online the memory.

Before onlining, it's just setting node_start_pfn to *some value* to be
overwritten in move_pfn_range_to_zone()->resize_pgdat_range().

(I have some more patches to clean up __try_online_node(), and this
change here makes it clear that there isn't any magic happening in
__try_online_node() related to the start pfn and memblocks - see patch #2)

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-04-21 14:36    [W:0.220 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site