[Qemu-devel] [PATCH 0/2] migration/xbzrle: make xbzrle_encode_buffer little easier

Wei Yang posted 2 patches 4 years, 11 months ago
Test s390x passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190610030852.16039-1-richardw.yang@linux.intel.com
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Juan Quintela <quintela@redhat.com>
migration/xbzrle.c | 153 +++++++++++++++++++++------------------------
util/cutils.c      |   8 +--
2 files changed, 77 insertions(+), 84 deletions(-)
[Qemu-devel] [PATCH 0/2] migration/xbzrle: make xbzrle_encode_buffer little easier
Posted by Wei Yang 4 years, 11 months ago
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(-)

-- 
2.19.1