[RFC][PATCH v2 13/29] kernel/fork: Annotate static information into Kmemdump
Eugen Hristev
eugen.hristev at linaro.org
Thu Jul 24 06:54:56 PDT 2025
Annotate vital static information into kmemdump:
- nr_threads
Information on these variables is stored into dedicated kmemdump section.
Signed-off-by: Eugen Hristev <eugen.hristev at linaro.org>
---
kernel/fork.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index edc6579f736b..ae8ae9b9180b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -105,6 +105,7 @@
#include <uapi/linux/pidfd.h>
#include <linux/pidfs.h>
#include <linux/tick.h>
+#include <linux/kmemdump.h>
#include <asm/pgalloc.h>
#include <linux/uaccess.h>
@@ -137,6 +138,7 @@
*/
unsigned long total_forks; /* Handle normal Linux uptimes. */
int nr_threads; /* The idle threads do not count.. */
+KMEMDUMP_VAR_CORE(nr_threads, sizeof(nr_threads));
static int max_threads; /* tunable limit on nr_threads */
--
2.43.0
More information about the linux-arm-kernel
mailing list