[PATCH 10/26] mm/swapfile: Annotate static information into meminspect
Eugen Hristev
eugen.hristev at linaro.org
Wed Nov 19 07:44:11 PST 2025
Annotate vital static information into inspection table:
- nr_swapfiles
Information on these variables is stored into dedicated inspection section.
Signed-off-by: Eugen Hristev <eugen.hristev at linaro.org>
---
mm/swapfile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 10760240a3a2..ee677be19041 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -42,6 +42,7 @@
#include <linux/suspend.h>
#include <linux/zswap.h>
#include <linux/plist.h>
+#include <linux/meminspect.h>
#include <asm/tlbflush.h>
#include <linux/swapops.h>
@@ -65,6 +66,7 @@ static void move_cluster(struct swap_info_struct *si,
static DEFINE_SPINLOCK(swap_lock);
static unsigned int nr_swapfiles;
+MEMINSPECT_SIMPLE_ENTRY(nr_swapfiles);
atomic_long_t nr_swap_pages;
/*
* Some modules use swappable objects and may try to swap them out under
--
2.43.0
More information about the linux-arm-kernel
mailing list