]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vmstat: add pcp remote node draining via cpu_vm_stats_fold
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 20 Mar 2023 18:03:45 +0000 (15:03 -0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:32 +0000 (16:02 -0700)
commit4b39c4548be44c57e6c80eaca7b43d2a662390c1
tree62e3ce13d7980350da69f9eb05df5a441c9e0353
parent65ee8b40097f604f12164d5cd9cbeb65409c4b71
vmstat: add pcp remote node draining via cpu_vm_stats_fold

Large NUMA systems might have significant portions of system memory to be
trapped in pcp queues.  The number of pcp is determined by the number of
processors and nodes in a system.  A system with 4 processors and 2 nodes
has 8 pcps which is okay.  But a system with 1024 processors and 512 nodes
has 512k pcps with a high potential for large amount of memory being
caught in them.

Enable remote node draining for the CONFIG_HAVE_CMPXCHG_LOCAL case, where
vmstat_shepherd will perform the aging and draining via cpu_vm_stats_fold.

Link: https://lkml.kernel.org/r/20230320180745.858515310@redhat.com
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Aaron Tomlin <atomlin@atomlin.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/vmstat.h
mm/page_alloc.c
mm/vmstat.c