Skip to contentSkip to conversation

sched_debug: remove the param dl_rq in print_dl_rq()

PATCH New Hui Su 1 participant 1 message Oct 21, 2020 Scheduler

lore
Share & tools
lore

Hui Su

author
#0 lore raw

PATCH 1/1 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().

---
 kernel/sched/deadline.c | 2 +-
 kernel/sched/debug.c    | 3 ++-
 kernel/sched/sched.h    | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
kernel/sched/deadline.c +1 -1
index 6d93f4518734..dd9bf5684df9 100644
@@ -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 */
kernel/sched/debug.c +2 -1
index 0655524700d2..2f0166828638 100644
@@ -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);
kernel/sched/sched.h +1 -1
index 28709f6b0975..e01c3391e386 100644
@@ -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);
Signature · 1 line
2.25.1