summaryrefslogtreecommitdiffstats
path: root/include/linux/vmstat.h
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2023-02-27 09:36:27 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-04-05 20:03:01 -0700
commit52f238653e452e0fda61e880f263a173d219acd1 (patch)
tree199cd083cb781048caaea10f3301280fcc7d2540 /include/linux/vmstat.h
parent444eeb17437a0ef526c606e9141a415d3b7dfddd (diff)
downloadlinux-stable-52f238653e452e0fda61e880f263a173d219acd1.tar.gz
linux-stable-52f238653e452e0fda61e880f263a173d219acd1.tar.bz2
linux-stable-52f238653e452e0fda61e880f263a173d219acd1.zip
mm: introduce per-VMA lock statistics
Add a new CONFIG_PER_VMA_LOCK_STATS config option to dump extra statistics about handling page fault under VMA lock. Link: https://lkml.kernel.org/r/20230227173632.3292573-29-surenb@google.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/vmstat.h')
-rw-r--r--include/linux/vmstat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 19cf5b6892ce..fed855bae6d8 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -125,6 +125,12 @@ static inline void vm_events_fold_cpu(int cpu)
#define count_vm_tlb_events(x, y) do { (void)(y); } while (0)
#endif
+#ifdef CONFIG_PER_VMA_LOCK_STATS
+#define count_vm_vma_lock_event(x) count_vm_event(x)
+#else
+#define count_vm_vma_lock_event(x) do {} while (0)
+#endif
+
#define __count_zid_vm_events(item, zid, delta) \
__count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)