qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix endless look at kvm migration
@ 2009-07-27 18:26 Glauber Costa
  2009-07-27 18:41 ` [Qemu-devel] " Alexander Graf
  2009-07-27 18:44 ` Jan Kiszka
  0 siblings, 2 replies; 9+ messages in thread
From: Glauber Costa @ 2009-07-27 18:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Alexander Graf

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

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Alexander Graf <agraf@suse.de>
---
 kvm-all.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 824bb4c..d3bbd3c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -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);
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 18:26 [Qemu-devel] [PATCH] fix endless look at kvm migration Glauber Costa
@ 2009-07-27 18:41 ` Alexander Graf
  2009-07-27 18:44 ` Jan Kiszka
  1 sibling, 0 replies; 9+ messages in thread
From: Alexander Graf @ 2009-07-27 18:41 UTC (permalink / raw)
  To: Glauber Costa; +Cc: aliguori, qemu-devel


On 27.07.2009, at 20:26, Glauber Costa wrote:

> 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!

Acked-by: Alexander Graf <agraf@suse.de>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 18:26 [Qemu-devel] [PATCH] fix endless look at kvm migration Glauber Costa
  2009-07-27 18:41 ` [Qemu-devel] " Alexander Graf
@ 2009-07-27 18:44 ` Jan Kiszka
  2009-07-27 18:47   ` Alexander Graf
  2009-07-27 20:21   ` Glauber Costa
  1 sibling, 2 replies; 9+ messages in thread
From: Jan Kiszka @ 2009-07-27 18:44 UTC (permalink / raw)
  To: Glauber Costa; +Cc: aliguori, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]

Glauber Costa wrote:
> 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
> 
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> CC: Alexander Graf <agraf@suse.de>
> ---
>  kvm-all.c |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 824bb4c..d3bbd3c 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -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);

Please let us revert the whole bd83677.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 18:44 ` Jan Kiszka
@ 2009-07-27 18:47   ` Alexander Graf
  2009-07-27 18:52     ` Jan Kiszka
  2009-07-27 20:21   ` Glauber Costa
  1 sibling, 1 reply; 9+ messages in thread
From: Alexander Graf @ 2009-07-27 18:47 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Glauber Costa, qemu-devel, aliguori


On 27.07.2009, at 20:44, Jan Kiszka wrote:

> Glauber Costa wrote:
>> 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
>>
>> Signed-off-by: Glauber Costa <glommer@redhat.com>
>> CC: Alexander Graf <agraf@suse.de>
>> ---
>> kvm-all.c |    5 -----
>> 1 files changed, 0 insertions(+), 5 deletions(-)
>>
>> diff --git a/kvm-all.c b/kvm-all.c
>> index 824bb4c..d3bbd3c 100644
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
>> @@ -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);
>
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 18:47   ` Alexander Graf
@ 2009-07-27 18:52     ` Jan Kiszka
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2009-07-27 18:52 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Glauber Costa, qemu-devel, aliguori

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

Alexander Graf wrote:
> 
> On 27.07.2009, at 20:44, Jan Kiszka wrote:
> 
>> Glauber Costa wrote:
>>> 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
>>>
>>> Signed-off-by: Glauber Costa <glommer@redhat.com>
>>> CC: Alexander Graf <agraf@suse.de>
>>> ---
>>> kvm-all.c |    5 -----
>>> 1 files changed, 0 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/kvm-all.c b/kvm-all.c
>>> index 824bb4c..d3bbd3c 100644
>>> --- a/kvm-all.c
>>> +++ b/kvm-all.c
>>> @@ -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);
>>
>> Please let us revert the whole bd83677.
> 
> 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. :)

> 
> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 18:44 ` Jan Kiszka
  2009-07-27 18:47   ` Alexander Graf
@ 2009-07-27 20:21   ` Glauber Costa
  2009-07-27 20:22     ` Luiz Capitulino
  1 sibling, 1 reply; 9+ messages in thread
From: Glauber Costa @ 2009-07-27 20:21 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: aliguori, qemu-devel, Alexander Graf

