Re: [PATCH v2] memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory

From: Mike Rapoport

Date: Tue Nov 11 2025 - 11:19:30 EST


From: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

On Tue, 11 Nov 2025 10:00:10 +0900, Akinobu Mita wrote:
> memblock_estimated_nr_free_pages() returns the difference between the total
> size of the "memory" memblock type and the "reserved" memblock type.
>
> The "soft-reserved" memory regions are added to the "reserved" memblock
> type, but not to the "memory" memblock type. Therefore,
> memblock_estimated_nr_free_pages() may return a smaller value than
> expected, or if it underflows, an extremely large value.
>
> [...]

Applied to fixes branch of memblock.git tree, thanks!

[1/1] memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory
commit: c42af83c59b65d01c0f7a074e450bbbb43b22f0d

tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: fixes

In the future please start a new thread when sending the next version of a
patch.

--
Sincerely yours,
Mike.