From: Ruipeng Qi <ruipengqi7@gmail.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com
Cc: rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com,
linux-kernel@vger.kernel.org, qiruipeng <qiruipeng@lixiang.com>
Subject: [RFC PATCH 5/7] sched: access to runqueues by function
Date: Thu, 21 Dec 2023 21:35:16 +0800 [thread overview]
Message-ID: <20231221133516.812-1-ruipengqi7@gmail.com> (raw)
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
reply other threads:[~2023-12-21 13:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231221133516.812-1-ruipengqi7@gmail.com \
--to=ruipengqi7@gmail.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qiruipeng@lixiang.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®