[PATCH 0/5] RFC: vcpuinfo, vcpupin: the feature to get CPU affinity information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

This patchset improves the "virsh vcpupin" and "virsh vcpuinfo" command.
This is based on the following Eric's comment:
  http://www.redhat.com/archives/libvir-list/2011-June/msg00500.html

We can use virDomainGetVcpus API to get it, but can't use 
this API against inactive domains (at least in case of KVM).
There is the companion API of this, whose name is virDomainGetVcpusFlags. 
However its signature is different from what everyone expect, so we can't
use this. 

This patchset introduces the new libvirt API to retrieve CPU affinity
information and adds the code to use new API.

To be specific, the following are changed.

 (i) "virsh vcpuinfo" comes to succeed in case of the target
     domain is inactive on KVM.

  # virsh domstate VM
  shut off
  # virsh vcpuinfo VM
  VCPU:           0
  CPU:            N/A
  State:          N/A
  CPU time        N/A
  CPU Affinity:   -yyyyyy--yyyyyyyyyyyy-------------------

  VCPU:           1
  CPU:            N/A
  State:          N/A
  CPU time        N/A
  CPU Affinity:   ----------y-----------------------------

  VCPU:           2
  CPU:            N/A
  State:          N/A
  CPU time        N/A
  CPU Affinity:   -----y---yyy---yyyyyy-------------------

  VCPU:           3
  CPU:            N/A
  State:          N/A
  CPU time        N/A
  CPU Affinity:   -y-y-y-y-y-y-y-y------------------------ 


  (ii) The --query option is added to virsh vcpupin command.
    
  # virsh vcpupin VM --query --config
  VCPU: CPU Affinity
  ----------------------------------
     0: 1-6,9-20
     1: 10
     2: 5,9-11,15-20
     3: 1,3,5,7,9,11,13,15

---
  *[PATCH 1/5] vcpupin: introduce the new libvirt API (virDomainGetVcpupinInfo)
  *[PATCH 2/5] vcpupin: implement the code to support new API for the qemu driver
  *[PATCH 3/5] vcpupin: implement the remote protocol to address the new API
  *[PATCH 4/5] vcpuinfo: add the code to fallback to try new API
  *[PATCH 5/5] vcpupin: add query option to virsh vcpupin command

Best regards,
Taku Izumi

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]