]> 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>
Tue, 28 Mar 2023 23:25:09 +0000 (16:25 -0700)
commitc864c4da543d4188db1f823cc421bf870116e102
tree81a60b4fc351c46f811f1fa69f0865f32e92dd21
parentec1b62d1e310b5f134a895d8df4b7a83e7877905
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