]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Include remaining task time slice in error state dump
authorAndrea Righi <arighi@nvidia.com>
Mon, 6 Jan 2025 07:20:34 +0000 (08:20 +0100)
committerTejun Heo <tj@kernel.org>
Mon, 6 Jan 2025 18:56:38 +0000 (08:56 -1000)
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.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c

index f408aa5d1efc0e2acf708965577c6c27c79cf147..c9f2fbb477ede93c2c81b26de9182fbc654151c9 100644 (file)
@@ -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)) {