[libvirt] [PATCH 1/6] node_memory: Define the APIs to get/set memory parameters
Osier Yang
jyang at redhat.com
Fri Sep 14 07:49:15 UTC 2012
On 2012年09月14日 15:20, Daniel Veillard wrote:
> On Fri, Sep 14, 2012 at 02:42:15PM +0800, 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 ca04f6c..5a26474 100644
>> --- a/include/libvirt/libvirt.h.in
>> +++ b/include/libvirt/libvirt.h.in
>> @@ -4305,6 +4305,69 @@ 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 "pages_to_scan"
>
> Hum, now that the API is generic and not just for shared memory
> maybe the string need to be made more specific, for example
> "pages_shared" as a general node memory information would not
> be the data about the memory tuning of KSM, it would be expected
> to be something else. I suggest to prefix all those propertes with
> "shm" for shared memory:
>
> "shm_pages_to_scan"
Okay, that's more sepcific, agreed. I will updated 3/6 soon.
Thanks!
Osier
More information about the libvir-list
mailing list