* [PATCH] sched/debug: print column titles of show_state_filter()
@ 2021-08-12 11:05 Shirish S
2021-08-12 14:04 ` Phil Auld
2021-08-12 14:38 ` Steven Rostedt
0 siblings, 2 replies; 7+ messages in thread
From: Shirish S @ 2021-08-12 11:05 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira
Cc: linux-kernel, Shirish S
This addition in the debug output shall improve readablitly..
Its not intuitive for users that the pid printed in last column
is of parent process.
Without this patch:
localhost ~ # dmesg -w &
localhost ~ # echo w > /proc/sysrq-trigger
[22148.730225] sysrq: Show Blocked State
localhost ~ #
With this patch:
localhost ~ # dmesg -w &
localhost ~ # echo w > /proc/sysrq-trigger
[ 99.979365] sysrq: Show Blocked State
--> [ 99.983471] task PC stack pid father
localhost ~ #
v2: Dropped #ifdef logic
v3: Sample output in commit message
Signed-off-by: Shirish S <shirish.s@amd.com>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/sched/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 20ffcc044134..1c7ea3ef5a9f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter)
{
struct task_struct *g, *p;
+ pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46,
+ "PC stack pid father\n");
+
rcu_read_lock();
for_each_process_thread(g, p) {
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] sched/debug: print column titles of show_state_filter()
2021-08-12 11:05 [PATCH] sched/debug: print column titles of show_state_filter() Shirish S
@ 2021-08-12 14:04 ` Phil Auld
2021-08-12 14:38 ` Steven Rostedt
1 sibling, 0 replies; 7+ messages in thread
From: Phil Auld @ 2021-08-12 14:04 UTC (permalink / raw)
To: Shirish S
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, linux-kernel
Hi,
On Thu, Aug 12, 2021 at 04:35:34PM +0530 Shirish S wrote:
> This addition in the debug output shall improve readablitly..
> Its not intuitive for users that the pid printed in last column
> is of parent process.
>
> Without this patch:
> localhost ~ # dmesg -w &
> localhost ~ # echo w > /proc/sysrq-trigger
> [22148.730225] sysrq: Show Blocked State
> localhost ~ #
>
> With this patch:
> localhost ~ # dmesg -w &
> localhost ~ # echo w > /proc/sysrq-trigger
> [ 99.979365] sysrq: Show Blocked State
> --> [ 99.983471] task PC stack pid father
> localhost ~ #
>
> v2: Dropped #ifdef logic
> v3: Sample output in commit message
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> ---
> kernel/sched/core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 20ffcc044134..1c7ea3ef5a9f 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter)
> {
> struct task_struct *g, *p;
>
> + pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46,
> + "PC stack pid father\n");
"parent" or "ppid" please.
Cheers,
Phil
> +
> rcu_read_lock();
> for_each_process_thread(g, p) {
> /*
> --
> 2.17.1
>
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] sched/debug: print column titles of show_state_filter()
2021-08-12 11:05 [PATCH] sched/debug: print column titles of show_state_filter() Shirish S
2021-08-12 14:04 ` Phil Auld
@ 2021-08-12 14:38 ` Steven Rostedt
1 sibling, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2021-08-12 14:38 UTC (permalink / raw)
To: Shirish S
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, linux-kernel
On Thu, 12 Aug 2021 16:35:34 +0530
Shirish S <shirish.s@amd.com> wrote:
> This addition in the debug output shall improve readablitly..
> Its not intuitive for users that the pid printed in last column
> is of parent process.
>
> Without this patch:
> localhost ~ # dmesg -w &
> localhost ~ # echo w > /proc/sysrq-trigger
> [22148.730225] sysrq: Show Blocked State
> localhost ~ #
>
> With this patch:
> localhost ~ # dmesg -w &
> localhost ~ # echo w > /proc/sysrq-trigger
> [ 99.979365] sysrq: Show Blocked State
> --> [ 99.983471] task PC stack pid father
> localhost ~ #
>
It would had been more informative, if there were content to those lists.
Just a few lines would be good enough. But the above, just looks like
you are adding a useless header. :-/
In fact, I would argue that the title should not be displayed if the
content is empty.
Also, s/father/parent/ or s/father/ppid/
-- Steve
> v2: Dropped #ifdef logic
> v3: Sample output in commit message
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> ---
> kernel/sched/core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 20ffcc044134..1c7ea3ef5a9f 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter)
> {
> struct task_struct *g, *p;
>
> + pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46,
> + "PC stack pid father\n");
> +
> rcu_read_lock();
> for_each_process_thread(g, p) {
> /*
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] sched/debug: print column titles of show_state_filter()
@ 2021-08-12 14:09 Shirish S
2021-08-12 15:46 ` Phil Auld
0 siblings, 1 reply; 7+ messages in thread
From: Shirish S @ 2021-08-12 14:09 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira
Cc: linux-kernel, Shirish S
This addition in the debug output shall improve readablitly..
Its not intuitive for users that the pid printed in last column
is of parent process.
Without this patch:
localhost ~ # dmesg -w &
localhost ~ # echo w > /proc/sysrq-trigger
[22148.730225] sysrq: Show Blocked State
localhost ~ #
With this patch:
localhost ~ # dmesg -w &
localhost ~ # echo w > /proc/sysrq-trigger
[ 99.979365] sysrq: Show Blocked State
--> [ 99.983471] task PC stack pid father
localhost ~ #
v2: Dropped #ifdef logic
v3: Sample output in commit message
Signed-off-by: Shirish S <shirish.s@amd.com>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/sched/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 20ffcc044134..d9c7014870d5 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter)
{
struct task_struct *g, *p;
+ pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46,
+ "PC stack ppid\n");
+
rcu_read_lock();
for_each_process_thread(g, p) {
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] sched/debug: print column titles of show_state_filter()
2021-08-12 14:09 Shirish S
@ 2021-08-12 15:46 ` Phil Auld
0 siblings, 0 replies; 7+ messages in thread
From: Phil Auld @ 2021-08-12 15:46 UTC (permalink / raw)
To: Shirish S
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, linux-kernel
Hi,
On Thu, Aug 12, 2021 at 07:39:34PM +0530 Shirish S wrote:
> This addition in the debug output shall improve readablitly..
> Its not intuitive for users that the pid printed in last column
> is of parent process.
>
> Without this patch:
> localhost ~ # dmesg -w &
> localhost ~ # echo w > /proc/sysrq-trigger
> [22148.730225] sysrq: Show Blocked State
> localhost ~ #
>
> With this patch:
> localhost ~ # dmesg -w &
> localhost ~ # echo w > /proc/sysrq-trigger
> [ 99.979365] sysrq: Show Blocked State
> --> [ 99.983471] task PC stack pid father
> localhost ~ #
Thanks. Probably want to update this "father" too.
And as Steve said, maybe a line or 2 of actual data?
Cheers,
Phil
>
> v2: Dropped #ifdef logic
> v3: Sample output in commit message
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> ---
> kernel/sched/core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 20ffcc044134..d9c7014870d5 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter)
> {
> struct task_struct *g, *p;
>
> + pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46,
> + "PC stack ppid\n");
> +
> rcu_read_lock();
> for_each_process_thread(g, p) {
> /*
> --
> 2.17.1
>
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] sched/debug: print column titles of show_state_filter()
@ 2021-07-13 11:05 Shirish S
2021-07-13 15:59 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Shirish S @ 2021-07-13 11:05 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira
Cc: linux-kernel, Shirish S
This addition in the debug output shall improve readablitly..
Its not intuitive for users that the pid printed in last column
is of parent process.
Signed-off-by: Shirish S <shirish.s@amd.com>
---
kernel/sched/core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d9ff40f4661..d95d46a89e7e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8194,6 +8194,11 @@ void show_state_filter(unsigned int state_filter)
{
struct task_struct *g, *p;
+#if BITS_PER_LONG == 32
+ pr_info(" task PC stack pid father\n");
+#else
+ pr_info(" task PC stack pid father\n");
+#endif
rcu_read_lock();
for_each_process_thread(g, p) {
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] sched/debug: print column titles of show_state_filter()
2021-07-13 11:05 Shirish S
@ 2021-07-13 15:59 ` Steven Rostedt
0 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2021-07-13 15:59 UTC (permalink / raw)
To: Shirish S
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, linux-kernel
On Tue, 13 Jul 2021 16:35:18 +0530
Shirish S <shirish.s@amd.com> wrote:
> This addition in the debug output shall improve readablitly..
> Its not intuitive for users that the pid printed in last column
> is of parent process.
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> ---
> kernel/sched/core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 2d9ff40f4661..d95d46a89e7e 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8194,6 +8194,11 @@ void show_state_filter(unsigned int state_filter)
> {
> struct task_struct *g, *p;
>
> +#if BITS_PER_LONG == 32
> + pr_info(" task PC stack pid father\n");
> +#else
> + pr_info(" task PC stack pid father\n");
> +#endif
Or remove the ugly #ifdef logic and just have:
pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46,
"PC stack pid father\n");
-- Steve
> rcu_read_lock();
> for_each_process_thread(g, p) {
> /*
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-08-12 15:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 11:05 [PATCH] sched/debug: print column titles of show_state_filter() Shirish S
2021-08-12 14:04 ` Phil Auld
2021-08-12 14:38 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2021-08-12 14:09 Shirish S
2021-08-12 15:46 ` Phil Auld
2021-07-13 11:05 Shirish S
2021-07-13 15:59 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.