buffer_is_zero / migration optimizations
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest10 patches 20 repliesIn review
- v49 patches 34 repliesSuperseded
- v39 patches 12 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 9 patches | 17 replies | Superseded |
Changes in v5 from the cover letter
- move zero splat vector to a different patch
- fix indentation of can_user_buffer_find_nonzero_offset()
- do not unroll the first loop in buffer_find_nonzero_offset() to optimize it for zero page checking
- use an older unrolled version of find_next_bit() without SIMD instruction as there is no evidence that the vectorized version is better if not even worse and the code is easier to understand.
- added a word in the commit message of patch 8 about the skipped pages field in QMP MigrationStats.
- fixed the order of key-value pairs of MigrationStats in qapi-schema.json
- updated info about the performance benefit of is_zero_page() to the latest benchmark results in the commit message.
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | move vector definitions to qemu-common.harch_init.c include/ | +21 | 0 replies | |
| 2/10 | add a zero splat vector to qemu-common.hinclude/ | +3 | 4 replies | |
| 3/10 | cutils: add a function to find non-zero content in a bufferinclude/ util/ | +68 | 3 replies | |
| 4/10 | buffer_is_zero: use vector optimizations if possibleutil/ | +5 | 0 replies | |
| 5/10 | bitops: unroll while loop in find_next_bit()util/ | +17 | 0 replies | |
| 6/10 | migration: search for zero instead of dup pagesarch_init.c | +6 | 11 replies | |
| 7/10 | migration: add an indicator for bulk state of ram migrationarch_init.c | +3 | 0 replies | |
| 8/10 | migration: do not sent zero pages in bulk stagearch_init.c hmp.c include/ +3 more | +33 | 0 replies | |
| 9/10 | migration: do not search dirty pages in bulk stagearch_init.c | +7 | 0 replies | |
| 10/10 | migration: use XBZRLE only after bulk stagearch_init.c | +1 | 0 replies |
Reviews trailers per patch
6 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Eric Blake | Orit Wasserman | Juan Quintela |
|---|---|---|---|
| Series | R-b | ||
| 1/10 | |||
| 2/10 | |||
| 3/10 | |||
| 4/10 | R-b | R-b | |
| 5/10 | |||
| 6/10 | R-b | R-b | |
| 7/10 | R-b | R-b | |
| 8/10 | R-b | ||
| 9/10 | R-b | R-b | |
| 10/10 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [Qemu-devel] [PATCHv5 00/10] buffer_is_zero / migration optimizations
this is v5 of my patch series with various optimizations in zero buffer checking and migration tweaks.
thanks especially to Eric Blake, Orit Wassermann and Paolo Bonzini for reviewing.
v5:
- move zero splat vector to a different patch
- fix indentation of can_user_buffer_find_nonzero_offset()
- do not unroll the first loop in buffer_find_nonzero_offset() to optimize it for zero page checking
- use an older unrolled version of find_next_bit() without SIMD instruction as there is no evidence that the vectorized version is better if not even worse and the code is easier to understand.
- added a word in the commit message of patch 8 about the skipped pages field in QMP MigrationStats.
- fixed the order of key-value pairs of MigrationStats in qapi-schema.json
- updated info about the performance benefit of is_zero_page() to the latest benchmark results in the commit message.
v4:
- do not inline buffer_find_nonzero_offset()
- inline can_usebuffer_find_nonzero_offset() correctly
- readd asserts in buffer_find_nonzero_offset() as profiling shows they do not hurt.
- change last occurences of scalar 8 by BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR
- avoid deferencing p already in patch 5 where we know that the page (p) is zero
- explicitly set bytes_sent = 0 if we skip a zero page. bytes_sent was 0 before, but it was not obvious.
- add accounting information for skipped zero pages
- fix errors reported by checkpatch.pl
v3:
- remove asserts, inline functions and add a check function if buffer_find_nonzero_offset() can be used.
- use above check function in buffer_is_zero() and find_next_bit().
- use buffer_is_nonzero_offset() directly to find zero pages. we know that all requirements are met for memory pages.
- fix C89 violation in buffer_is_zero().
- avoid derefencing p in ram_save_block() if we already know the page is zero.
- fix initialization of last_offset in reset_ram_globals().
- avoid skipping pages with offset == 0 in bulk stage in migration_bitmap_find_and_reset_dirty().
- compared to v1 check for zero pages also after bulk ram migration as there are guests (e.g. Windows) which zero out large amount of memory while running.
v2:
- fix description, add trivial zero check and add asserts to buffer_find_nonzero_offset.
- add a constant for the unroll factor of buffer_find_nonzero_offset
- replace is_dup_page() by buffer_is_zero()
- added test results to xbzrle patch
- optimize descriptions
Peter Lieven (10):
move vector definitions to qemu-common.h
add a zero splat vector to qemu-common.h
cutils: add a function to find non-zero content in a buffer
buffer_is_zero: use vector optimizations if possible
bitops: unroll while loop in find_next_bit()
migration: search for zero instead of dup pages
migration: add an indicator for bulk state of ram migration
migration: do not sent zero pages in bulk stage
migration: do not search dirty pages in bulk stage
migration: use XBZRLE only after bulk stage
arch_init.c | 74 +++++++++++++++++++---------------------- hmp.c | 2 ++ include/migration/migration.h | 2 ++ include/qemu-common.h | 37 +++++++++++++++++++++ migration.c | 3 +- qapi-schema.json | 8 +++-- qmp-commands.hx | 3 +- util/bitops.c | 18 +++++++++- util/cutils.c | 60 +++++++++++++++++++++++++++++++++ 9 files changed, 162 insertions(+), 45 deletions(-)
Signature · 1 line
1.7.9.5