Orit Wasserman <owass...@redhat.com> wrote:
>> If we are in iterate state this means the bitmap is changing all the time,
>> even when we didn't finish a complete cycle (for example we get to
>> the bandwidth limit, exit ram_save_iterate and sync the bitmap in
>> pending).
>> This means that bits in part of the bitmap we already walked can get
>> dirty again.
>> In that case the if condition can be true for a dirty bit,
>> in the current code we reset it and than break for the loop, this
>> means it is set clean without sending it, which is a problem.
>> Changing the line order will fix it (the way it was before).
>> 
> OK read the code more thoroughly, there is no way that the bitmap will
> if we do a full cycle in ram_save_block,
> We can actually simplify and the function by checking the number of
> dirty pages. If it is zero we can return
> immediately.
> If it is not zero it means we will exit the loop when we will find the
> dirty page.

Very good idea.  Thanks.

Later, Juan.

Reply via email to