sched/deadline: Add deadline rq status print
authorWanpeng Li <[email protected]>
Thu, 30 Oct 2014 22:39:33 +0000 (06:39 +0800)
committerIngo Molnar <[email protected]>
Tue, 4 Nov 2014 06:17:54 +0000 (07:17 +0100)
This patch add deadline rq status print.

Signed-off-by: Wanpeng Li <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Kirill Tkhai <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/deadline.c
kernel/sched/debug.c
kernel/sched/sched.h

index c047a94de27363eb25a8238aea40be0cb4e506a0..8867a67b8f0a063b2585791a8e22c3261d5e39f5 100644 (file)
@@ -1747,3 +1747,12 @@ const struct sched_class dl_sched_class = {
        .switched_from          = switched_from_dl,
        .switched_to            = switched_to_dl,
 };
+
+#ifdef CONFIG_SCHED_DEBUG
+extern void print_dl_rq(struct seq_file *m, int cpu, struct dl_rq *dl_rq);
+
+void print_dl_stats(struct seq_file *m, int cpu)
+{
+       print_dl_rq(m, cpu, &cpu_rq(cpu)->dl);
+}
+#endif /* CONFIG_SCHED_DEBUG */
index ce33780d8f20122ec263021db060cdacbaee7e41..eeb6046d60c717c683207bbc06fb04b38b007cf9 100644 (file)
@@ -261,6 +261,12 @@ 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)
+{
+       SEQ_printf(m, "\ndl_rq[%d]:\n", cpu);
+       SEQ_printf(m, "  .%-30s: %ld\n", "dl_nr_running", dl_rq->dl_nr_running);
+}
+
 extern __read_mostly int sched_clock_running;
 
 static void print_cpu(struct seq_file *m, int cpu)
@@ -329,6 +335,7 @@ do {                                                                        \
        spin_lock_irqsave(&sched_debug_lock, flags);
        print_cfs_stats(m, cpu);
        print_rt_stats(m, cpu);
+       print_dl_stats(m, cpu);
 
        print_rq(m, rq, cpu);
        spin_unlock_irqrestore(&sched_debug_lock, flags);
index 49b941fe2cc29c74e24a31181b115780ed1c3344..7e5c1eebc110c26d980697198dbb25fedc08e9d8 100644 (file)
@@ -1537,6 +1537,7 @@ extern struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq);
 extern struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq);
 extern void print_cfs_stats(struct seq_file *m, int cpu);
 extern void print_rt_stats(struct seq_file *m, int cpu);
+extern void print_dl_stats(struct seq_file *m, int cpu);
 
 extern void init_cfs_rq(struct cfs_rq *cfs_rq);
 extern void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq);