[PATCH 0/3] : Fixes to make /proc/sched_debug better

From: Srikar Dronamraju
Date: Mon Jun 08 2015 - 04:13:13 EST


Current /proc/sched_debug can be improved by
- Improving the format of runnable tasks when CONFIG_SCHEDSTATS is not enabled.
- Adding sum_exec info even when CONFIG_SCHEDSTATS is not enabled.
- Removing duplicate information from runnable tasks.
- Adding wait-time info.

Further we could collect sum_sleep_time in /proc/<pid>/schedstat.

Current /proc/sched_debug when CONFIG_SCHEDSTATS is not enabled

runnable tasks:
task PID tree-key switches prio exec-runtime sum-exec sum-sleep
----------------------------------------------------------------------------------------------------------
watchdog/31 223 -11.998676 211 0 0 0 0.000000 0.000000 0.000000 0 /
migration/31 224 0.000000 140 0 0 0 0.000000 0.000000 0.000000 0 /
ksoftirqd/31 225 -13.047772 3 120 0 0 0.000000 0.000000 0.000000 0 /
kworker/31:0H 227 3377.042323 9 100 0 0 0.000000 0.000000 0.000000 0 /
kworker/31:1 286 3306.213547 146 120 0 0 0.000000 0.000000 0.000000 0 /
kworker/u129:3 1476 3250.397029 2 100 0 0 0.000000 0.000000 0.000000 0 /
systemd-logind 1548 0.110774 182 120 0 0 0.000000 0.000000 0.000000 0 /autogroup-60
rtas_errd 1577 0.634662 3 120 0 0 0.000000 0.000000 0.000000 0 /autogroup-66
kworker/31:2 1646 10684.860325 110 120 0 0 0.000000 0.000000 0.000000 0 /
kworker/31:1H 1796 9096.988236 9 100 0 0 0.000000 0.000000 0.000000 0 /

Same after this patchset:

runnable tasks:
task PID tree-key switches prio wait-time sum-exec sum-sleep
----------------------------------------------------------------------------------------------------------
watchdog/31 223 -11.998592 60 0 0.000000 0.944690 0.000000 0 /
migration/31 224 0.000000 161 0 0.000000 0.960574 0.000000 0 /
ksoftirqd/31 225 4907.154938 4 120 0.000000 0.005390 0.000000 0 /
kworker/31:0 226 31.071368 15 120 0.000000 0.089008 0.000000 0 /
kworker/31:0H 227 13566.695695 12 100 0.000000 0.080894 0.000000 0 /
kworker/31:1 467 13596.403449 316 120 0.000000 2.314132 0.000000 0 /
auditd 1513 0.256353 992 116 0.000000 20.936048 0.000000 0 /autogroup-46
kworker/31:1H 1804 13566.698706 10 100 0.000000 0.160330 0.000000 0 /
kworker/31:2H 14303 13589.006998 8 100 0.000000 0.085060 0.000000 0 /


Current /proc/sched_debug when CONFIG_SCHEDSTATS is set

runnable tasks:
task PID tree-key switches prio exec-runtime sum-exec sum-sleep
----------------------------------------------------------------------------------------------------------
watchdog/159 805 -11.997308 68929 0 -11.997308 386.355640 0.001442 17 /
migration/159 806 0.000000 5 0 0.000000 0.541712 0.001364 17 /
ksoftirqd/159 807 -13.046724 3 120 -13.046724 0.003454 0.001356 17 /
kworker/159:0 808 -6.686082 42 120 -6.686082 2.364758 831990.032194 17 /
kworker/159:0H 809 -1.048310 4 100 -1.048310 0.024540 394.824356 17 /
kworker/159:1 6939 14.392296 836 120 14.392296 15.468298 273966793.171550 17 /

Same after this patchset:

runnable tasks:
task PID tree-key switches prio wait-time sum-exec sum-sleep
----------------------------------------------------------------------------------------------------------
watchdog/31 223 -11.998730 29 0 0.016660 0.277190 0.001028 0 /
migration/31 224 0.000000 163 0 0.000530 1.089348 0.000994 0 /
ksoftirqd/31 225 -13.047768 3 120 0.014756 0.001952 0.001164 0 /
kworker/31:0 226 209.731324 17 120 0.755458 0.096596 17888.805854 0 /
kworker/31:0H 227 5556.434079 9 100 0.015650 0.083778 34507.103450 0 /
kworker/31:1 465 223.834529 21 120 0.012962 0.163522 17495.280072 0 /
kworker/31:2 712 10136.506903 158 120 5.358470 2.269444 81162.182416 0 /
kworker/31:1H 5904 10047.528224 6 100 0.028400 0.207288 20745.582406 0 /



Srikar Dronamraju (3):
sched:Properly format runnable tasks in /proc/sched_debug
sched:Replace vruntime with wait_sum in /proc/sched_debug
sched:Add sum_sleep_runtime to /proc/<pid>/sched

kernel/sched/debug.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/