On Mon, Jul 27, 2009 at 08:44:59PM +0200, Jan Kiszka wrote:
> Glauber Costa wrote:
> > 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
> > 
> > Signed-off-by: Glauber Costa <glommer@redhat.com>
> > CC: Alexander Graf <agraf@suse.de>
> > ---
> >  kvm-all.c |    5 -----
> >  1 files changed, 0 insertions(+), 5 deletions(-)
> > 
> > diff --git a/kvm-all.c b/kvm-all.c
> > index 824bb4c..d3bbd3c 100644
> > --- a/kvm-all.c
> > +++ b/kvm-all.c
> > @@ -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);
> 
> Please let us revert the whole bd83677.
I'm not opposed either. Avi can surely do that if he prefer.

> 
> Jan
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 20:21   ` Glauber Costa
@ 2009-07-27 20:22     ` Luiz Capitulino
  2009-07-27 20:36       ` Glauber Costa
  0 siblings, 1 reply; 9+ messages in thread
From: Luiz Capitulino @ 2009-07-27 20:22 UTC (permalink / raw)
  To: Glauber Costa; +Cc: aliguori, Jan Kiszka, qemu-devel, Alexander Graf

On Mon, 27 Jul 2009 17:21:34 -0300
Glauber Costa <glommer@redhat.com> wrote:

> On Mon, Jul 27, 2009 at 08:44:59PM +0200, Jan Kiszka wrote:
> > Glauber Costa wrote:
> > > 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
> > > 
> > > Signed-off-by: Glauber Costa <glommer@redhat.com>
> > > CC: Alexander Graf <agraf@suse.de>
> > > ---
> > >  kvm-all.c |    5 -----
> > >  1 files changed, 0 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/kvm-all.c b/kvm-all.c
> > > index 824bb4c..d3bbd3c 100644
> > > --- a/kvm-all.c
> > > +++ b/kvm-all.c
> > > @@ -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);
> > 
> > Please let us revert the whole bd83677.
> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 20:36       ` Glauber Costa
@ 2009-07-27 20:31         ` Anthony Liguori
  0 siblings, 0 replies; 9+ messages in thread
From: Anthony Liguori @ 2009-07-27 20:31 UTC (permalink / raw)
  To: Glauber Costa; +Cc: Alexander Graf, Jan Kiszka, qemu-devel, Luiz Capitulino

Glauber Costa wrote:
> 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...

-- 
Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] fix endless look at kvm migration
  2009-07-27 20:22     ` Luiz Capitulino
@ 2009-07-27 20:36       ` Glauber Costa
  2009-07-27 20:31         ` Anthony Liguori
  0 siblings, 1 reply; 9+ messages in thread
From: Glauber Costa @ 2009-07-27 20:36 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: aliguori, Jan Kiszka, qemu-devel, Alexander Graf

On Mon, Jul 27, 2009 at 05:22:51PM -0300, Luiz Capitulino wrote:
> On Mon, 27 Jul 2009 17:21:34 -0300
> Glauber Costa <glommer@redhat.com> wrote:
> 
> > On Mon, Jul 27, 2009 at 08:44:59PM +0200, Jan Kiszka wrote:
> > > Glauber Costa wrote:
> > > > 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
> > > > 
> > > > Signed-off-by: Glauber Costa <glommer@redhat.com>
> > > > CC: Alexander Graf <agraf@suse.de>
> > > > ---
> > > >  kvm-all.c |    5 -----
> > > >  1 files changed, 0 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/kvm-all.c b/kvm-all.c
> > > > index 824bb4c..d3bbd3c 100644
> > > > --- a/kvm-all.c
> > > > +++ b/kvm-all.c
> > > > @@ -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);
> > > 
> > > Please let us revert the whole bd83677.
> > 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-07-27 20:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27 18:26 [Qemu-devel] [PATCH] fix endless look at kvm migration Glauber Costa
2009-07-27 18:41 ` [Qemu-devel] " Alexander Graf
2009-07-27 18:44 ` Jan Kiszka
2009-07-27 18:47   ` Alexander Graf
2009-07-27 18:52     ` Jan Kiszka
2009-07-27 20:21   ` Glauber Costa
2009-07-27 20:22     ` Luiz Capitulino
2009-07-27 20:36       ` Glauber Costa
2009-07-27 20:31         ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).