public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wanpeng Li <kernellwp@gmail.com>
To: Juri Lelli <juri.lelli@arm.com>,
	Wanpeng Li <wanpeng.li@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"juri.lelli@gmail.com" <juri.lelli@gmail.com>
Subject: Re: [PATCH 3/6] sched/dl: add deadline rq status print
Date: Thu, 30 Oct 2014 06:52:18 +0800	[thread overview]
Message-ID: <54516FA2.5000101@gmail.com> (raw)
In-Reply-To: <54511B5D.1030208@arm.com>

Hi Juri,
2014/10/30 0:52, Juri Lelli:
> Hi,
>
> On 27/10/14 01:41, Wanpeng Li wrote:
>> This patch add deadline rq status print.
>>
> Don't know if useful, but we could add this, just to be consistent.

Yes, to keep it consistent. Maybe more things can be print if they are 
necessary in the future.

Regards,
Wanpeng Li

>
> Thanks,
>
> - Juri
>
>> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
>> ---
>>   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 d4ffc1e..aa7c27f 100644
>> --- a/kernel/sched/deadline.c
>> +++ b/kernel/sched/deadline.c
>> @@ -1682,3 +1682,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 6130251..2c2ef3c 100644
>> --- a/kernel/sched/sched.h
>> +++ b/kernel/sched/sched.h
>> @@ -1502,6 +1502,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);
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2014-10-29 22:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  1:41 [PATCH 1/6] sched/rt: check if curr can be pushed/pulled somewhere else in advance Wanpeng Li
2014-10-27  1:41 ` [PATCH 2/6] sched/dl: fix yield task artificial overrun Wanpeng Li
2014-10-29 16:33   ` Juri Lelli
2014-10-29 22:49     ` Wanpeng Li
2014-10-30 10:04       ` Juri Lelli
2014-10-27  1:41 ` [PATCH 3/6] sched/dl: add deadline rq status print Wanpeng Li
2014-10-29 16:52   ` Juri Lelli
2014-10-29 22:52     ` Wanpeng Li [this message]
2014-10-27  1:41 ` [PATCH 4/6] sched/dl: push task away if the deadline is equal to curr during wakeup Wanpeng Li
2014-10-29 17:08   ` Juri Lelli
2014-10-27  1:41 ` [PATCH 5/6] sched/dl: reschedule if successfully pull earlier deadline task Wanpeng Li
2014-10-29 22:59   ` Wanpeng Li
2014-10-30 10:21   ` Juri Lelli
2014-10-30 13:12     ` Wanpeng Li
2014-10-30 14:42       ` Juri Lelli
2014-10-31 15:37     ` Peter Zijlstra
2014-10-27  1:41 ` [PATCH 6/6] sched/dl: don't check CONFIG_SMP in switched_from_dl Wanpeng Li
2014-10-30 10:29   ` Juri Lelli
2014-10-29 22:57 ` [PATCH 1/6] sched/rt: check if curr can be pushed/pulled somewhere else in advance 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=54516FA2.5000101@gmail.com \
    --to=kernellwp@gmail.com \
    --cc=juri.lelli@arm.com \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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