Re: [PATCH] Display -rt related stats in /proc/schedstat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 23, 2007 at 02:24:34PM +0200, Joachim Deguara wrote:
> On Monday 23 July 2007 14:59:25 Ankita Garg wrote:
> > Hi,
> >
> > This patch adds support to display captured -rt stats under
> > /proc/schedstat.
> 
> You need to +1 SCHEDSTAT_VERSION if you are going to do this.  I would also 
> suggest the number of fields printed out it in schedstats is invariable of 
> CONFIG_PREEMPT_RT rather whether the fields have meaning data or zeros 
> depends on the define.  Finally an addition to Documentation/sched-stats.txt 
> is always desirable with such a change.

Yep, that sounds fine to me, because the fields are being defined
irrespective of CONFIG_PREEMPT_RT. Besides, it looks much cleaner!
Have updated the SCHEDSTAT_VERSION to 15.

As for documentation update, Documentation/sched-stats.txt seems to be a little old.
Under CPU statistics, it indicates 28 fields being printed, but version 14 
seems to be printing only 12 (iiuc). So, requires some update. Will send it along 
in the next patch.


Signed-off-by: Ankita Garg <ankita@xxxxxxxxxx>
--
 sched_stats.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.22.1/kernel/sched_stats.h
===================================================================
--- linux-2.6.22.1.orig/kernel/sched_stats.h	2007-07-23 18:15:57.000000000 +0530
+++ linux-2.6.22.1/kernel/sched_stats.h	2007-07-23 20:19:21.000000000 +0530
@@ -4,7 +4,7 @@
  * bump this up when changing the output format or the meaning of an existing
  * format, so that tools can adapt (or abort)
  */
-#define SCHEDSTAT_VERSION 14
+#define SCHEDSTAT_VERSION 15
 
 static int show_schedstat(struct seq_file *seq, void *v)
 {
@@ -21,12 +21,13 @@
 
 		/* runqueue-specific stats */
 		seq_printf(seq,
-		    "cpu%d %lu %lu %lu %lu %lu %lu %lu %lu %lu %llu %llu %lu",
+		    "cpu%d %lu %lu %lu %lu %lu %lu %lu %lu %lu %llu %lu %lu %lu %llu %lu",
 		    cpu, rq->yld_both_empty,
 		    rq->yld_act_empty, rq->yld_exp_empty, rq->yld_cnt,
 		    rq->sched_switch, rq->sched_cnt, rq->sched_goidle,
 		    rq->ttwu_cnt, rq->ttwu_local,
 		    rq->rq_sched_info.cpu_time,
+		    rq->rto_schedule, rq->rto_wakeup, rq->rto_pulled,
 		    rq->rq_sched_info.run_delay, rq->rq_sched_info.pcnt);
 
 		seq_printf(seq, "\n");

-- 
Regards,
Ankita Garg (ankita@xxxxxxxxxx)
Linux Technology Center
IBM India Systems & Technology Labs, 
Bangalore, India   
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux