Skip to contentSkip to conversation

sched: access to runqueues by function

RFC PATCH NAK Ruipeng Qi 1 participant 1 message Dec 21, 2023 Scheduler

lore
Share & tools
lore

Ruipeng Qi

author
#0 lore raw

RFC PATCH 5/7 sched: access to runqueues by function

From: qiruipeng <[email protected]>

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

---
 kernel/sched/core.c | 8 ++++++++
 1 file changed, 8 insertions(+)
kernel/sched/core.c +8 -0
index a708d225c28e..217966111ea7 100644
@@ -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
Signature · 1 line
2.17.1