Repository navigation
Conversation
The controller already counts the backend tasks that match the thread name filter when it samples their CPU usage in /proc. Make that the only source of the thread count, sampling /proc on every refresh, even when the backend reports per-thread utilisation. Backends may still report the thread count, as a future change can use it to avoid rescanning /proc on every refresh, so make ThreadPoolSnapshot::thread_count optional. The controller ignores it for now. The QEMU backend now selects its IOThreads by task name, "IO <id>", which QEMU sets when started with debug-threads=on, as libvirt does. When no task matches, keep the previous thread count and postpone classifying the initial pool until a later poll observes it. Don't apply engine decisions to a VM whose threads haven't been counted yet, as they would be relative to a thread count of zero. AI-generated: everything Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The controller already counts the backend tasks that match the thread name filter when it samples their CPU usage in /proc. Make that the only source of the thread count, sampling /proc on every refresh, even when the backend reports per-thread utilisation.
Backends may still report the thread count, as a future change can use it to avoid rescanning /proc on every refresh, so make ThreadPoolSnapshot::thread_count optional. The controller ignores it for now.
The QEMU backend now selects its IOThreads by task name, "IO ", which QEMU sets when started with debug-threads=on, as libvirt does.
When no task matches, keep the previous thread count and postpone classifying the initial pool until a later poll observes it. Don't apply engine decisions to a VM whose threads haven't been counted yet, as they would be relative to a thread count of zero.
AI-generated: everything