mirror of https://gitee.com/openkylin/libvirt.git
header: declare node memory parameter handling earlier
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.
This commit is contained in:
parent
86e78667b8
commit
5a2e1185bd
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue