Skip to content

Derive thread count and utilisation from procfs - #109

Draft
lforchini wants to merge 1 commit into
test/ctest-thresholdfrom
bugfix/stop-backend-util-report
Draft

lforchini wants to merge 1 commit into
test/ctest-thresholdfrom
bugfix/stop-backend-util-report

Conversation

@lforchini

@lforchini lforchini commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #89
Fixes #90

The controller now derives thread count and utilisation from procfs
instead of relying on the backend. Backends no longer report a thread
count or a per-thread utilisation in their ThreadPoolSnapshot; instead,
the controller always samples the backend process's tasks through
/proc using the instance's thread-name filter.

This removes QEMU's own jiffies sampler and the rolling metrics path
for backend-computed utilisation. The fake backend gets a deterministic
PID, and the component test harness publishes matching task stat files
through mockfs.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@lforchini
lforchini added this pull request to stack #95 October 15, 2026 11:20
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch 4 times, most recently from 798ca75 to dcb6572 Compare October 15, 2026 11:58
@lforchini
lforchini marked this pull request as ready for review October 15, 2026 11:59
@lforchini
lforchini removed this pull request from stack #95 October 21, 2026 08:27

@tmakatos tmakatos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By "bypassing" do you mean trigger scale ups/downs?

@lforchini
lforchini added this pull request to stack #152 October 23, 2026 08:22
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from dcb6572 to 104c4cd Compare October 23, 2026 08:24
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 104c4cd to 18af41d Compare October 23, 2026 08:40
@lforchini
lforchini removed this pull request from stack #152 October 23, 2026 08:44
@lforchini
lforchini added this pull request to stack #157 October 23, 2026 08:45
@lforchini
lforchini removed this pull request from stack #157 October 23, 2026 08:49
@lforchini
lforchini added this pull request to stack #159 October 23, 2026 08:50
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 18af41d to cddaca3 Compare October 29, 2026 14:29
@lforchini
lforchini marked this pull request as draft October 30, 2026 10:19
@lforchini
lforchini removed this pull request from stack #159 October 30, 2026 10:48
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from cddaca3 to 7b9233a Compare October 30, 2026 10:49
@lforchini
lforchini added this pull request to stack #173 October 30, 2026 10:50
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch 2 times, most recently from afcdf27 to 6a98116 Compare October 30, 2026 11:22
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 6a98116 to ef6d09e Compare October 30, 2026 11:43
@lforchini
lforchini removed this pull request from stack #173 November 5, 2026 15:02
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from ef6d09e to 735c813 Compare November 5, 2026 15:03
@lforchini
lforchini added this pull request to stack #176 November 5, 2026 15:03
@lforchini lforchini changed the title Pass immutable data to ScalingEngines Derive thread count and utilisation from procfs Nov 5, 2026
@lforchini
lforchini removed this pull request from stack #176 November 5, 2026 15:09
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 735c813 to 7e40811 Compare November 5, 2026 15:10
@lforchini
lforchini marked this pull request as ready for review November 5, 2026 15:10
@lforchini
lforchini added this pull request to stack #178 November 5, 2026 15:10
@lforchini
lforchini marked this pull request as draft November 6, 2026 09:05
@lforchini
lforchini removed this pull request from stack #178 November 6, 2026 10:23
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 7e40811 to f7e474c Compare November 6, 2026 10:24
@lforchini
lforchini added this pull request to stack #180 November 6, 2026 10:24
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch 5 times, most recently from a8fabb9 to a1dfcea Compare November 11, 2026 11:49
Fixes #89
Fixes #90

The controller now derives thread count and utilisation from procfs
instead of relying on the backend. Backends no longer report a thread
count or a per-thread utilisation in their ThreadPoolSnapshot; instead,
the controller always samples the backend process's tasks through
/proc using the instance's thread-name filter.

This removes QEMU's own jiffies sampler and the rolling metrics path
for backend-computed utilisation. The fake backend gets a deterministic
PID, and the component test harness publishes matching task stat files
through mockfs.

AI-Generated: most of it
Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from a1dfcea to 43ce679 Compare November 11, 2026 14:27
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.

Backend reports its own worker thread utilisation Controller uses thread count from backend

2 participants