[PR #213] AVX512 xbzrle encode function #253

Open
opened 2026-01-31 21:30:28 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/qemu/qemu/pull/213

State: closed
Merged: No


Changed Files:

  • qemu/configure
  • qemu/migration/ram.c
  • qemu/migration/xbzrle.c
  • qemu/migration/xbzrle.h
  • qemu/tests/units/test-xbzrle.c

Short description of changes:
This patch adds AVX512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. We provide AVX512 intrinsics support in qemu/configure to enable AVX512 in complier. The specific AVX512 implementation of xbzrle encode is provided in qemu/migration/xbzrle.c.

Detailed description:
This patch provides AVX512 implementation of xbzrle_encode_buffer function in qemu/migration/ram.c, qemu/migration/xbzrle.c and qemu/migration/xbzrle.h. Compared with C version of xbzrle_encode_buffer function, AVX512 version can achieve better performance on unit test provided by qemu (especially in test_encode_decode unit test case). We further provide one more unit test case called "encode_decode_random", in which dirty data are randomly located in 4K page. The results of unit test case are as follows:

unit test type xbzrle_encode_buffer xbzrle_encode_buffer_512
encode_decode_zero 9598 ms 5670 ms
encode_decode_unchanged 5722 ms 3333 ms
encode_decode_1_byte 5537 ms 5416 ms
encode_decode_overflow 119578 ms 99071 ms
encode_decode 7715 ms 4091 ms
encode_decode_random 216597 ms 88226 ms

Co-authored-by: zzachimed zhou.zhao@intel.com
Co-authored-by: vesslanjin jun.i.jin@intel.com
Signed-off-by: llxx1234 ling1.xu@intel.com

**Original Pull Request:** https://github.com/qemu/qemu/pull/213 **State:** closed **Merged:** No --- Changed Files: - qemu/configure - qemu/migration/ram.c - qemu/migration/xbzrle.c - qemu/migration/xbzrle.h - qemu/tests/units/test-xbzrle.c Short description of changes: This patch adds AVX512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. We provide AVX512 intrinsics support in qemu/configure to enable AVX512 in complier. The specific AVX512 implementation of xbzrle encode is provided in qemu/migration/xbzrle.c. Detailed description: This patch provides AVX512 implementation of xbzrle_encode_buffer function in qemu/migration/ram.c, qemu/migration/xbzrle.c and qemu/migration/xbzrle.h. Compared with C version of xbzrle_encode_buffer function, AVX512 version can achieve better performance on unit test provided by qemu (especially in test_encode_decode unit test case). We further provide one more unit test case called "encode_decode_random", in which dirty data are randomly located in 4K page. The results of unit test case are as follows: | unit test type | xbzrle_encode_buffer | xbzrle_encode_buffer_512 | | -------------- | ------------------------ | ---------------------------- | | encode_decode_zero | 9598 ms | 5670 ms | | encode_decode_unchanged| 5722 ms | 3333 ms | | encode_decode_1_byte | 5537 ms | 5416 ms | | encode_decode_overflow | 119578 ms | 99071 ms | | encode_decode | 7715 ms | 4091 ms | | encode_decode_random | 216597 ms | 88226 ms | Co-authored-by: [zzachimed](https://github.com/zzachimed) <zhou.zhao@intel.com> Co-authored-by: vesslanjin <jun.i.jin@intel.com> Signed-off-by: llxx1234 <ling1.xu@intel.com>
claunia added the pull-request label 2026-01-31 21:30:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/qemu#253