qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 46/51] ram: Remember last_page instead of last_o


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 46/51] ram: Remember last_page instead of last_offset
Date: Tue, 04 Apr 2017 20:24:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

"Dr. David Alan Gilbert" <address@hidden> wrote:
> * Juan Quintela (address@hidden) wrote:
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>>  migration/ram.c | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>> 
>> diff --git a/migration/ram.c b/migration/ram.c
>> index b1a031e..57b776b 100644
>> --- a/migration/ram.c
>> +++ b/migration/ram.c
>> @@ -171,8 +171,8 @@ struct RAMState {
>>      RAMBlock *last_seen_block;
>>      /* Last block from where we have sent data */
>>      RAMBlock *last_sent_block;
>> -    /* Last offset we have sent data from */
>> -    ram_addr_t last_offset;
>> +    /* Last dirty page we have sent */
>
> Can you make that 'Last dirty target page we have sent' 
> just so we know which shape page we're dealing with.

Done.

>> +    ram_addr_t last_page;
>>      /* last ram version we have seen */
>>      uint32_t last_version;
>>      /* We are in the first round */
>> @@ -1063,7 +1063,7 @@ static bool find_dirty_block(RAMState *rs, 
>> PageSearchStatus *pss,
>>      pss->offset = migration_bitmap_find_dirty(rs, pss->block, pss->offset,
>>                                                page);
>>      if (pss->complete_round && pss->block == rs->last_seen_block &&
>> -        pss->offset >= rs->last_offset) {
>> +        pss->offset >= rs->last_page) {
>
> That's odd; isn't pss->offset still in bytes?

It is not odd, it is wrong.

Fixed.

Thanks, Juan.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]