Skip to content

feat(control): Add CPUs number to GetHostResource RPC reply - #48

Merged
clupuishere merged 1 commit into
mainfrom
costin/vcpu-pin-03
Jul 28, 2026
Merged

feat(control): Add CPUs number to GetHostResource RPC reply#48
clupuishere merged 1 commit into
mainfrom
costin/vcpu-pin-03

Conversation

@clupuishere

@clupuishere clupuishere commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

We extend GetHostResourceReply to include CPUs threads number. This value is conceptually the same as the one reported by nproc on Linux systems and it represents the maximum number of CPUs to which a vCPU can be pinned.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJul 28, 2026, 4:51 PM

@azenla azenla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added some thoughts :)

Comment thread protect/control/v1/control.proto Outdated
uint32 hypervisor_numa_nodes = 6;
uint32 hypervisor_cpu_sockets = 7;
uint32 hypervisor_cpu_cores = 8;
uint32 hypervisor_threads_per_core = 17;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've seen threads per core and cores per socket but I think it's technically possible for these to be incorrect these days due to asymmetric Intel CPUs where Efficiency cores have 1 thread and performance cores have two, maybe we should replace threads per core and cores per socket with just hypervisor_cpu_threads which should then be equal to hypervisor_nr_cpus.

So maybe we can replace all of these with hypervisor_cpu_threads?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in next revision.

We extend GetHostResourceReply to include CPUs threads number. This
value is conceptually the same as the one reported by `nproc` on Linux
systems and it represents the maximum number of CPUs to which a vCPU can
be pinned.

Signed-off-by: Costin Lupu <costin@edera.dev>
@clupuishere
clupuishere merged commit c015a1a into main Jul 28, 2026
2 checks passed
@clupuishere
clupuishere deleted the costin/vcpu-pin-03 branch July 28, 2026 18:26
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.

2 participants