]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/vmstat: use xchg in cpu_vm_stats_fold
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 20 Mar 2023 18:03:42 +0000 (15:03 -0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:31 +0000 (16:02 -0700)
commitc1d1e09651255a8a6b2c9b673bf6542b4f67b73c
tree3a01309392be93398e316c66c0d1138a7fb0640c
parent48727f5f448324e9eab5797a304d230ecf672d8c
mm/vmstat: use xchg in cpu_vm_stats_fold

In preparation to switch vmstat shepherd to flush per-CPU counters
remotely, use xchg instead of a pair of read/write instructions.

Link: https://lkml.kernel.org/r/20230320180745.783045641@redhat.com
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
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>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmstat.c