[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250422113156.575971-14-eugen.hristev@linaro.org>
Date: Tue, 22 Apr 2025 14:31:55 +0300
From: Eugen Hristev <eugen.hristev@...aro.org>
To: linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
andersson@...nel.org
Cc: linux-doc@...r.kernel.org,
corbet@....net,
tglx@...utronix.de,
mingo@...hat.com,
rostedt@...dmis.org,
john.ogness@...utronix.de,
senozhatsky@...omium.org,
pmladek@...e.com,
peterz@...radead.org,
mojha@....qualcomm.com,
linux-arm-kernel@...ts.infradead.org,
vincent.guittot@...aro.org,
konradybcio@...nel.org,
dietmar.eggemann@....com,
juri.lelli@...hat.com,
eugen.hristev@...aro.org
Subject: [RFC][PATCH 13/14] sched: add sched_kmemdump_register
Add function to register scheduler info into kmemdump
Signed-off-by: Eugen Hristev <eugen.hristev@...aro.org>
---
include/linux/sched.h | 1 +
kernel/sched/core.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9c15365a30c0..441f5a6099f6 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1820,6 +1820,7 @@ extern int cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpu
extern int task_can_attach(struct task_struct *p);
extern int dl_bw_alloc(int cpu, u64 dl_bw);
extern void dl_bw_free(int cpu, u64 dl_bw);
+extern void sched_kmemdump_register(void);
#ifdef CONFIG_SMP
/* do_set_cpus_allowed() - consider using set_cpus_allowed_ptr() instead */
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 00ea6f31973c..8615fd02d4db 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -66,6 +66,7 @@
#include <linux/vtime.h>
#include <linux/wait_api.h>
#include <linux/workqueue_api.h>
+#include <linux/kmemdump.h>
#ifdef CONFIG_PREEMPT_DYNAMIC
# ifdef CONFIG_GENERIC_ENTRY
@@ -8672,6 +8673,12 @@ void __init sched_init(void)
scheduler_running = 1;
}
+void sched_kmemdump_register(void)
+{
+ kmemdump_register("runqueues", (void *)&runqueues, sizeof(runqueues));
+}
+EXPORT_SYMBOL_GPL(sched_kmemdump_register);
+
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
void __might_sleep(const char *file, int line)
--
2.43.0
Powered by blists - more mailing lists