Add function to register scheduler info into kmemdump Signed-off-by: Eugen Hristev <eugen.hristev@xxxxxxxxxx> --- 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