[libvirt] [Question] qemu cpu pinning

Osier Yang jyang at redhat.com
Thu Jun 23 02:25:06 UTC 2011


于 2011年06月21日 11:59, KAMEZAWA Hiroyuki 写道:
>
> Hi,
>
> When I run a VM(qemu-0.13) on my host with the latest libvirt,
>
> I used following settings.
> ==
> <domain type='kvm' id='1'>
>    <name>RHEL6</name>
>    <uuid>f7ad6bc3-e82a-1254-efb0-9e1a87d83d88</uuid>
>    <memory>2048000</memory>
>    <currentMemory>2048000</currentMemory>
>    <vcpu cpuset='4-7'>2</vcpu>
> ==
>
> I expected all works for this domain will be tied to cpu 4-7.
>
> After minites, I checked the VM behavior and it shows
> ==
> [root at bluextal src]# cat /cgroup/cpuacct/libvirt/qemu/RHEL6/cpuacct.usage_percpu
> 0 511342 3027636 94237 657712515 257104928 513463748303 252386161
> ==
>
> Hmm, cpu 1,2,3 are used for some purpose.
>
> All threads for this qemu may be following.
> ==
> [root at bluextal src]# cat /cgroup/cpuacct/libvirt/qemu/RHEL6/tasks
> 25707
> 25727
> 25728
> 25729
> ==
>
> And I found
> ==
> [root at bluextal src]# grep Cpus /proc/25707/status
> Cpus_allowed:   f0
> Cpus_allowed_list:      4-7
> [root at bluextal src]# grep Cpus /proc/25727/status
> Cpus_allowed:   ff
> Cpus_allowed_list:      0-7
> [root at bluextal src]# grep Cpus /proc/25728/status
> Cpus_allowed:   f0
> Cpus_allowed_list:      4-7
> [root at bluextal src]# grep Cpus /proc/25729/status
> Cpus_allowed:   f0
> Cpus_allowed_list:      4-7
>
> ==
>
> Thread 25727 has no limitation.
>
> Is this an expected behavior and I need more setting in XML definition ?
>

The XML is correct, no need for more setting. I'm trying to get a
NUMA box and have a look.

> Thanks,
> -Kame
>
>
>
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list




More information about the libvir-list mailing list