Skip to contentSkip to conversation

sched_ext: Include remaining task time slice in error state dump

PATCH In review Andrea Righi 2 participants 2 messages Jan 6, 2025 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched_ext: Include remaining task time slice in error state dump

Report the remaining time slice when dumping task information during an error exit.

This information can be useful for tracking incorrect or excessively long time slices in schedulers that implement dynamic time slice logic.

---
 kernel/sched/ext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/ext.c +2 -2
index 0ce116e0f67c..010ce7680bbc 100644
@@ -5218,9 +5218,9 @@ static void scx_dump_task(struct seq_buf *s, struct scx_dump_ctx *dctx,
 		  scx_get_task_state(p), p->scx.flags & ~SCX_TASK_STATE_MASK,
 		  p->scx.dsq_flags, ops_state & SCX_OPSS_STATE_MASK,
 		  ops_state >> SCX_OPSS_QSEQ_SHIFT);
-	dump_line(s, "      sticky/holding_cpu=%d/%d dsq_id=%s dsq_vtime=%llu",
+	dump_line(s, "      sticky/holding_cpu=%d/%d dsq_id=%s dsq_vtime=%llu slice=%llu",
 		  p->scx.sticky_cpu, p->scx.holding_cpu, dsq_id_buf,
-		  p->scx.dsq_vtime);
+		  p->scx.dsq_vtime, p->scx.slice);
 	dump_line(s, "      cpus=%*pb", cpumask_pr_args(p->cpus_ptr));
 
 	if (SCX_HAS_OP(dump_task)) {
Signature · 1 line
2.47.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Andrea Righi

Report the remaining time slice when dumping task information during an error exit.

This information can be useful for tracking incorrect or excessively long time slices in schedulers that implement dynamic time slice logic.

Thanks.

Signature · 1 line
tejun