[Libvirt-cim] [PATCH 3 of 3] Expose LXC_ProcRASD so that the scheduling parameters are visible

Dan Smith danms at us.ibm.com
Mon Oct 13 18:12:12 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1223921490 25200
# Node ID e156ceabb65da50f468235dcf0fccbc4b5fb142f
# Parent  56b5db360cb4e78cec960c6b31e4f6159edb8c46
Expose LXC_ProcRASD so that the scheduling parameters are visible

Also make ProcRASD not set the VirtualQuantity field if it's zero,
so that LXC_ProcRASD's value appears undefined instead of 0.

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r 56b5db360cb4 -r e156ceabb65d schema/ResourceAllocationSettingData.registration
--- a/schema/ResourceAllocationSettingData.registration	Mon Oct 13 11:11:05 2008 -0700
+++ b/schema/ResourceAllocationSettingData.registration	Mon Oct 13 11:11:30 2008 -0700
@@ -10,3 +10,4 @@
 KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
 LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
 LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
diff -r 56b5db360cb4 -r e156ceabb65d src/Virt_RASD.c
--- a/src/Virt_RASD.c	Mon Oct 13 11:11:05 2008 -0700
+++ b/src/Virt_RASD.c	Mon Oct 13 11:11:30 2008 -0700
@@ -306,8 +306,13 @@
                 CMSetProperty(inst, "Limit",
                               (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64);
         } else if (dev->type == CIM_RES_TYPE_PROC) {
-                CMSetProperty(inst, "VirtualQuantity",
-                              (CMPIValue *)&dev->dev.vcpu.quantity, CMPI_uint64);
+                if (dev->dev.vcpu.quantity > 0) {
+                        CMSetProperty(inst,
+                                      "VirtualQuantity",
+                                      (CMPIValue *)&dev->dev.vcpu.quantity,
+                                      CMPI_uint64);
+                }
+
                 set_proc_rasd_params(broker, ref, host, inst);
         }
 




More information about the Libvirt-cim mailing list