* [PATCH] migration: Rename xbzrle_enabled xbzrle_started
@ 2023-05-04 11:53 Juan Quintela
2023-05-04 12:46 ` Daniel P. Berrangé
2023-05-04 14:17 ` Peter Xu
0 siblings, 2 replies; 4+ messages in thread
From: Juan Quintela @ 2023-05-04 11:53 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P . Berrangé, Leonardo Bras, Juan Quintela, Peter Xu
Otherwise it is confusing with the function xbzrle_enabled().
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Juan Quintela <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 43338e1f5b..06015eeb0b 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] migration: Rename xbzrle_enabled xbzrle_started
2023-05-04 11:53 [PATCH] migration: Rename xbzrle_enabled xbzrle_started Juan Quintela
@ 2023-05-04 12:46 ` Daniel P. Berrangé
2023-05-04 14:17 ` Peter Xu
1 sibling, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2023-05-04 12:46 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, Leonardo Bras, Peter Xu
On Thu, May 04, 2023 at 01:53:23PM +0200, Juan Quintela wrote:
> Otherwise it is confusing with the function xbzrle_enabled().
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> migration/ram.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] migration: Rename xbzrle_enabled xbzrle_started
2023-05-04 11:53 [PATCH] migration: Rename xbzrle_enabled xbzrle_started Juan Quintela
2023-05-04 12:46 ` Daniel P. Berrangé
@ 2023-05-04 14:17 ` Peter Xu
2023-05-04 22:49 ` Juan Quintela
1 sibling, 1 reply; 4+ messages in thread
From: Peter Xu @ 2023-05-04 14:17 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, Daniel P . Berrangé, Leonardo Bras
On Thu, May 04, 2023 at 01:53:23PM +0200, Juan Quintela wrote:
> Otherwise it is confusing with the function xbzrle_enabled().
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Juan Quintela <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 43338e1f5b..06015eeb0b 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). */
double spaces
> + bool xbzrle_started;
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] migration: Rename xbzrle_enabled xbzrle_started
2023-05-04 14:17 ` Peter Xu
@ 2023-05-04 22:49 ` Juan Quintela
0 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2023-05-04 22:49 UTC (permalink / raw)
To: Peter Xu; +Cc: qemu-devel, Daniel P . Berrangé, Leonardo Bras
Peter Xu <peterx@redhat.com> wrote:
> On Thu, May 04, 2023 at 01:53:23PM +0200, Juan Quintela wrote:
>> Otherwise it is confusing with the function xbzrle_enabled().
>>
>> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
>> Signed-off-by: Juan Quintela <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 43338e1f5b..06015eeb0b 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). */
>
> double spaces
Fixed.
>
>> + bool xbzrle_started;
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-04 22:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 11:53 [PATCH] migration: Rename xbzrle_enabled xbzrle_started Juan Quintela
2023-05-04 12:46 ` Daniel P. Berrangé
2023-05-04 14:17 ` Peter Xu
2023-05-04 22:49 ` Juan Quintela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.