summaryrefslogtreecommitdiff
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorHaifeng Xu <haifeng.xu@shopee.com>2023-05-26 08:52:50 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-06-09 16:25:48 -0700
commitba1b67c79cb3c5f5d11cb475bb7045929b235538 (patch)
tree602444784b379d874641955e3d5fe48280907535 /mm/swapfile.c
parentda9698105c7a84f601e81ea1f5f39ba53f6b9d7c (diff)
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>
Diffstat (limited to 'mm/swapfile.c')
0 files changed, 0 insertions, 0 deletions