* [PATCH 0/3] : Fixes to make /proc/sched_debug better
@ 2015-05-28 10:26 Srikar Dronamraju
2015-05-28 10:26 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Srikar Dronamraju @ 2015-05-28 10:26 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Srikar Dronamraju
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
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug 2015-05-28 10:26 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju @ 2015-05-28 10:26 ` Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 2/3] sched:Replace vruntime with wait_sum " Srikar Dronamraju ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Srikar Dronamraju @ 2015-05-28 10:26 UTC (permalink / raw) To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Srikar Dronamraju With !CONFIG_SCHEDSTATS, runnable tasks in /proc/sched_debug has too many columns than required. Fix this by printing appropriate columns. While at this, print sum_exec_runtime, since this information is available even in !CONFIG_SCHEDSTATS case. --- kernel/sched/debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index a245c1f..59cb603 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -136,8 +136,10 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) SPLIT_NS(p->se.sum_exec_runtime), SPLIT_NS(p->se.statistics.sum_sleep_runtime)); #else - SEQ_printf(m, "%15Ld %15Ld %15Ld.%06ld %15Ld.%06ld %15Ld.%06ld", - 0LL, 0LL, 0LL, 0L, 0LL, 0L, 0LL, 0L); + SEQ_printf(m, "%9Ld.%06ld %9Ld.%06ld %9Ld.%06ld", + 0LL, 0L, + SPLIT_NS(p->se.sum_exec_runtime), + 0LL, 0L); #endif #ifdef CONFIG_NUMA_BALANCING SEQ_printf(m, " %d", task_node(p)); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] sched:Replace vruntime with wait_sum in /proc/sched_debug 2015-05-28 10:26 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju @ 2015-05-28 10:26 ` Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju 2015-06-08 7:06 ` [PATCH 0/3] : Fixes to make /proc/sched_debug better Peter Zijlstra 3 siblings, 0 replies; 7+ messages in thread From: Srikar Dronamraju @ 2015-05-28 10:26 UTC (permalink / raw) To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Srikar Dronamraju Within runnable tasks in /proc/sched_debug, vruntime is printed twice, once as tree-key and again as exec-runtime. Since exec-runtime isnt populated in !CONFIG_SCHEDSTATS, use this field to print wait_sum. --- kernel/sched/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 59cb603..7dc547e 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -132,7 +132,7 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) p->prio); #ifdef CONFIG_SCHEDSTATS SEQ_printf(m, "%9Ld.%06ld %9Ld.%06ld %9Ld.%06ld", - SPLIT_NS(p->se.vruntime), + SPLIT_NS(p->se.statistics.wait_sum), SPLIT_NS(p->se.sum_exec_runtime), SPLIT_NS(p->se.statistics.sum_sleep_runtime)); #else @@ -158,7 +158,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) SEQ_printf(m, "\nrunnable tasks:\n" " task PID tree-key switches prio" - " exec-runtime sum-exec sum-sleep\n" + " wait-time sum-exec sum-sleep\n" "------------------------------------------------------" "----------------------------------------------------\n"); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched 2015-05-28 10:26 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 2/3] sched:Replace vruntime with wait_sum " Srikar Dronamraju @ 2015-05-28 10:26 ` Srikar Dronamraju 2015-06-08 7:06 ` [PATCH 0/3] : Fixes to make /proc/sched_debug better Peter Zijlstra 3 siblings, 0 replies; 7+ messages in thread From: Srikar Dronamraju @ 2015-05-28 10:26 UTC (permalink / raw) To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Srikar Dronamraju When CONFIG_SCHEDSTATS is enabled, /proc/<pid>/sched prints almost all sched statistics except sum_sleep_runtime. Since sum_sleep_runtime is a good info to collect, add this it to /proc/<pid>/sched. --- kernel/sched/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 7dc547e..704683c 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -584,6 +584,7 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) nr_switches = p->nvcsw + p->nivcsw; #ifdef CONFIG_SCHEDSTATS + PN(se.statistics.sum_sleep_runtime); PN(se.statistics.wait_start); PN(se.statistics.sleep_start); PN(se.statistics.block_start); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] : Fixes to make /proc/sched_debug better 2015-05-28 10:26 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju ` (2 preceding siblings ...) 2015-05-28 10:26 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju @ 2015-06-08 7:06 ` Peter Zijlstra 2015-06-08 8:11 ` Srikar Dronamraju 3 siblings, 1 reply; 7+ messages in thread From: Peter Zijlstra @ 2015-06-08 7:06 UTC (permalink / raw) To: Srikar Dronamraju; +Cc: Ingo Molnar, linux-kernel On Thu, May 28, 2015 at 03:56:16PM +0530, Srikar Dronamraju wrote: > > 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 All patches are lacking a Signed-off-by, can't do anything with them. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] : Fixes to make /proc/sched_debug better 2015-06-08 7:06 ` [PATCH 0/3] : Fixes to make /proc/sched_debug better Peter Zijlstra @ 2015-06-08 8:11 ` Srikar Dronamraju 0 siblings, 0 replies; 7+ messages in thread From: Srikar Dronamraju @ 2015-06-08 8:11 UTC (permalink / raw) To: Peter Zijlstra; +Cc: Ingo Molnar, linux-kernel * Peter Zijlstra <peterz@infradead.org> [2015-06-08 09:06:40]: > On Thu, May 28, 2015 at 03:56:16PM +0530, Srikar Dronamraju wrote: > > > > 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 > > All patches are lacking a Signed-off-by, can't do anything with them. > Sorry about this. I am resending this again. Thanks for bringing this up. -- Thanks and Regards Srikar Dronamraju ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 0/3] : Fixes to make /proc/sched_debug better
@ 2015-06-08 8:10 Srikar Dronamraju
0 siblings, 0 replies; 7+ messages in thread
From: Srikar Dronamraju @ 2015-06-08 8:10 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Srikar Dronamraju
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
^ permalink raw reply [flat|nested] 7+ messages in threadend of thread, other threads:[~2015-06-08 8:13 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-05-28 10:26 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 2/3] sched:Replace vruntime with wait_sum " Srikar Dronamraju 2015-05-28 10:26 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju 2015-06-08 7:06 ` [PATCH 0/3] : Fixes to make /proc/sched_debug better Peter Zijlstra 2015-06-08 8:11 ` Srikar Dronamraju -- strict thread matches above, loose matches on Subject: below -- 2015-06-08 8:10 Srikar Dronamraju
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox