Skip to contentSkip to conversation

sched/debug: print column titles of show_state_filter()[V2]

PATCH In review Shirish S 2 participants 4 messages Jul 14, 2021 – Aug 12, 2021 Scheduler

lore
Share & tools
lore

Shirish S

author
#0 lore raw

PATCH 1/1 sched/debug: print column titles of show_state_filter()[V2]

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.

v2: Dropped #ifdef logic

---
 kernel/sched/core.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/sched/core.c +3 -0
index 2d9ff40f4661..22cee4c0f4b1 100644
@@ -8194,6 +8194,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) {
 		/*
Signature · 1 line
2.17.1
author
#1 lore raw

[Public]

Can we get this patch merged ?
Any thoughts?

Regards,
Shirish S

-----Original Message-----
From: S, Shirish <[email protected]>
Sent: Wednesday, July 14, 2021 8:57 AM
To: Ingo Molnar <[email protected]>; Peter Zijlstra <[email protected]>; Juri Lelli <[email protected]>; Vincent Guittot <[email protected]>; Dietmar Eggemann <[email protected]>; Steven Rostedt <[email protected]>; Ben Segall <[email protected]>; Mel Gorman <[email protected]>; Daniel Bristot de Oliveira <[email protected]>
Cc: [email protected]; S, Shirish <[email protected]>
Subject: [PATCH] sched/debug: print column titles of show_state_filter()[V2]

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.

v2: Dropped #ifdef logic

---
 kernel/sched/core.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/sched/core.c +3 -1
@@ -8194,6 +8194,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

#2 lore raw
In reply to Shirish S
Quoted 3 lines · On Wed, 14 Jul 2021 08:57:05 +0530 Shirish S <[email protected]> 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.

Hi Shirish,

perhaps add a before and after output to show people what you are trying to improve, and that can help the maintainers see if it is a useful patch or not.

Note, I'm only a reviewer of scheduling code, I'm not one that can pull in the patch.

-- Steve

Quoted 23 lines

v2: Dropped #ifdef logic

---
 kernel/sched/core.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/sched/core.c +3 -0
index 2d9ff40f4661..22cee4c0f4b1 100644
@@ -8194,6 +8194,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) {
 		/*
author
#3 lore raw

[AMD Official Use Only]

Done.

Thanks.

Regards,
Shirish S

-----Original Message-----
From: Steven Rostedt <[email protected]>
Sent: Wednesday, August 11, 2021 7:07 PM
To: S, Shirish <[email protected]>
Cc: Ingo Molnar <[email protected]>; Peter Zijlstra <[email protected]>; Juri Lelli <[email protected]>; Vincent Guittot <[email protected]>; Dietmar Eggemann <[email protected]>; Ben Segall <[email protected]>; Mel Gorman <[email protected]>; Daniel Bristot de Oliveira <[email protected]>; [email protected]
Subject: Re: [PATCH] sched/debug: print column titles of show_state_filter()[V2]

Quoted 3 lines · On Wed, 14 Jul 2021 08:57:05 +0530 Shirish S <[email protected]> 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.

Hi Shirish,

perhaps add a before and after output to show people what you are trying to improve, and that can help the maintainers see if it is a useful patch or not.

Note, I'm only a reviewer of scheduling code, I'm not one that can pull in the patch.

-- Steve

Quoted 23 lines

v2: Dropped #ifdef logic

---
 kernel/sched/core.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/sched/core.c index renamed from kernel/sched/core.c +0 -0

2d9ff40f4661..22cee4c0f4b1 100644

kernel/sched/core.c +3 -0
@@ -8194,6 +8194,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) {
 		/*