Re: [PATCH v2 1/7] mm,memory_hotplug: Allocate memmap from the added memory range

2021-03-01 Thread David Hildenbrand
+ (*online_page_callback)(pfn_to_page(pfn), pageblock_order); + pfn += 1 << pageblock_order; pfn += pageblock_nr_pages; Can you add a comment why we can be sure that we are off by a single pageblock? What about s390x where a MAX_ORDER_NR_PAGES == 4 * pageblock_

Re: [PATCH v2 1/7] mm,memory_hotplug: Allocate memmap from the added memory range

2021-03-01 Thread David Hildenbrand
+ (*online_page_callback)(pfn_to_page(pfn), pageblock_order); + pfn += 1 << pageblock_order; pfn += pageblock_nr_pages; Can you add a comment why we can be sure that we are off by a single pageblock? What about s390x where a MAX_ORDER_NR_PAGES == 4 * pageblock_nr_

Re: [PATCH v2 1/7] mm,memory_hotplug: Allocate memmap from the added memory range

2021-02-28 Thread Oscar Salvador
On Thu, Feb 25, 2021 at 07:58:01PM +0100, David Hildenbrand wrote: > > In this way, we have: > > > > (start_pfn, buddy_start_pfn - 1] = Initialized and PageReserved > > (buddy_start_pfn, end_pfn] = Initialized and sent to buddy > > nit: shouldn't it be > > [start_pfn, buddy_start_pfn - 1]

Re: [PATCH v2 1/7] mm,memory_hotplug: Allocate memmap from the added memory range

2021-02-25 Thread David Hildenbrand
On 09.02.21 14:38, Oscar Salvador wrote: Physical memory hotadd has to allocate a memmap (struct page array) for the newly added memory section. Currently, alloc_pages_node() is used for those allocations. This has some disadvantages: a) an existing memory is consumed for that purpose (eg