Skip to contentSkip to conversation

sched_ext: Add migration-disabled counter to error state dump

PATCH Applied Andrea Righi 2 participants 3 messages Sep 18, 2025

Subsystems (2)
lore
Share & tools
lore

Andrea Righi

author reviewer
#0 lore raw

PATCH v2 1/1 sched_ext: Add migration-disabled counter to error state dump

Include the task's migration-disabled counter when dumping task state during an error exit.

This can help diagnose cases where tasks can get stuck, because they're unable to migrate elsewhere.

---
Changes in v2:
- Abbreviate migration_disabled= to nomig= (Tejun)
- Link to v1: https://lore.kernel.org/all/[email protected]/

 kernel/sched/ext.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched/ext.c +2 -1
index 4e6d83b3b7775..d33e6edef65c8 100644
@@ -4266,7 +4266,8 @@ static void scx_dump_task(struct seq_buf *s, struct scx_dump_ctx *dctx,
 		  p->scx.sticky_cpu, p->scx.holding_cpu, dsq_id_buf);
 	dump_line(s, "      dsq_vtime=%llu slice=%llu weight=%u",
 		  p->scx.dsq_vtime, p->scx.slice, p->scx.weight);
-	dump_line(s, "      cpus=%*pb", cpumask_pr_args(p->cpus_ptr));
+	dump_line(s, "      cpus=%*pb nomig=%u", cpumask_pr_args(p->cpus_ptr),
+		  p->migration_disabled);
 
 	if (SCX_HAS_OP(sch, dump_task)) {
 		ops_dump_init(s, "    ");
Signature · 1 line
2.51.0
reviewer Applied
#1 lore raw
Quoted 7 lines · Andrea Righi

Include the task's migration-disabled counter when dumping task state during an error exit.

This can help diagnose cases where tasks can get stuck, because they're unable to migrate elsewhere.

I did s/nomig/no_mig/ for a bit better readability and because other keys are using _ as word separators (e.g. dsq_id).

Applied to sched_ext/for-6.18.

Thanks.

Signature · 1 line
tejun
author reviewer
#2 lore raw
Quoted 11 lines · Tejun Heo
Quoted 7 lines · Andrea Righi

Include the task's migration-disabled counter when dumping task state during an error exit.

This can help diagnose cases where tasks can get stuck, because they're unable to migrate elsewhere.

I did s/nomig/no_mig/ for a bit better readability and because other keys are using _ as word separators (e.g. dsq_id).

Ack, looks good to me.

Thanks!
-Andrea