mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 5/7] sched: access to runqueues by function
@ 2023-12-21 13:35 Ruipeng Qi
  0 siblings, 0 replies; only message in thread
From: Ruipeng Qi @ 2023-12-21 13:35 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann
  Cc: rostedt, bsegall, mgorman, bristot, vschneid, linux-kernel, qiruipeng

From: qiruipeng <qiruipeng@lixiang.com>

Osdump is interested with runqueues, so try to access to it through
one new added function get_rq.

Signed-off-by: qiruipeng <qiruipeng@lixiang.com>
---
 kernel/sched/core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a708d225c28e..217966111ea7 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -117,6 +117,14 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(sched_compute_energy_tp);
 
 DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
 
+#ifdef CONFIG_OS_MINIDUMP
+int get_rq(int cpu, void **rq)
+{
+	*rq = (cpu_rq(cpu));
+	return sizeof(struct rq);
+}
+#endif
+
 #ifdef CONFIG_SCHED_DEBUG
 /*
  * Debugging: various feature bits
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-21 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 13:35 [RFC PATCH 5/7] sched: access to runqueues by function Ruipeng Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®