sched/stats: Keep legacy array expiration field to zero.
Subsystems (2)
PATCH 1/1 sched/stats: Keep legacy array expiration field to zero.
A patch (https://lkml.org/lkml/2012/1/12/224) was sent previously to update scheduler stat documentation to address array expiration field's use. Then Ingo suggest that, we should also make sure that we're exporting a value of zero. So, this patch does those accordingly.
---
Documentation/scheduler/sched-stats.txt +2 -1
@@ -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
kernel/sched/stats.c +2 -2
@@ -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);
Quoted 5 lines · Rakib Mullick
A patch (https://lkml.org/lkml/2012/1/12/224) was sent previously to update scheduler stat documentation to address array expiration field's use. Then Ingo suggest that, we should also make sure that we're exporting a value of zero. So, this patch does those accordingly.
This is not a valid changelog
Quoted 26 lines
Signed-off-by Rakib Mullick <[email protected]>---
Documentation/scheduler/sched-stats.txt +2
-1@@ -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 idlekernel/sched/stats.c +0
-0@@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
kernel/sched/stats.c static int show_schedstat(struct seq_file *seq, void *v) · line 40
Quoted 10 lines
kernel/sched/stats.c +2
-2/* 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);
This leaves sched_switch completely unused:
# git grep -e "\<sched_switch\>" kernel/sched/ kernel/sched/debug.c: P(sched_switch); kernel/sched/sched.h: unsigned int sched_switch; kernel/sched/stats.c: rq->sched_switch, rq->sched_count, rq->sched_goidle,
Best kill that too
Quoted 9 lines · Peter Zijlstra
Quoted 5 lines · Rakib Mullick
A patch (https://lkml.org/lkml/2012/1/12/224) was sent previously to update scheduler stat documentation to address array expiration field's use. Then Ingo suggest that, we should also make sure that we're exporting a value of zero. So, this patch does those accordingly.
This is not a valid changelog
Ok, I'll elaborate the changelog. (Actually, I had my finger crossed :) )
Quoted 10 lines
This leaves
sched_switchcompletely unused:# git grep -e "\<sched_switch\>" kernel/sched/ kernel/sched/debug.c: P(sched_switch); kernel/sched/sched.h: unsigned int sched_switch; kernel/sched/stats.c: rq->sched_switch, rq->sched_count, rq->sched_goidle,Best kill that too
I asked on previous posting about removing rq->sched_switch. But didn't get any specific answer. Anyway, will do it.
Thanks,
Rakib