Commit 37db17c1 authored by Wei Yang's avatar Wei Yang Committed by Alexander Gordeev
Browse files

s390/mm: Get total ram pages from memblock



On s390, zero page's size relies on total ram pages.

Since we plan to move the accounting into __free_pages_core(),
totalram_pages may not represent the total usable pages on system
at this point when defer_init is enabled.

We can get the total usable pages from memblock directly. The size maybe
not accurate due to the alignment, but enough for the calculation.

Signed-off-by: default avatarWei Yang <richard.weiyang@gmail.com>
CC: Mike Rapoport (IBM) <rppt@kernel.org>
CC: David Hildenbrand <david@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20240616013537.20338-1-richard.weiyang@gmail.com


Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent 7c679286
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment