2020-10-21 14:47:30

by Hui Su

[permalink] [raw]
Subject: [PATCH] sched_debug: remove the param dl_rq in print_dl_rq()

different from rt_sched_class and fair_sched_class,
dl_sched_class have no sched group.

We can direct get dl_rq according to cpu, so remove the
param dl_rq in print_dl_rq().

Signed-off-by: Hui Su <[email protected]>
---
kernel/sched/deadline.c | 2 +-
kernel/sched/debug.c | 3 ++-
kernel/sched/sched.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 6d93f4518734..dd9bf5684df9 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2885,6 +2885,6 @@ bool dl_cpu_busy(unsigned int cpu)
#ifdef CONFIG_SCHED_DEBUG
void print_dl_stats(struct seq_file *m, int cpu)
{
- print_dl_rq(m, cpu, &cpu_rq(cpu)->dl);
+ print_dl_rq(m, cpu);
}
#endif /* CONFIG_SCHED_DEBUG */
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 0655524700d2..2f0166828638 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -640,9 +640,10 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
#undef P
}

-void print_dl_rq(struct seq_file *m, int cpu, struct dl_rq *dl_rq)
+void print_dl_rq(struct seq_file *m, int cpu)
{
struct dl_bw *dl_bw;
+ struct dl_rq *dl_rq = &cpu_rq(cpu)->dl;

SEQ_printf(m, "\n");
SEQ_printf(m, "dl_rq[%d]:\n", cpu);
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 28709f6b0975..e01c3391e386 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2261,7 +2261,7 @@ extern void print_rt_stats(struct seq_file *m, int cpu);
extern void print_dl_stats(struct seq_file *m, int cpu);
extern void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq);
extern void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq);
-extern void print_dl_rq(struct seq_file *m, int cpu, struct dl_rq *dl_rq);
+extern void print_dl_rq(struct seq_file *m, int cpu);
#ifdef CONFIG_NUMA_BALANCING
extern void
show_numa_stats(struct task_struct *p, struct seq_file *m);
--
2.25.1