Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices: CPU pinning fix (allow explicit pinning on isolated CPUs for VM instances) #14817

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

mihalicyn
Copy link
Member

Fixes: #14709

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
lxd/devices.go Outdated Show resolved Hide resolved
gabrielmougard
gabrielmougard previously approved these changes Jan 20, 2025
Copy link
Contributor

@gabrielmougard gabrielmougard left a comment

Choose a reason for hiding this comment

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

One comment but else very good !

lxd/devices.go Outdated Show resolved Hide resolved
lxd/devices.go Outdated Show resolved Hide resolved
@tomponline tomponline changed the title lxd/devices: cpu pinning fix (allow explicit pinning on isolated CPUs for VM instances) Devices: CPU pinning fix (allow explicit pinning on isolated CPUs for VM instances) Jan 21, 2025
…d CPUs

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
@@ -431,6 +431,22 @@ func getNumaNodeToCPUMap() (numaNodeToCPU map[int64][]int64, err error) {
return numaNodeToCPU, err
}

func getNumaCPUs(numaNodeToCPU map[int64][]int64, cpuNodes string) ([]int64, error) {
Copy link
Member

Choose a reason for hiding this comment

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

missing doc block on this function.

As it would be useful to the caller and reviewer to understand what is in the returned values and what format the cpuNodes string is in.

@tomponline tomponline merged commit 5b47fd7 into canonical:main Jan 22, 2025
28 checks passed
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.

VM: can't set explicit pinning on isolated CPUs
3 participants