mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 06:34:03 +00:00
resource-control: fix setting CPU affinities on Linux
With this fix the vCPU pinning feature chooses the correct physical cores to pin the vCPU threads on rather than always using core 0. Fixes #6831 Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
This commit is contained in:
parent
9e83795fca
commit
3e85bf5b17
@ -156,7 +156,7 @@ func IsCgroupV1() (bool, error) {
|
||||
func SetThreadAffinity(threadID int, cpuSetSlice []int) error {
|
||||
unixCPUSet := unix.CPUSet{}
|
||||
|
||||
for cpuId := range cpuSetSlice {
|
||||
for _, cpuId := range cpuSetSlice {
|
||||
unixCPUSet.Set(cpuId)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user