Description of problem: "virsh vcpupin" cannot allocate cpu at a time to all VCPUs in the domain. When I allocate all same physical CPU number to all VCPUs, I have to execute the command to virtual CPU one by one. But, "xm vcpu-pin" can use the keyword "all" to <vcpu> operand, and can allocate cpu at a time to all VCPUs in the domain. Version-Release number of selected component (if applicable): installed from RPM (RHEL5.1 RC): kernel-xen: 2.6.18-52.el5 xen: 3.0.3-41.el5 got from cvs: libvirt: upstream(Revision of Changelog is 1.772) How reproducible: Always Steps to Reproduce: 1.Start the guest domain with the configuration file # cat /etc/xen/guest_dom name = "guest_dom" uuid = "29610f8f-e164-ea5a-a54a-2d909e8d9043" maxmem = 1024 memory = 1024 vcpus = 32 cpu_weight = 512 cpu_cap = 300 bootloader = "/usr/bin/pygrub" on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" vnc = 1 vncunused = 0 vncdisplay = "25" disk = [ "phy:/dev/sda5,xvda,w" ] vif = [ "mac=02:17:42:2F:01:13,bridge=xenbr2" ] # virsh start guest_dom 2.Execute virsh vcpupin for all vcpus # virsh vcpupin guest_dom 0 0 # virsh vcpupin guest_dom 1 0 # virsh vcpupin guest_dom 2 0 # virsh vcpupin guest_dom 3 0 : : # virsh vcpupin guest_dom 31 0 Actual results: "virsh vcpupin" cannot allocate cpu at a time to all VCPUs in the domain. Expected results: "virsh vcpupin" can allocate cpu at a time to all VCPUs in the domain. Additional info:
When would you actually use this. Having a vary large number of vcpus and pinning them all to a single physical CPU sounds a really bad idea performance wise, I'm not sure it is actually a good idea to add this option. This sounds more thangerous than useful. Please suggest this extension on the mailing-list as it's a new feature and please justify, because that sounds more dangerous than useful to me right now, Daniel
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
It is just an example that having too many vcpus and pining them to a single physical CPU. I think it will be useful to set the PCPU to all VCPU when each guest domain has several setting of vcpu affinites, because it is hard to work to change the several setting. like the following case: Dom1 VCPU:0-3 PCPU:0-3 Dom2 VCPU:0-3 PCPU:4-7 Dom3 VCPU:0-3 PCPU:8-11 Dom4 VCPU:0-9 PCPU:12-21 And this function is necessary to implement the following feature. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=251641 First, we implement allocate cpu at a time to all VCPUs in the active domain. Next, we use the interface pinning all vcpus when starting by the information of CPU in domain configuration file.
for 251641 I don't think it makes sense to add vcpu pinning to XML configuration. And I also don't see how this relates to the current bugzilla. I don't think the way you want to extend virsh to be very practical. I don't think adding a bunch of special cases will be a good approach ('all' is a special case). Please look instead to my suggested tuning extension to virsh https://www.redhat.com/archives/libvir-list/2007-October/msg00245.html I don't think that tricks like 'all' will really help the user much I think designing the proper virsh functionalities for saving and loading tuning information will be far more useful, generic and versatile. Daniel
Okay. I agree to your opinion. I withdraw this ticket. Please close this. Nobuhiro
Thanks, closed accordingly ! Daniel