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

[libvirt] [PATCH 1/8] schedinfo: Define new API virDomainSetSchedulerParametersFlags



Flags may include VIR_DOMAIN_SCHED_PARAMS_LIVE and
VIR_DOMAIN_SCHED_PARAMS_PERSISTENT, the first one means changing
the domain scheduler setting only for running domain config, and
the later one means changing both the running and persistent domain
config.

Both flags require domain is running, VIR_DOMAIN_SCHED_PARAMS_LIVE
is used by default.
---
 include/libvirt/libvirt.h.in |   14 ++++++++++++++
 src/libvirt_public.syms      |    5 +++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 04b7fbf..c87608c 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -280,6 +280,13 @@ struct _virSchedParameter {
 
 typedef virSchedParameter *virSchedParameterPtr;
 
+/* Domain scheduler parameters setting flags. */
+typedef enum {
+    /* Both these two flags works on running domain. */
+    VIR_DOMAIN_SCHED_PARAMS_LIVE    = (1 << 0), /* Affects active domain config */
+    VIR_DOMAIN_SCHED_PARAMS_PERSISTENT  = (1 << 1), /* Affects both active and persistent domain config. */
+} virDomainSchedParametersFlags;
+
 /*
  * Fetch scheduler parameters, caller allocates 'params' field of size 'nparams'
  */
@@ -293,6 +300,13 @@ int     virDomainGetSchedulerParameters (virDomainPtr domain,
 int     virDomainSetSchedulerParameters (virDomainPtr domain,
                                          virSchedParameterPtr params,
                                          int nparams);
+/*
+ * Change scheduler parameters according to flags.
+ */
+int     virDomainSetSchedulerParametersFlags (virDomainPtr domain,
+                                              virSchedParameterPtr params,
+                                              int nparams,
+                                              unsigned int flags);
 
 /**
  * virDomainBlockStats:
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index b4aed41..03d08f1 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -436,4 +436,9 @@ LIBVIRT_0.9.0 {
         virStorageVolUpload;
 } LIBVIRT_0.8.8;
 
+LIBVIRT_0.9.1 {
+    global:
+        virDomainSetSchedulerParametersFlags;
+} LIBVIRT_0.9.0;
+
 # .... define new API here using predicted next version number ....
-- 
1.7.4


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