On Thu, Aug 08, 2024 at 12:06:38PM +0200, Alexander Gordeev wrote: >On Thu, Aug 08, 2024 at 12:14:13AM +0000, Wei Yang wrote: > >Hi Wei, > >... >> + * Return: >> + * An estimated number of free pages from memblock point of view. >> + */ >> +unsigned long __init memblock_estimated_nr_free_pages(void) >> +{ >> + return PHYS_PFN(memblock_phys_mem_size() - memblock_reserved_size()); >> +} > >This could possibly be short on up to two pages due to lack of alignment. >The current uses are okay, but since you make it generic it probably matters. > I don't follow, would you mind giving more detail? >Also, the returned value is not an estimation. Meaning the function name >is rather unfortunate AFAICT.