* [PATCH 0/3] : Fixes to make /proc/sched_debug better
@ 2015-06-08 8:10 Srikar Dronamraju
2015-06-08 8:10 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju
` (2 more replies)
0 siblings, 3 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 thread* [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug 2015-06-08 8:10 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju @ 2015-06-08 8:10 ` Srikar Dronamraju 2015-06-19 17:59 ` [tip:sched/core] sched/debug: Properly format runnable tasks in / proc/sched_debug tip-bot for Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 2/3] sched:Replace vruntime with wait_sum in /proc/sched_debug Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju 2 siblings, 1 reply; 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 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. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> --- 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 [flat|nested] 7+ messages in thread
* [tip:sched/core] sched/debug: Properly format runnable tasks in / proc/sched_debug 2015-06-08 8:10 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju @ 2015-06-19 17:59 ` tip-bot for Srikar Dronamraju 0 siblings, 0 replies; 7+ messages in thread From: tip-bot for Srikar Dronamraju @ 2015-06-19 17:59 UTC (permalink / raw) To: linux-tip-commits Cc: peterz, srikar, hpa, tglx, bp, torvalds, linux-kernel, mingo, akpm Commit-ID: 33d6176eb12d1b0ae6d2f672b47367fd90726b91 Gitweb: http://git.kernel.org/tip/33d6176eb12d1b0ae6d2f672b47367fd90726b91 Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com> AuthorDate: Mon, 8 Jun 2015 13:40:39 +0530 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Fri, 19 Jun 2015 10:03:10 +0200 sched/debug: Properly format runnable tasks in /proc/sched_debug 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. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1433751041-11724-2-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org> --- 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)); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] sched:Replace vruntime with wait_sum in /proc/sched_debug 2015-06-08 8:10 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju @ 2015-06-08 8:10 ` Srikar Dronamraju 2015-06-19 18:00 ` [tip:sched/core] sched/debug: Replace vruntime with wait_sum in / proc/sched_debug tip-bot for Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju 2 siblings, 1 reply; 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 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. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> --- 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 [flat|nested] 7+ messages in thread
* [tip:sched/core] sched/debug: Replace vruntime with wait_sum in / proc/sched_debug 2015-06-08 8:10 ` [PATCH 2/3] sched:Replace vruntime with wait_sum in /proc/sched_debug Srikar Dronamraju @ 2015-06-19 18:00 ` tip-bot for Srikar Dronamraju 0 siblings, 0 replies; 7+ messages in thread From: tip-bot for Srikar Dronamraju @ 2015-06-19 18:00 UTC (permalink / raw) To: linux-tip-commits Cc: srikar, peterz, akpm, torvalds, tglx, bp, mingo, linux-kernel, hpa Commit-ID: c5f3ab1c3b2e277cca6462415038dab02b4ad396 Gitweb: http://git.kernel.org/tip/c5f3ab1c3b2e277cca6462415038dab02b4ad396 Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com> AuthorDate: Mon, 8 Jun 2015 13:40:40 +0530 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Fri, 19 Jun 2015 10:03:11 +0200 sched/debug: Replace vruntime with wait_sum in /proc/sched_debug 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. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1433751041-11724-3-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org> --- 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"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched 2015-06-08 8:10 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 2/3] sched:Replace vruntime with wait_sum in /proc/sched_debug Srikar Dronamraju @ 2015-06-08 8:10 ` Srikar Dronamraju 2015-06-19 18:00 ` [tip:sched/core] sched/debug: Add sum_sleep_runtime to /proc/<pid >/sched tip-bot for Srikar Dronamraju 2 siblings, 1 reply; 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 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. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> --- 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 [flat|nested] 7+ messages in thread
* [tip:sched/core] sched/debug: Add sum_sleep_runtime to /proc/<pid >/sched 2015-06-08 8:10 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju @ 2015-06-19 18:00 ` tip-bot for Srikar Dronamraju 0 siblings, 0 replies; 7+ messages in thread From: tip-bot for Srikar Dronamraju @ 2015-06-19 18:00 UTC (permalink / raw) To: linux-tip-commits Cc: akpm, torvalds, linux-kernel, srikar, peterz, hpa, mingo, tglx, bp Commit-ID: 82a0d2762699b95d6ce4114d00dc1865df9b0df3 Gitweb: http://git.kernel.org/tip/82a0d2762699b95d6ce4114d00dc1865df9b0df3 Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com> AuthorDate: Mon, 8 Jun 2015 13:40:41 +0530 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Fri, 19 Jun 2015 10:03:11 +0200 sched/debug: Add sum_sleep_runtime to /proc/<pid>/sched 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. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1433751041-11724-4-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org> --- 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-19 18:01 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-06-08 8:10 [PATCH 0/3] : Fixes to make /proc/sched_debug better Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 1/3] sched:Properly format runnable tasks in /proc/sched_debug Srikar Dronamraju 2015-06-19 17:59 ` [tip:sched/core] sched/debug: Properly format runnable tasks in / proc/sched_debug tip-bot for Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 2/3] sched:Replace vruntime with wait_sum in /proc/sched_debug Srikar Dronamraju 2015-06-19 18:00 ` [tip:sched/core] sched/debug: Replace vruntime with wait_sum in / proc/sched_debug tip-bot for Srikar Dronamraju 2015-06-08 8:10 ` [PATCH 3/3] sched:Add sum_sleep_runtime to /proc/<pid>/sched Srikar Dronamraju 2015-06-19 18:00 ` [tip:sched/core] sched/debug: Add sum_sleep_runtime to /proc/<pid >/sched tip-bot for Srikar Dronamraju
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome