Skip to content

[mitosis] Enrich trace output for cells - #3683

Open
tommy-u wants to merge 1 commit into
sched-ext:mainfrom
tommy-u:mitosis-trace-more-cell-stats
Open

[mitosis] Enrich trace output for cells#3683
tommy-u wants to merge 1 commit into
sched-ext:mainfrom
tommy-u:mitosis-trace-more-cell-stats

Conversation

@tommy-u

@tommy-u tommy-u commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Improve cell TRACE output.

Cells used to print in unstable order, this sorts them by cell number.

Adds CPU count plus current/smoothed utilization, making rebalance/debug runs easier to inspect.

Before:
CELL[0]: fffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff

After:
... CELL[0]: fffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff (316 CPUs, util=2.7%, smoothed=1.8%)

@tommy-u
tommy-u requested review from dforsyth, dschatzberg, kkdwvd and likewhatevs and removed request for dforsyth July 2, 2026 22:28
@likewhatevs

Copy link
Copy Markdown
Contributor

Adding in a cell.cpus.to_cpulist() to print in there would be nice (for hex challenged folks).

@dschatzberg dschatzberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but I think we have a bug in collect_demand_metrics - see my inline comment.


if delta_running == 0 && delta_lent == 0 {
continue;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we skip updating util_pct for an idle cell. This seems incorrect since it should effect util which is going to reflect in your trace output.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also short-circuits from updating smoothed_util

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants