Searched hist:ba1b67c79cb3c5f5d11cb475bb7045929b235538 (Results 1 – 1 of 1) sorted by relevance
/linux/mm/ |
H A D | mm_init.c | diff ba1b67c79cb3c5f5d11cb475bb7045929b235538 Fri May 26 10:52:50 CEST 2023 Haifeng Xu <haifeng.xu@shopee.com> mm/mm_init.c: introduce reset_memoryless_node_totalpages()
Currently, no matter whether a node actually has memory or not, calculate_node_totalpages() is used to account number of pages in zone/node. However, for node without memory, these unnecessary calculations can be skipped. All the zone/node page counts can be set to 0 directly. So introduce reset_memoryless_node_totalpages() to perform this action.
Furthermore, calculate_node_totalpages() only gets called for the node with memory.
Link: https://lkml.kernel.org/r/20230526085251.1977-1-haifeng.xu@shopee.com Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com> Suggested-by: Mike Rapoport <rppt@kernel.org> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Cc: David Hildenbrand <david@redhat.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|