KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

virsh kvm CPU affinity problems

No replies
jetwins
Offline
Joined: Apr 1 2010
Points: 3

We can use taskset to bind the qemu-kvm process into any of specified cpu cores, I wonder if we can use "virsh vcpupin" to do the same thing? Why the result always inconsistence between these two commands?

For example, there is a 4 cores hypervisor, use taskset to bind the KVM guest process 2856 to 1st core, but check with the virsh vcpuinfo, the guest still be bind on the 3rd core.

[root@PC Server]# taskset -p 2856

pid 2856's current affinity mask: 1

[root@PC Server]# taskset -pc 2856

pid 2856's current affinity list: 0
(shows currently this VM is binding with the 1st core)

[root@PC Server]# virsh vcpuinfo test2
VCPU: 0
CPU: 2
State: running
CPU time: 485.9s
CPU Affinity: --y-
(shows currently this VM is binding with the 3rd core)

Also the cpu affinity specified by virsh vcpupin is mismatched with the taskset, is there any limitation?

can anyone help me?

Which result can I trust? :)

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.