sched: Remove sched_switch
authorRakib Mullick <rakib.mullick@gmail.com>
Tue, 24 Jan 2012 16:33:56 +0000 (22:33 +0600)
committerIngo Molnar <mingo@elte.hu>
Fri, 27 Jan 2012 12:28:53 +0000 (13:28 +0100)
Currently we don't utilize the sched_switch field anymore.

But, simply removing sched_switch field from the middle of the
sched_stat output will break tools.

So, to stay compatible we hardcode it to zero and remove the
field from the scheduler data structures.

Update the schedstat documentation accordingly.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1327422836.27181.5.camel@localhost.localdomain
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/scheduler/sched-stats.txt
kernel/sched/debug.c
kernel/sched/sched.h
kernel/sched/stats.c

index 1cd5d51bc761483081bac1b310788ff8ee418e0c..8259b34a66ae28059d46fa3bd606f1db84b7f8a5 100644 (file)
@@ -38,7 +38,8 @@ First field is a sched_yield() statistic:
      1) # of times sched_yield() was called
 
 Next three are schedule() statistics:
-     2) # of times we switched to the expired queue and reused it
+     2) This field is a legacy array expiration count field used in the O(1)
+       scheduler. We kept it for ABI compatibility, but it is always set to zero.
      3) # of times schedule() was called
      4) # of times schedule() left the processor idle
 
index 2a075e10004b6c9efa3b07a728f4efa9b02a78c9..09acaa15161d3c857cbf192a4162bcbfffd1acc9 100644 (file)
@@ -288,7 +288,6 @@ static void print_cpu(struct seq_file *m, int cpu)
 
        P(yld_count);
 
-       P(sched_switch);
        P(sched_count);
        P(sched_goidle);
 #ifdef CONFIG_SMP
index 98c0c2623db86019e464cb63caf49a7a253ee733..8a2c768d2f9803e76d3310665092fea5d5dedf8f 100644 (file)
@@ -462,7 +462,6 @@ struct rq {
        unsigned int yld_count;
 
        /* schedule() stats */
-       unsigned int sched_switch;
        unsigned int sched_count;
        unsigned int sched_goidle;
 
index 2a581ba8e19061913400f48575fb49f78b05db43..903ffa9e88723dd255ad280d1fe2d71aba4f7c7d 100644 (file)
@@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
 
                /* runqueue-specific stats */
                seq_printf(seq,
-                   "cpu%d %u %u %u %u %u %u %llu %llu %lu",
+                   "cpu%d %u 0 %u %u %u %u %llu %llu %lu",
                    cpu, rq->yld_count,
-                   rq->sched_switch, rq->sched_count, rq->sched_goidle,
+                   rq->sched_count, rq->sched_goidle,
                    rq->ttwu_count, rq->ttwu_local,
                    rq->rq_cpu_time,
                    rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);