diff options
author | Rakib Mullick <rakib.mullick@gmail.com> | 2012-01-24 11:33:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-01-27 07:28:53 -0500 |
commit | 30fd049afcfed50e022704036e8629d6bdfe84e6 (patch) | |
tree | 829472524c157f1d7a769d088b2f9b70c9779c11 | |
parent | 4ec4412e1e91f44a3dcb97b6c9172a13fc78bac9 (diff) |
sched: Remove sched_switch
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>
-rw-r--r-- | Documentation/scheduler/sched-stats.txt | 3 | ||||
-rw-r--r-- | kernel/sched/debug.c | 1 | ||||
-rw-r--r-- | kernel/sched/sched.h | 1 | ||||
-rw-r--r-- | kernel/sched/stats.c | 4 |
4 files changed, 4 insertions, 5 deletions
diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt index 1cd5d51bc761..8259b34a66ae 100644 --- a/Documentation/scheduler/sched-stats.txt +++ b/Documentation/scheduler/sched-stats.txt | |||
@@ -38,7 +38,8 @@ First field is a sched_yield() statistic: | |||
38 | 1) # of times sched_yield() was called | 38 | 1) # of times sched_yield() was called |
39 | 39 | ||
40 | Next three are schedule() statistics: | 40 | Next three are schedule() statistics: |
41 | 2) # of times we switched to the expired queue and reused it | 41 | 2) This field is a legacy array expiration count field used in the O(1) |
42 | scheduler. We kept it for ABI compatibility, but it is always set to zero. | ||
42 | 3) # of times schedule() was called | 43 | 3) # of times schedule() was called |
43 | 4) # of times schedule() left the processor idle | 44 | 4) # of times schedule() left the processor idle |
44 | 45 | ||
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 2a075e10004b..09acaa15161d 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c | |||
@@ -288,7 +288,6 @@ static void print_cpu(struct seq_file *m, int cpu) | |||
288 | 288 | ||
289 | P(yld_count); | 289 | P(yld_count); |
290 | 290 | ||
291 | P(sched_switch); | ||
292 | P(sched_count); | 291 | P(sched_count); |
293 | P(sched_goidle); | 292 | P(sched_goidle); |
294 | #ifdef CONFIG_SMP | 293 | #ifdef CONFIG_SMP |
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 98c0c2623db8..8a2c768d2f98 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -462,7 +462,6 @@ struct rq { | |||
462 | unsigned int yld_count; | 462 | unsigned int yld_count; |
463 | 463 | ||
464 | /* schedule() stats */ | 464 | /* schedule() stats */ |
465 | unsigned int sched_switch; | ||
466 | unsigned int sched_count; | 465 | unsigned int sched_count; |
467 | unsigned int sched_goidle; | 466 | unsigned int sched_goidle; |
468 | 467 | ||
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c index 2a581ba8e190..903ffa9e8872 100644 --- a/kernel/sched/stats.c +++ b/kernel/sched/stats.c | |||
@@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v) | |||
32 | 32 | ||
33 | /* runqueue-specific stats */ | 33 | /* runqueue-specific stats */ |
34 | seq_printf(seq, | 34 | seq_printf(seq, |
35 | "cpu%d %u %u %u %u %u %u %llu %llu %lu", | 35 | "cpu%d %u 0 %u %u %u %u %llu %llu %lu", |
36 | cpu, rq->yld_count, | 36 | cpu, rq->yld_count, |
37 | rq->sched_switch, rq->sched_count, rq->sched_goidle, | 37 | rq->sched_count, rq->sched_goidle, |
38 | rq->ttwu_count, rq->ttwu_local, | 38 | rq->ttwu_count, rq->ttwu_local, |
39 | rq->rq_cpu_time, | 39 | rq->rq_cpu_time, |
40 | rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount); | 40 | rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount); |