Skip to content

Commit 30fd049

Browse files
rmullickIngo Molnar
authored andcommitted
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>
1 parent 4ec4412 commit 30fd049

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎Documentation/scheduler/sched-stats.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ First field is a sched_yield() statistic:
3838
1) # of times sched_yield() was called
3939

4040
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.
4243
3) # of times schedule() was called
4344
4) # of times schedule() left the processor idle
4445

‎kernel/sched/debug.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ static void print_cpu(struct seq_file *m, int cpu)
288288

289289
P(yld_count);
290290

291-
P(sched_switch);
292291
P(sched_count);
293292
P(sched_goidle);
294293
#ifdef CONFIG_SMP

‎kernel/sched/sched.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ struct rq {
462462
unsigned int yld_count;
463463

464464
/* schedule() stats */
465-
unsigned int sched_switch;
466465
unsigned int sched_count;
467466
unsigned int sched_goidle;
468467

‎kernel/sched/stats.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
3232

3333
/* runqueue-specific stats */
3434
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",
3636
cpu, rq->yld_count,
37-
rq->sched_switch, rq->sched_count, rq->sched_goidle,
37+
rq->sched_count, rq->sched_goidle,
3838
rq->ttwu_count, rq->ttwu_local,
3939
rq->rq_cpu_time,
4040
rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);

0 commit comments

Comments
 (0)