public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Wanpeng Li <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: juri.lelli@arm.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org, mingo@kernel.org,
	tglx@linutronix.de, ktkhai@parallels.com, peterz@infradead.org,
	wanpeng.li@linux.intel.com
Subject: [tip:sched/core] sched/deadline: Add deadline rq status print
Date: Tue, 4 Nov 2014 08:11:24 -0800	[thread overview]
Message-ID: <tip-acb32132ec0433c03bed750f3e9508dc29db0328@git.kernel.org> (raw)
In-Reply-To: <1414708776-124078-3-git-send-email-wanpeng.li@linux.intel.com>

Commit-ID:  acb32132ec0433c03bed750f3e9508dc29db0328
Gitweb:     http://git.kernel.org/tip/acb32132ec0433c03bed750f3e9508dc29db0328
Author:     Wanpeng Li <wanpeng.li@linux.intel.com>
AuthorDate: Fri, 31 Oct 2014 06:39:33 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 4 Nov 2014 07:17:54 +0100

sched/deadline: Add deadline rq status print

This patch add deadline rq status print.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@arm.com>
Cc: Kirill Tkhai <ktkhai@parallels.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1414708776-124078-3-git-send-email-wanpeng.li@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/deadline.c | 9 +++++++++
 kernel/sched/debug.c    | 7 +++++++
 kernel/sched/sched.h    | 1 +
 3 files changed, 17 insertions(+)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index c047a94..8867a67 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -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 */
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index ce33780..eeb6046 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -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);
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 49b941f..7e5c1ee 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -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);

  reply	other threads:[~2014-11-04 16:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 22:39 [PATCH v3 1/6] sched/rt: cleanup check preempt equal prio Wanpeng Li
2014-10-30 22:39 ` [PATCH v3 2/6] sched/deadline: fix artificial overrun introduced by yield_task_dl Wanpeng Li
2014-11-04 16:11   ` [tip:sched/core] sched/deadline: Fix artificial overrun introduced by yield_task_dl() tip-bot for Wanpeng Li
2014-10-30 22:39 ` [PATCH v3 3/6] sched/deadline: add deadline rq status print Wanpeng Li
2014-11-04 16:11   ` tip-bot for Wanpeng Li [this message]
2014-10-30 22:39 ` [PATCH v3 4/6] sched/deadline: push task away if the deadline is equal to curr during wakeup Wanpeng Li
2014-11-04 16:11   ` [tip:sched/core] sched/deadline: Push " tip-bot for Wanpeng Li
2014-10-30 22:39 ` [PATCH v3 5/6] sched/deadline: reschedule from switched_from_dl() after a successful pull Wanpeng Li
2014-11-04 16:11   ` [tip:sched/core] sched/deadline: Reschedule from switched_from_dl () " tip-bot for Wanpeng Li
2014-10-30 22:39 ` [PATCH v3 6/6] sched/deadline: don't check CONFIG_SMP in switched_from_dl Wanpeng Li
2014-11-04 16:12   ` [tip:sched/core] sched/deadline: Don' t check CONFIG_SMP in switched_from_dl() tip-bot for Wanpeng Li
2014-11-04 16:10 ` [tip:sched/core] sched/rt: Clean up check_preempt_equal_prio() tip-bot for Wanpeng Li

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=tip-acb32132ec0433c03bed750f3e9508dc29db0328@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=juri.lelli@arm.com \
    --cc=ktkhai@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=wanpeng.li@linux.intel.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