On 04/18/2012 08:37 PM, Anthony Liguori wrote:
> On 04/11/2012 01:49 PM, Orit Wasserman wrote:
>> Change XBZRLE cache size in bytes (the size should be a power of 2).
>> If XBZRLE cache size is too small there will be many cache miss.
>>
>> Signed-off-by: Orit Wasserman<owass...@redhat.com>
>> Signed-off-by: Benoit Hudzia<benoit.hud...@sap.com>
>> Signed-off-by: Petter Svard<pett...@cs.umu.se>
>> Signed-off-by: Aidan Shribman<aidan.shrib...@sap.com>
>> ---
>>   arch_init.c      |    5 +++++
>>   hmp-commands.hx  |   15 +++++++++++++++
>>   hmp.c            |   13 +++++++++++++
>>   hmp.h            |    1 +
>>   migration.c      |   31 ++++++++++++++++++++++++++++++-
>>   migration.h      |    2 ++
>>   qapi-schema.json |   13 +++++++++++++
>>   qmp-commands.hx  |   22 ++++++++++++++++++++++
>>   8 files changed, 101 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch_init.c b/arch_init.c
>> index 793f0be..af9fcc3 100644
>> --- a/arch_init.c
>> +++ b/arch_init.c
>> @@ -175,6 +175,11 @@ typedef struct __attribute__((packed)) XBZRLEHeader {
>>
>>   static uint8 *prev_cache_page;
>>
>> +void xbzrle_cache_resize(int64_t new_size)
>> +{
>> +    cache_resize(new_size);
>> +}
> 
> If it needs to be a power of 2, then take an integer order instead of a byte. 
> That makes the function impossible to misuse.
That is a good idea.
> 
> Regards,
> 
> Anthony Liguori


Reply via email to