]> xenbits.xensource.com Git - libvirt.git/commitdiff
header: declare node memory parameter handling earlier
authorEric Blake <eblake@redhat.com>
Tue, 23 Oct 2012 17:47:46 +0000 (11:47 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 23 Oct 2012 20:32:46 +0000 (14:32 -0600)
Commit 12ad7435 added new functions (virNodeGetMemoryParameters,
virNodeSetMemoryParameters) into the section of the file reserved
for deprecated names.  Fix this by moving things earlier; split
into two patches to make git diff easier to read.

* include/libvirt/libvirt.h.in: Move virNodeGetMemoryParameters
and friends earlier, add a note to prevent relapse.

include/libvirt/libvirt.h.in

index 4a9d088f31cb49228e7e76ce828670f537530c7a..a98eee0abdc8a9d50a33c182d9b5d30a261fe700 100644 (file)
@@ -675,6 +675,81 @@ struct _virNodeMemoryStats {
     unsigned long long value;
 };
 
+/*
+ * VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN:
+ *
+ * Macro for typed parameter that represents how many present pages
+ * to scan before the shared memory service goes to sleep.
+ */
+# define VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN      "shm_pages_to_scan"
+
+/*
+ * VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS:
+ *
+ * Macro for typed parameter that represents how many milliseconds
+ * the shared memory service should sleep before next scan.
+ */
+# define VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS    "shm_sleep_millisecs"
+
+/*
+ * VIR_NODE_MEMORY_SHARED_PAGES_SHARED:
+ *
+ * Macro for typed parameter that represents how many the shared
+ * memory pages are being used.
+ */
+# define VIR_NODE_MEMORY_SHARED_PAGES_SHARED       "shm_pages_shared"
+
+/*
+ * VIR_NODE_MEMORY_SHARED_PAGES_SHARING:
+ *
+ * Macro for typed parameter that represents how many sites are
+ * sharing the pages i.e. how much saved.
+ */
+# define VIR_NODE_MEMORY_SHARED_PAGES_SHARING      "shm_pages_sharing"
+
+/* VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED:
+ *
+ * Macro for typed parameter that represents how many pages unique
+ * but repeatedly checked for merging.
+ */
+# define VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED     "shm_pages_unshared"
+
+/* VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE:
+ *
+ * Macro for typed parameter that represents how many pages changing
+ * too fast to be placed in a tree.
+ */
+# define VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE     "shm_pages_volatile"
+
+/* VIR_NODE_MEMORY_SHARED_FULL_SCAN:
+ *
+ * Macro for typed parameter that represents how many times all
+ * mergeable areas have been scanned.
+ */
+# define VIR_NODE_MEMORY_SHARED_FULL_SCANS         "shm_full_scans"
+
+/* VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES:
+ *
+ * Macro for typed parameter that represents whether pages from
+ * different NUMA nodes can be merged. The parameter has type int,
+ * when its value is 0, only pages which physically reside in the
+ * memory area of same NUMA node are merged; When its value is 1,
+ * pages from all nodes can be merged. Other values are reserved
+ * for future use.
+ */
+# define VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES "shm_merge_across_nodes"
+
+
+int virNodeGetMemoryParameters(virConnectPtr conn,
+                               virTypedParameterPtr params,
+                               int *nparams,
+                               unsigned int flags);
+
+int virNodeSetMemoryParameters(virConnectPtr conn,
+                               virTypedParameterPtr params,
+                               int nparams,
+                               unsigned int flags);
+
 
 /* Management of scheduler parameters */
 
@@ -4469,80 +4544,8 @@ typedef struct _virTypedParameter virMemoryParameter;
  */
 typedef virMemoryParameter *virMemoryParameterPtr;
 
-/*
- * VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN:
- *
- * Macro for typed parameter that represents how many present pages
- * to scan before the shared memory service goes to sleep.
- */
-# define VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN      "shm_pages_to_scan"
-
-/*
- * VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS:
- *
- * Macro for typed parameter that represents how many milliseconds
- * the shared memory service should sleep before next scan.
- */
-# define VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS    "shm_sleep_millisecs"
-
-/*
- * VIR_NODE_MEMORY_SHARED_PAGES_SHARED:
- *
- * Macro for typed parameter that represents how many the shared
- * memory pages are being used.
- */
-# define VIR_NODE_MEMORY_SHARED_PAGES_SHARED       "shm_pages_shared"
-
-/*
- * VIR_NODE_MEMORY_SHARED_PAGES_SHARING:
- *
- * Macro for typed parameter that represents how many sites are
- * sharing the pages i.e. how much saved.
- */
-# define VIR_NODE_MEMORY_SHARED_PAGES_SHARING      "shm_pages_sharing"
-
-/* VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED:
- *
- * Macro for typed parameter that represents how many pages unique
- * but repeatedly checked for merging.
- */
-# define VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED     "shm_pages_unshared"
-
-/* VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE:
- *
- * Macro for typed parameter that represents how many pages changing
- * too fast to be placed in a tree.
- */
-# define VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE     "shm_pages_volatile"
-
-/* VIR_NODE_MEMORY_SHARED_FULL_SCAN:
- *
- * Macro for typed parameter that represents how many times all
- * mergeable areas have been scanned.
- */
-# define VIR_NODE_MEMORY_SHARED_FULL_SCANS         "shm_full_scans"
-
-/* VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES:
- *
- * Macro for typed parameter that represents whether pages from
- * different NUMA nodes can be merged. The parameter has type int,
- * when its value is 0, only pages which physically reside in the
- * memory area of same NUMA node are merged; When its value is 1,
- * pages from all nodes can be merged. Other values are reserved
- * for future use.
- */
-# define VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES "shm_merge_across_nodes"
-
-
-int virNodeGetMemoryParameters(virConnectPtr conn,
-                               virTypedParameterPtr params,
-                               int *nparams,
-                               unsigned int flags);
-
-int virNodeSetMemoryParameters(virConnectPtr conn,
-                               virTypedParameterPtr params,
-                               int nparams,
-                               unsigned int flags);
+/* Add new interfaces to the appropriate sections earlier in this
+ * file; the end of the file is reserved for deprecated names.  */
 
 #ifdef __cplusplus
 }