From: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx> On Thu, 08 Aug 2024 00:14:13 +0000, Wei Yang wrote: > During bootup, system may need the number of free pages in the whole system > to do some calculation before all pages are freed to buddy system. Usually > this number is get from totalram_pages(). Since we plan to move the free > pages accounting in __free_pages_core(), this value may not represent > total free pages at the early stage, especially when > CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled. > > [...] Applied to for-next branch of memblock.git tree, thanks! [1/3] mm/memblock: introduce a new helper memblock_estimated_nr_free_pages() commit: d0f8a8973f265f6a276f99d091af99edfb2b87de [2/3] kernel/fork.c: get estimated free pages by memblock api commit: 0910bf0ef85c5404aac94394cb31e076e4eb03f1 [3/3] s390/mm: get estimated free pages by memblock api commit: cb088e38aab4c7e9ce711c18c66e851c8f4227bb tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock branch: for-next -- Sincerely yours, Mike.