mbox series

[0/2] migration/xbzrle: make xbzrle_encode_buffer little easier

Message ID 20190610030852.16039-1-richardw.yang@linux.intel.com (mailing list archive)
Headers show
Series migration/xbzrle: make xbzrle_encode_buffer little easier | expand

Message

Wei Yang June 10, 2019, 3:08 a.m. UTC
Current xbzrle_encode_buffer() do everything in a big loop, which is a little
difficult for audience to catch the logic.

We can refine the logic with:

  * get the length of a run
  * encode it

At the same time, I found the encoding and decoding function has some extra
pointer operation. Removing this could save some code space.

Wei Yang (2):
  cutils: remove one unnecessary pointer operation
  migration/xbzrle: make xbzrle_encode_buffer little easier to read

 migration/xbzrle.c | 153 +++++++++++++++++++++------------------------
 util/cutils.c      |   8 +--
 2 files changed, 77 insertions(+), 84 deletions(-)