[PATCH v6 4/7] mm/memory_hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

Michal Hocko mhocko at suse.com
Thu Jul 27 20:55:07 AEST 2023


On Thu 27-07-23 14:57:17, Aneesh Kumar K V wrote:
> On 7/27/23 2:53 PM, Michal Hocko wrote:
> > On Thu 27-07-23 13:32:29, Aneesh Kumar K.V wrote:
> > [...]
> >> +	if (mode == MEMMAP_ON_MEMORY_FORCE) {
> >> +		unsigned long memmap_pages = memory_block_memmap_on_memory_pages();
> >> +
> >> +		pr_info_once("Memory hotplug will reserve %ld pages in each memory block\n",
> >> +			     memmap_pages - PFN_UP(memory_block_memmap_size()));
> >> +	}
> >> +	return 0;
> >> +}
> > 
> > Why should we print this only for the forced case? Isn't that
> > interesting for any on memory memmap? Also is this the above sufficient
> > on its own? the size depends on the block size and that can vary.
> > I think it would make more sense to print the block size and the vmemmap
> > reservation and for the force case also any wasted amount on top (if
> > any).
> > 
> 
> For the other cases the space is completely used by for struct page allocation. What
> the information is indicating here is that for each memblock we add we are loosing/wasting so many pages. 
> May be I should have used the term "waste" instead of "reserve" ?

OK, so I have clearly misread and it just confirms this would benefit
from a clarification. In any case I still think that it would be
benefitial to also report how much of the memory is used for vmemmap on
the hotplugged memory. Maybe as a separate patch.
-- 
Michal Hocko
SUSE Labs


More information about the Linuxppc-dev mailing list