Skip to contentSkip to conversation

sched/debug: change "runnable tasks" to "Tasks on cpu" on sched debug

PATCH In review zihan zhou 3 participants 6 messages Jan 17, 2025 – Jan 20, 2025 Scheduler

lore
Share & tools
lore

zihan zhou

author
#0 lore raw

PATCH 1/1 sched/debug: change "runnable tasks" to "Tasks on cpu" on sched debug

In sched debug file /sys/kernel/debug/sched/debug, there is a "runnable tasks" table, but not all tasks in the table are runnable.
It is inappropriate to refer to this table as "runnable tasks", so here it is changed to "Tasks on CPU %d", like:

Tasks on cpu 31:
S task PID vruntime eligible deadline
--------------------------------------------------------------------

 S        cpuhp/31   173         0.803286   E           2.153245    
 S    migration/31   174         8.167468   E          11.167468    

PS For the sake of clarity in reality, some table information has been omitted here.

---
 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
index a1be00a988bf..687487128400 100644
@@ -771,7 +771,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
 	struct task_struct *g, *p;
 
 	SEQ_printf(m, "\n");
-	SEQ_printf(m, "runnable tasks:\n");
+	SEQ_printf(m, "Tasks on cpu %d:\n", rq_cpu);
 	SEQ_printf(m, " S            task   PID       vruntime   eligible    "
 		   "deadline             slice          sum-exec      switches  "
 		   "prio         wait-time        sum-sleep       sum-block"
Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 5 lines · zihan zhou

In sched debug file /sys/kernel/debug/sched/debug, there is a "runnable tasks" table, but not all tasks in the table are runnable.
It is inappropriate to refer to this table as "runnable tasks", so here it is changed to "Tasks on CPU %d", like:

We have used replaced runnable by queued in fair scheduler

Quoted 34 lines

Tasks on cpu 31:
S task PID vruntime eligible deadline
--------------------------------------------------------------------

 S        cpuhp/31   173         0.803286   E           2.153245
 S    migration/31   174         8.167468   E          11.167468

PS For the sake of clarity in reality, some table information has been omitted here.

---
 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -2
index a1be00a988bf..687487128400 100644
@@ -771,7 +771,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
        struct task_struct *g, *p;
 
        SEQ_printf(m, "\n");
-       SEQ_printf(m, "runnable tasks:\n");
+       SEQ_printf(m, "Tasks on cpu %d:\n", rq_cpu);
        SEQ_printf(m, " S            task   PID       vruntime   eligible    "
                   "deadline             slice          sum-exec      switches  "
                   "prio         wait-time        sum-sleep       sum-block"
--

2.33.0

maintainer
#2 lore raw
Quoted 8 lines · Vincent Guittot
Quoted 5 lines · zihan zhou

In sched debug file /sys/kernel/debug/sched/debug, there is a "runnable tasks" table, but not all tasks in the table are runnable.
It is inappropriate to refer to this table as "runnable tasks", so here it is changed to "Tasks on CPU %d", like:

We have used replaced runnable by queued in fair scheduler

Right, but also 'tasks on cpu' is equally wrong -- but really, if you're looking at sched/debug you have to know what you're doing anyway, so why bother with trivial stuff like this?

Quoted 6 lines
Quoted 6 lines

Tasks on cpu 31:
S task PID vruntime eligible deadline
--------------------------------------------------------------------

 S        cpuhp/31   173         0.803286   E           2.153245
 S    migration/31   174         8.167468   E          11.167468
Quoted 7 lines
Quoted 7 lines

PS For the sake of clarity in reality, some table information has been omitted here.

And that's a broken SoB chain.

author
#3 lore raw

Re: [PATCH V2] sched: Forward deadline for early tick

Thanks for your reply.

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

In sched debug file /sys/kernel/debug/sched/debug, there is a "runnable tasks" table, but not all tasks in the table are runnable.
It is inappropriate to refer to this table as "runnable tasks", so here it is changed to "Tasks on CPU %d", like:

We have used replaced runnable by queued in fair scheduler

Right, but also 'tasks on cpu' is equally wrong -- but really, if you're looking at sched/debug you have to know what you're doing anyway, so why bother with trivial stuff like this?

Sorry, I just wanted to participate more in the kernel community. While debugging the scheduler, I found this wording error. It doesn't really affect anything, it just looks a bit awkward.

By the way, I am confused why 'tasks on cpu' is wrong. I think that the tasks in the table are on a certain CPU, maybe they are sleeping, but at least they were running on this CPU at the last moment.

Looking forward to your answer. Of course, this matter doesn't seem important, and I will try to understand it myself in the future.

author
#4 lore raw

Re: [PATCH V2] sched: Forward deadline for early tick

I'm sorry, this email was an incorrect one. Please ignore this email.

Quoted 24 lines

Thanks for your reply.

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

In sched debug file /sys/kernel/debug/sched/debug, there is a "runnable tasks" table, but not all tasks in the table are runnable.
It is inappropriate to refer to this table as "runnable tasks", so here it is changed to "Tasks on CPU %d", like:

We have used replaced runnable by queued in fair scheduler

Right, but also 'tasks on cpu' is equally wrong -- but really, if you're looking at sched/debug you have to know what you're doing anyway, so why bother with trivial stuff like this?

Sorry, I just wanted to participate more in the kernel community. While debugging the scheduler, I found this wording error. It doesn't really affect anything, it just looks a bit awkward.

By the way, I am confused why 'tasks on cpu' is wrong. I think that the tasks in the table are on a certain CPU, maybe they are sleeping, but at least they were running on this CPU at the last moment.

Looking forward to your answer. Of course, this matter doesn't seem important, and I will try to understand it myself in the future.

author
#5 lore raw
In reply to Peter Zijlstra

Thanks for your reply.

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

In sched debug file /sys/kernel/debug/sched/debug, there is a "runnable tasks" table, but not all tasks in the table are runnable.
It is inappropriate to refer to this table as "runnable tasks", so here it is changed to "Tasks on CPU %d", like:

We have used replaced runnable by queued in fair scheduler

Right, but also 'tasks on cpu' is equally wrong -- but really, if you're looking at sched/debug you have to know what you're doing anyway, so why bother with trivial stuff like this?

Sorry, I just wanted to participate more in the kernel community. While debugging the scheduler, I found this wording error. It doesn't really affect anything, it just looks a bit awkward.

By the way, I am confused why 'tasks on cpu' is wrong. I think that the tasks in the table are on a certain CPU, maybe they are sleeping, but at least they were running on this CPU at the last moment.

Looking forward to your answer. Of course, this matter doesn't seem important, and I will try to understand it myself in the future.