Skip to contentSkip to conversation

fix endless look at kvm migration

PATCH In review Glauber Costa 5 participants 9 messages Jul 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix endless look at kvm migration

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
 kvm-all.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -5
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
             break;
         }
 
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
         size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
         if (!d.dirty_bitmap) {
             d.dirty_bitmap = qemu_malloc(size);
Signature · 1 line
1.6.2.2
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

Awesome - thanks a lot!

#2 lore raw
In reply to Glauber Costa
Quoted 16 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
 kvm-all.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -0
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
             break;

kvm-all.c int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, · line 336

Quoted 10 lines
kvm-all.c +0 -5
         }
 
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
         size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
         if (!d.dirty_bitmap) {
             d.dirty_bitmap = qemu_malloc(size);

Please let us revert the whole bd83677.

Jan

#3 lore raw
Quoted 20 lines · Jan Kiszka
Quoted 19 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
kvm-all.c | 5 -----

1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -0
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int  
 kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
            break;
        }
 
Quoted 10 lines
Quoted 8 lines
kvm-all.c +0 -5
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
        size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
        if (!d.dirty_bitmap) {
            d.dirty_bitmap = qemu_malloc(size);

Please let us revert the whole bd83677.

Does the non-functional if (r < 0) hurt anyone?

But if you like cleaniness, yes - reverting the whole thing would be fine with me too.

Alex

#4 lore raw
Quoted 34 lines · Alexander Graf
Quoted 20 lines · Jan Kiszka
Quoted 19 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
kvm-all.c | 5 -----

1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -0
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int
 kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
            break;
        }
 
Quoted 10 lines
Quoted 8 lines
kvm-all.c +0 -5
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
        size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
        if (!d.dirty_bitmap) {
            d.dirty_bitmap = qemu_malloc(size);

Please let us revert the whole bd83677.

Quoted 1 line

Does the non-functional if (r < 0) hurt anyone?

I would reduce the motivation of the next kvm-arch contributor to implement proper dirty log tracking. :)

Quoted 4 lines

But if you like cleaniness, yes - reverting the whole thing would be fine with me too.

There are no users for this in sight, so it's best the clean it up - and then fix the error check that this discussion has revealed.

Jan

#5 lore raw
In reply to Jan Kiszka
Quoted 19 lines · Jan Kiszka
Quoted 18 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
 kvm-all.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -0
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
             break;
         }
 
Quoted 10 lines

kvm-all.c int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, · line 336

Quoted 8 lines
kvm-all.c +0 -5
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
         size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
         if (!d.dirty_bitmap) {
             d.dirty_bitmap = qemu_malloc(size);

Please let us revert the whole bd83677.

I'm not opposed either. Avi can surely do that if he prefer.

Quoted 3 lines

Jan

#6 lore raw
Quoted 30 lines · On Mon, 27 Jul 2009 17:21:34 -0300 Glauber Costa <[email protected]> wrote:
Quoted 19 lines · Jan Kiszka
Quoted 18 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
 kvm-all.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -0
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
             break;
         }
 
Quoted 10 lines

kvm-all.c int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, · line 336

Quoted 8 lines
kvm-all.c +0 -5
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
         size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
         if (!d.dirty_bitmap) {
             d.dirty_bitmap = qemu_malloc(size);

Please let us revert the whole bd83677.

Quoted 1 line

I'm not opposed either. Avi can surely do that if he prefer.

As you have submitted the if() removal fix, you could submit
the revert as well, so that we keep this going.

#7 lore raw
Quoted 33 lines · Luiz Capitulino
Quoted 30 lines · On Mon, 27 Jul 2009 17:21:34 -0300 Glauber Costa <[email protected]> wrote:
Quoted 29 lines · Jan Kiszka
Quoted 16 lines · Glauber Costa

If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set on a slot, we will enter an endless loop. Remove the test, since it is not strictly needed anyway

---
 kvm-all.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
kvm-all.c +0 -0
index 824bb4c..d3bbd3c 100644
@@ -331,11 +331,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
             break;

kvm-all.c int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, · line 336

Quoted 10 lines
kvm-all.c +0 -5
         }
 
-        /* We didn't activate dirty logging? Don't care then. */
-        if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
-            continue;
-        }
-
         size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8;
         if (!d.dirty_bitmap) {
             d.dirty_bitmap = qemu_malloc(size);

Please let us revert the whole bd83677.

Quoted 4 lines
Quoted 1 line

I'm not opposed either. Avi can surely do that if he prefer.

As you have submitted the if() removal fix, you could submit
the revert as well, so that we keep this going.

Just that I don't see a point. Reverting a patch is a matter of doing a "git revert <treeish>"

That's up to the maintainer to do. And btw, I totally forgot that we're in qemu list here ;-) It's Anthony, not avi.

#8 lore raw
Quoted 6 lines · Glauber Costa

Just that I don't see a point. Reverting a patch is a matter of doing a "git revert <treeish>"

That's up to the maintainer to do. And btw, I totally forgot that we're in qemu list here ;-) It's Anthony, not avi.

I already did in my local tree. Just doing a full rebuild to test...

Signature · 3 lines
Regards,

Anthony Liguori