[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/16] migration: Rename xbzrle_enabled xbzrle_started
From: |
Juan Quintela |
Subject: |
[PULL 05/16] migration: Rename xbzrle_enabled xbzrle_started |
Date: |
Fri, 5 May 2023 02:48:01 +0200 |
Otherwise it is confusing with the function xbzrle_enabled().
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230504115323.24407-1-quintela@redhat.com>
---
migration/ram.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 7d81c4a39e..23ba1cefff 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -388,8 +388,8 @@ struct RAMState {
uint64_t xbzrle_pages_prev;
/* Amount of xbzrle encoded bytes since the beginning of the period */
uint64_t xbzrle_bytes_prev;
- /* Start using XBZRLE (e.g., after the first round). */
- bool xbzrle_enabled;
+ /* Are we really using XBZRLE (e.g., after the first round). */
+ bool xbzrle_started;
/* Are we on the last stage of migration */
bool last_stage;
/* compression statistics since the beginning of the period */
@@ -1420,7 +1420,7 @@ static int ram_save_page(RAMState *rs, PageSearchStatus
*pss)
trace_ram_save_page(block->idstr, (uint64_t)offset, p);
XBZRLE_cache_lock();
- if (rs->xbzrle_enabled && !migration_in_postcopy()) {
+ if (rs->xbzrle_started && !migration_in_postcopy()) {
pages = save_xbzrle_page(rs, pss, &p, current_addr,
block, offset);
if (!rs->last_stage) {
@@ -1636,7 +1636,7 @@ static int find_dirty_block(RAMState *rs,
PageSearchStatus *pss)
pss->complete_round = true;
/* After the first round, enable XBZRLE. */
if (migrate_xbzrle()) {
- rs->xbzrle_enabled = true;
+ rs->xbzrle_started = true;
}
}
/* Didn't find anything this time, but try again on the new block */
@@ -2288,7 +2288,7 @@ static bool save_page_use_compression(RAMState *rs)
* using the data compression. In theory, xbzrle can do better than
* compression.
*/
- if (rs->xbzrle_enabled) {
+ if (rs->xbzrle_started) {
return false;
}
@@ -2357,7 +2357,7 @@ static int ram_save_target_page_legacy(RAMState *rs,
PageSearchStatus *pss)
/* Must let xbzrle know, otherwise a previous (now 0'd) cached
* page would be stale
*/
- if (rs->xbzrle_enabled) {
+ if (rs->xbzrle_started) {
XBZRLE_cache_lock();
xbzrle_cache_zero_page(rs, block->offset + offset);
XBZRLE_cache_unlock();
@@ -2738,7 +2738,7 @@ static void ram_state_reset(RAMState *rs)
rs->last_seen_block = NULL;
rs->last_page = 0;
rs->last_version = ram_list.version;
- rs->xbzrle_enabled = false;
+ rs->xbzrle_started = false;
}
#define MAX_WAIT 50 /* ms, half buffered_file limit */
--
2.40.0
- [PULL 00/16] Migration 20230505 patches, Juan Quintela, 2023/05/04
- [PULL 01/16] migration: Fix block_bitmap_mapping migration, Juan Quintela, 2023/05/04
- [PULL 03/16] migration: Document all migration_stats, Juan Quintela, 2023/05/04
- [PULL 02/16] migration/rdma: Don't pass the QIOChannelRDMA as an opaque, Juan Quintela, 2023/05/04
- [PULL 05/16] migration: Rename xbzrle_enabled xbzrle_started,
Juan Quintela <=
- [PULL 04/16] migration: Put zero_pages in alphabetical order, Juan Quintela, 2023/05/04
- [PULL 06/16] migration: Make RAM_SAVE_FLAG_HOOK a normal case entry, Juan Quintela, 2023/05/04
- [PULL 07/16] migration/rdma: simplify ram_control_load_hook(), Juan Quintela, 2023/05/04
- [PULL 08/16] migration/rdma: We can calculate the rioc from the QEMUFile, Juan Quintela, 2023/05/04
- [PULL 09/16] migration/rdma: It makes no sense to recive that flag without RDMA, Juan Quintela, 2023/05/04
- [PULL 10/16] migration/rdma: Check for postcopy sooner, Juan Quintela, 2023/05/04
- [PULL 13/16] qemu-file: No need to check for shutdown in qemu_file_rate_limit, Juan Quintela, 2023/05/04
- [PULL 12/16] migration: qemu_file_total_transferred() function is monotonic, Juan Quintela, 2023/05/04
- [PULL 11/16] migration: max_postcopy_bandwidth is a size parameter, Juan Quintela, 2023/05/04
- [PULL 14/16] qemu-file: remove shutdown member, Juan Quintela, 2023/05/04