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
- Re: [Qemu-devel] [PATCH v9 05/10] Add MigrationParams... Anthony Liguori
- Re: [Qemu-devel] [PATCH v9 05/10] Add MigrationPa... Orit Wasserman
- [Qemu-devel] [PATCH v9 08/10] Add migration capabilites Orit Wasserman
- Re: [Qemu-devel] [PATCH v9 08/10] Add migration capab... Juan Quintela
- Re: [Qemu-devel] [PATCH v9 08/10] Add migration capab... Anthony Liguori
- Re: [Qemu-devel] [PATCH v9 08/10] Add migration c... Orit Wasserman
- [Qemu-devel] [PATCH v9 09/10] Add set_cachesize command Orit Wasserman
- Re: [Qemu-devel] [PATCH v9 09/10] Add set_cachesize c... Juan Quintela
- Re: [Qemu-devel] [PATCH v9 09/10] Add set_cachesi... Orit Wasserman
- Re: [Qemu-devel] [PATCH v9 09/10] Add set_cachesize c... Anthony Liguori
- Re: [Qemu-devel] [PATCH v9 09/10] Add set_cachesi... Orit Wasserman
- [Qemu-devel] [PATCH v9 04/10] Add host_from_stream_offset_... Orit Wasserman
- Re: [Qemu-devel] [PATCH v9 04/10] Add host_from_strea... Juan Quintela
- Re: [Qemu-devel] [PATCH v9 04/10] Add host_from_s... Orit Wasserman
- Re: [Qemu-devel] [PATCH v9 04/10] Add host_from_strea... Anthony Liguori
- [Qemu-devel] [PATCH v9 03/10] Add save_block_hdr function Orit Wasserman
- Re: [Qemu-devel] [PATCH v9 03/10] Add save_block_hdr ... Juan Quintela
- Re: [Qemu-devel] [PATCH v9 03/10] Add save_block_hdr ... Anthony Liguori
- Re: [Qemu-devel] [PATCH v9 03/10] Add save_block_... Juan Quintela
- Re: [Qemu-devel] [PATCH v9 03/10] Add save_bl... Anthony Liguori
- Re: [Qemu-devel] [PATCH v9 03/10] Add sav... Eric Blake