Skip to contentSkip to conversation

migration: rename migration_bitmap_sync_range to ramblock_sync_dirty_bitmap

PATCH Superseded Wei Yang 3 participants 4 messages Jul 18, 2019 – Aug 8, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH 1/1 migration: rename migration_bitmap_sync_range to ramblock_sync_dirty_bitmap

Rename for better understanding of the code.

---
 migration/ram.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
migration/ram.c +3 -3
index c5f9f4b0ef..66792568e2 100644
@@ -1669,7 +1669,7 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs,
     return ret;
 }
 
-static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb,
+static void ramblock_sync_dirty_bitmap(RAMState *rs, RAMBlock *rb,
                                         ram_addr_t length)
 {
     rs->migration_dirty_pages +=
@@ -1762,7 +1762,7 @@ static void migration_bitmap_sync(RAMState *rs)
     qemu_mutex_lock(&rs->bitmap_mutex);
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(rs, block, block->used_length);
+        ramblock_sync_dirty_bitmap(rs, block, block->used_length);
     }
     ram_counters.remaining = ram_bytes_remaining();
     rcu_read_unlock();
@@ -4175,7 +4175,7 @@ static void colo_flush_ram_cache(void)
     memory_global_dirty_log_sync();
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(ram_state, block, block->used_length);
+        ramblock_sync_dirty_bitmap(ram_state, block, block->used_length);
     }
     rcu_read_unlock();
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 4 lines · * Wei Yang ([email protected]) wrote:

Rename for better understanding of the code.

this needs fixing after 'just pass RAMBlock is enough'

Dave

Quoted 39 lines
---
 migration/ram.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
migration/ram.c +3 -3
index c5f9f4b0ef..66792568e2 100644
@@ -1669,7 +1669,7 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs,
     return ret;
 }
 
-static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb,
+static void ramblock_sync_dirty_bitmap(RAMState *rs, RAMBlock *rb,
                                         ram_addr_t length)
 {
     rs->migration_dirty_pages +=
@@ -1762,7 +1762,7 @@ static void migration_bitmap_sync(RAMState *rs)
     qemu_mutex_lock(&rs->bitmap_mutex);
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(rs, block, block->used_length);
+        ramblock_sync_dirty_bitmap(rs, block, block->used_length);
     }
     ram_counters.remaining = ram_bytes_remaining();
     rcu_read_unlock();
@@ -4175,7 +4175,7 @@ static void colo_flush_ram_cache(void)
     memory_global_dirty_log_sync();
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(ram_state, block, block->used_length);
+        ramblock_sync_dirty_bitmap(ram_state, block, block->used_length);
     }
     rcu_read_unlock();
 
Signature · 1 line
2.17.1

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#2 lore raw
Quoted 8 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Wei Yang ([email protected]) wrote:

Rename for better understanding of the code.

this needs fixing after 'just pass RAMBlock is enough'

You mean rebase it? Hmm... let me take a look.

Quoted 43 lines

Dave

Quoted 39 lines
---
 migration/ram.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
migration/ram.c +3 -3
index c5f9f4b0ef..66792568e2 100644
@@ -1669,7 +1669,7 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs,
     return ret;
 }
 
-static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb,
+static void ramblock_sync_dirty_bitmap(RAMState *rs, RAMBlock *rb,
                                         ram_addr_t length)
 {
     rs->migration_dirty_pages +=
@@ -1762,7 +1762,7 @@ static void migration_bitmap_sync(RAMState *rs)
     qemu_mutex_lock(&rs->bitmap_mutex);
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(rs, block, block->used_length);
+        ramblock_sync_dirty_bitmap(rs, block, block->used_length);
     }
     ram_counters.remaining = ram_bytes_remaining();
     rcu_read_unlock();
@@ -4175,7 +4175,7 @@ static void colo_flush_ram_cache(void)
     memory_global_dirty_log_sync();
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(ram_state, block, block->used_length);
+        ramblock_sync_dirty_bitmap(ram_state, block, block->used_length);
     }
     rcu_read_unlock();
 
Signature · 1 line
2.17.1

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

Signature · 2 lines
Wei Yang
Help you, Help me
author
#3 lore raw
In reply to Dr. David Alan Gilbert
Quoted 8 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Wei Yang ([email protected]) wrote:

Rename for better understanding of the code.

this needs fixing after 'just pass RAMBlock is enough'

Ok, I got your point.

Quoted 43 lines

Dave

Quoted 39 lines
---
 migration/ram.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
migration/ram.c +3 -3
index c5f9f4b0ef..66792568e2 100644
@@ -1669,7 +1669,7 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs,
     return ret;
 }
 
-static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb,
+static void ramblock_sync_dirty_bitmap(RAMState *rs, RAMBlock *rb,
                                         ram_addr_t length)
 {
     rs->migration_dirty_pages +=
@@ -1762,7 +1762,7 @@ static void migration_bitmap_sync(RAMState *rs)
     qemu_mutex_lock(&rs->bitmap_mutex);
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(rs, block, block->used_length);
+        ramblock_sync_dirty_bitmap(rs, block, block->used_length);
     }
     ram_counters.remaining = ram_bytes_remaining();
     rcu_read_unlock();
@@ -4175,7 +4175,7 @@ static void colo_flush_ram_cache(void)
     memory_global_dirty_log_sync();
     rcu_read_lock();
     RAMBLOCK_FOREACH_NOT_IGNORED(block) {
-        migration_bitmap_sync_range(ram_state, block, block->used_length);
+        ramblock_sync_dirty_bitmap(ram_state, block, block->used_length);
     }
     rcu_read_unlock();
 
Signature · 1 line
2.17.1

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

Signature · 2 lines
Wei Yang
Help you, Help me