On 2012年09月10日 20:08, Osier Yang wrote:
* include/libvirt/libvirt.h.in: (Add macros for the param fields, declare the APIs). * src/driver.h: (New methods for the driver struct) * src/libvirt.c: (Implement the public APIs) * src/libvirt_public.syms: (Export the public symbols) --- include/libvirt/libvirt.h.in | 63 ++++++++++++++++++++++ python/generator.py | 2 + src/driver.h | 14 +++++ src/libvirt.c | 121 ++++++++++++++++++++++++++++++++++++++++++ src/libvirt_public.syms | 2 + 5 files changed, 202 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index f63178c..5d8e6f4 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -4272,6 +4272,69 @@ typedef struct _virTypedParameter virMemoryParameter; */ typedef virMemoryParameter *virMemoryParameterPtr; +/* + * VIR_NODE_KSM_PAGES_TO_SCAN: + * + * Macro for typed parameter that represents how many present pages + * to scan before ksmd goes to sleep. + */ +# define VIR_NODE_SHARED_MEMORY_PAGES_TO_SCAN "pages_to_scan" + +/* + * VIR_NODE_KSM_SLEEP_MILLISECS: + * + * Macro for typed parameter that represents how many milliseconds + * ksmd should sleep before next scan. + */ +# define VIR_NODE_SHARED_MEMORY_SLEEP_MILLISECS "sleep_millisecs" + +/* + * VIR_NODE_KSM_PAGES_SHARED: + * + * Macro for typed parameter that represents how many ksm shared pages + * are being used. + */ +# define VIR_NODE_SHARED_MEMORY_PAGES_SHARED "pages_shared" + +/* + * VIR_NODE_KSM_PAGES_SHARING: + * + * Macro for typed parameter that represents how many sites are + * sharing the pages i.e. how much saved. + */ +# define VIR_NODE_SHARED_MEMORY_PAGES_SHARING "pages_sharing" + +/* VIR_NODE_KSM_PAGES_UNSHARED: + * + * Macro for typed parameter that represents how many pages unique + * but repeatedly checked for merging. + */ +# define VIR_NODE_SHARED_MEMORY_PAGES_UNSHARED "pages_unshared" + +/* VIR_NODE_KSM_PAGES_VOLATILE: + * + * Macro for typed parameter that represents how many pages changing + * too fast to be placed in a tree. + */ +# define VIR_NODE_SHARED_MEMORY_PAGES_VOLATILE "pages_volatile" + +/* VIR_NODE_KSM_FULL_SCAN: + * + * Macro for typed parameter that represents how many times all + * mergeable areas have been scanned. + */ +# define VIR_NODE_SHARED_MEMORY_FULL_SCANS "full_scans" +
Oh, I forgot to change the comments, squashed with following diff on my local repo:
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 5d8e6f4..7f3b6c8 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -4273,52 +4273,52 @@ typedef struct _virTypedParameter virMemoryParameter; typedef virMemoryParameter *virMemoryParameterPtr; /* - * VIR_NODE_KSM_PAGES_TO_SCAN: + * VIR_NODE_SHARED_MEMORY_PAGES_TO_SCAN: * * Macro for typed parameter that represents how many present pages - * to scan before ksmd goes to sleep. + * to scan before the shared memory service goes to sleep. */ # define VIR_NODE_SHARED_MEMORY_PAGES_TO_SCAN "pages_to_scan" /* - * VIR_NODE_KSM_SLEEP_MILLISECS: + * VIR_NODE_SHARED_MEMORY_SLEEP_MILLISECS: * * Macro for typed parameter that represents how many milliseconds - * ksmd should sleep before next scan. + * the shared memory service should sleep before next scan. */ # define VIR_NODE_SHARED_MEMORY_SLEEP_MILLISECS "sleep_millisecs" /* - * VIR_NODE_KSM_PAGES_SHARED: + * VIR_NODE_SHARED_MEMORY_PAGES_SHARED: * - * Macro for typed parameter that represents how many ksm shared pages + * Macro for typed parameter that represents how many the shared pages * are being used. */ # define VIR_NODE_SHARED_MEMORY_PAGES_SHARED "pages_shared" /* - * VIR_NODE_KSM_PAGES_SHARING: + * VIR_NODE_SHARED_MEMORY_PAGES_SHARING: * * Macro for typed parameter that represents how many sites are * sharing the pages i.e. how much saved. */ # define VIR_NODE_SHARED_MEMORY_PAGES_SHARING "pages_sharing" -/* VIR_NODE_KSM_PAGES_UNSHARED: +/* VIR_NODE_SHARED_MEMORY_PAGES_UNSHARED: * * Macro for typed parameter that represents how many pages unique * but repeatedly checked for merging. */ # define VIR_NODE_SHARED_MEMORY_PAGES_UNSHARED "pages_unshared" -/* VIR_NODE_KSM_PAGES_VOLATILE: +/* VIR_NODE_SHARED_MEMORY_PAGES_VOLATILE: * * Macro for typed parameter that represents how many pages changing * too fast to be placed in a tree. */ # define VIR_NODE_SHARED_MEMORY_PAGES_VOLATILE "pages_volatile" -/* VIR_NODE_KSM_FULL_SCAN: +/* VIR_NODE_SHARED_MEMORY_FULL_SCAN: * * Macro for typed parameter that represents how many times all * mergeable areas have been scanned.
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list